@openui5/sap.ui.fl 1.139.0 → 1.141.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/.eslint-rules/import-check.js +71 -0
- package/THIRDPARTY.txt +2 -2
- package/package.json +3 -3
- 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 +13 -3
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +3 -2
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +4 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +2 -2
- 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 +14 -12
- 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 +2 -8
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +2 -2
- 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 +6 -3
- package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +12 -26
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +68 -229
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +0 -8
- 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 +287 -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 +22 -5
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +72 -19
- package/src/sap/ui/fl/apply/_internal/init.js +47 -0
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +17 -7
- package/src/sap/ui/fl/apply/api/AnnotationChangeHandlerAPI.js +2 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +190 -53
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +17 -1
- package/src/sap/ui/fl/apply/api/ExtensionPointRegistryAPI.js +2 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +6 -5
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +45 -45
- package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +2 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +2 -2
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +4 -4
- 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 +21 -9
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/ChangeAnnotation.js +7 -2
- 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/changeHandler/common/createIFrame.js +1 -4
- 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/designtime/variants/VariantManagement.designtime.js +14 -12
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Loader.js +372 -0
- package/src/sap/ui/fl/{apply/_internal/flexState → initial/_internal}/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Settings.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +67 -9
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +12 -5
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/{apply → initial}/_internal/preprocessors/ControllerExtension.js +16 -5
- package/src/sap/ui/fl/{apply → initial}/_internal/preprocessors/RegistrationDelegator.js +9 -40
- package/src/sap/ui/fl/{apply → initial}/_internal/preprocessors/XmlPreprocessor.js +29 -21
- 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 +44 -44
- package/src/sap/ui/fl/messagebundle_vi.properties +1 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +2 -2
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- 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 +5 -4
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +88 -36
- package/src/sap/ui/fl/variants/VariantManager.js +81 -21
- package/src/sap/ui/fl/variants/VariantModel.js +38 -189
- 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 +9 -5
- 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 +1 -1
- 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/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 +40 -71
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +3 -3
- 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} +176 -309
- package/src/sap/ui/fl/write/_internal/init.js +27 -0
- 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/Adaptations.js +1 -1
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +4 -2
- package/src/sap/ui/fl/write/api/BusinessNetworkAPI.js +60 -26
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +4 -3
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +19 -23
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +3 -2
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +2 -1
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +2 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +3 -2
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +3 -2
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +23 -20
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +10 -7
- package/src/sap/ui/fl/write/api/SACIntegrationUpdateVariant.js +8 -7
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +3 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +26 -22
- package/src/sap/ui/fl/write/api/TranslationAPI.js +3 -2
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +4 -3
- package/src/sap/ui/fl/write/api/VersionsAPI.js +4 -3
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +3 -2
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +4 -2
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +13 -0
- package/ui5.yaml +0 -1
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +0 -208
- 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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2025 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/fl/apply/_internal/init"
|
|
9
|
+
], function(
|
|
10
|
+
) {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Initialization of the write bundle.
|
|
15
|
+
* For now, this only executes the apply bundle initialization.
|
|
16
|
+
* This module must be loaded by every publicly used module of the write bundle.
|
|
17
|
+
*
|
|
18
|
+
* @name sap.ui.fl.write._internal.init
|
|
19
|
+
* @author SAP SE
|
|
20
|
+
* @version 1.141.0
|
|
21
|
+
* @since 1.141.0
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
// For now this is a no-op, but it ensures that the apply bundle is initialized
|
|
26
|
+
// when the write bundle is loaded.
|
|
27
|
+
});
|
|
@@ -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.141.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.141.0
|
|
31
31
|
* @since 1.74.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
@@ -5,11 +5,12 @@
|
|
|
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",
|
|
12
|
-
"sap/ui/fl/write/_internal/Versions"
|
|
12
|
+
"sap/ui/fl/write/_internal/Versions",
|
|
13
|
+
"sap/ui/fl/write/_internal/init"
|
|
13
14
|
], function(
|
|
14
15
|
ManifestUtils,
|
|
15
16
|
SaveAs,
|
|
@@ -46,6 +47,7 @@ sap.ui.define([
|
|
|
46
47
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
47
48
|
* @param {sap.ui.fl.Selector} mPropertyBag.selector - Selector
|
|
48
49
|
* @param {string} mPropertyBag.id - App variant ID
|
|
50
|
+
* @param {object} [mPropertyBag.oParsedHash] - Parsed Hash containing semantic object, action and parameters for inbound
|
|
49
51
|
* @param {sap.ui.fl.Layer} mPropertyBag.layer - Current working layer
|
|
50
52
|
* @returns {Promise} Promise that resolves with the app variant save response
|
|
51
53
|
*
|
|
@@ -8,22 +8,23 @@ 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
12
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
13
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
13
14
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
14
15
|
"sap/ui/fl/write/_internal/Storage",
|
|
15
|
-
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
16
16
|
"sap/ui/fl/Layer",
|
|
17
|
-
"sap/ui/fl/Utils"
|
|
17
|
+
"sap/ui/fl/Utils",
|
|
18
|
+
"sap/ui/fl/write/_internal/init"
|
|
18
19
|
], (
|
|
19
20
|
JsControlTreeModifier,
|
|
20
21
|
ControlVariantsUtils,
|
|
21
22
|
FlexObjectFactory,
|
|
22
|
-
|
|
23
|
+
States,
|
|
23
24
|
FlexInfoSession,
|
|
25
|
+
ManifestUtils,
|
|
24
26
|
FlexObjectManager,
|
|
25
27
|
Storage,
|
|
26
|
-
ChangesWriteAPI,
|
|
27
28
|
Layer,
|
|
28
29
|
Utils
|
|
29
30
|
) => {
|
|
@@ -35,7 +36,7 @@ sap.ui.define([
|
|
|
35
36
|
* @namespace
|
|
36
37
|
* @alias module:sap/ui/fl/write/api/BusinessNetworkAPI
|
|
37
38
|
* @since 1.135
|
|
38
|
-
* @version 1.
|
|
39
|
+
* @version 1.141.0
|
|
39
40
|
* @private
|
|
40
41
|
* @ui5-restricted SAP Business Network
|
|
41
42
|
*/
|
|
@@ -49,7 +50,7 @@ sap.ui.define([
|
|
|
49
50
|
* @param {string} mPropertyBag.variantManagementReference - Reference to the variant management control
|
|
50
51
|
* @param {string} mPropertyBag.variantName - Name of the new variant
|
|
51
52
|
* @param {string} mPropertyBag.reference - Flex reference of the app the variant belongs to
|
|
52
|
-
* @param {string} [mPropertyBag.id] -
|
|
53
|
+
* @param {string} [mPropertyBag.id] - ID of the new variant
|
|
53
54
|
* @param {string} [mPropertyBag.variantReference] - Reference to the variant the new one should be based on
|
|
54
55
|
* @param {sap.ui.fl.Layer} [mPropertyBag.layer="CUSTOMER"] - Layer of the new variant
|
|
55
56
|
* @param {string} [mPropertyBag.generator="BusinessNetworkAPI.createVariant"] - Generator of the new variant
|
|
@@ -70,11 +71,13 @@ sap.ui.define([
|
|
|
70
71
|
generator: mPropertyBag.generator || "BusinessNetworkAPI.createVariant"
|
|
71
72
|
};
|
|
72
73
|
|
|
73
|
-
const aFlexObjects = [FlexObjectFactory.createFlVariant(mProperties)
|
|
74
|
+
const aFlexObjects = [FlexObjectFactory.createFlVariant(mProperties)];
|
|
74
75
|
|
|
75
|
-
const oResponse = await Storage.
|
|
76
|
-
layer:
|
|
77
|
-
|
|
76
|
+
const oResponse = await Storage.condense({
|
|
77
|
+
layer: mPropertyBag.layer || Layer.CUSTOMER,
|
|
78
|
+
reference: mPropertyBag.reference,
|
|
79
|
+
allChanges: aFlexObjects,
|
|
80
|
+
condensedChanges: aFlexObjects
|
|
78
81
|
});
|
|
79
82
|
return oResponse.response;
|
|
80
83
|
};
|
|
@@ -85,7 +88,7 @@ sap.ui.define([
|
|
|
85
88
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
86
89
|
* @param {sap.ui.fl.variants.VariantManagement} mPropertyBag.control - Variant Management control instance
|
|
87
90
|
* @param {string} mPropertyBag.variantName - Name of the new variant
|
|
88
|
-
* @param {string} [mPropertyBag.id] -
|
|
91
|
+
* @param {string} [mPropertyBag.id] - ID of the new variant
|
|
89
92
|
* @param {string} [mPropertyBag.variantReference] - Reference to the variant the new one should be based on.
|
|
90
93
|
* If non is given, the new variant will be based on the standard variant
|
|
91
94
|
* @param {sap.ui.fl.Layer} [mPropertyBag.layer="USER"] - Layer of the new variant
|
|
@@ -126,7 +129,7 @@ sap.ui.define([
|
|
|
126
129
|
* Saves all the changes.
|
|
127
130
|
*
|
|
128
131
|
* @param {sap.ui.core.Element} oControl - Control instance
|
|
129
|
-
* @returns {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>}
|
|
132
|
+
* @returns {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>} Resolves with all saved Flex Objects
|
|
130
133
|
* @private
|
|
131
134
|
* @ui5-restricted SAP Business Network
|
|
132
135
|
*/
|
|
@@ -161,29 +164,60 @@ sap.ui.define([
|
|
|
161
164
|
|
|
162
165
|
/**
|
|
163
166
|
* Deletes a list of control variants and their associated changes, and saves.
|
|
167
|
+
* This API method does not need a running application.
|
|
164
168
|
*
|
|
165
169
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
166
|
-
* @param {
|
|
170
|
+
* @param {string} mPropertyBag.reference - Flex reference of the app the variant belongs to
|
|
167
171
|
* @param {string[]} mPropertyBag.variants - Variant IDs to be deleted
|
|
168
172
|
* @param {sap.ui.fl.Layer} [mPropertyBag.layer="CUSTOMER"] - Layer of the variants to be deleted
|
|
169
|
-
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]}
|
|
173
|
+
* @returns {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>} Resolves with an array of Flex Objects that were deleted
|
|
170
174
|
* @private
|
|
171
175
|
* @ui5-restricted SAP Business Network
|
|
172
176
|
*/
|
|
173
177
|
BusinessNetworkAPI.deleteVariants = async function(mPropertyBag) {
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
const sLayer = mPropertyBag.layer || Layer.CUSTOMER;
|
|
179
|
+
const sNamespaceSubfolder = "variants";
|
|
180
|
+
const aDeletedVariants = mPropertyBag.variants
|
|
181
|
+
.map((sVariantId) => {
|
|
182
|
+
return {
|
|
183
|
+
fileName: sVariantId,
|
|
184
|
+
fileType: "ctrl_variant",
|
|
185
|
+
layer: sLayer,
|
|
186
|
+
reference: mPropertyBag.reference,
|
|
187
|
+
namespace: `apps/${mPropertyBag.reference}/${sNamespaceSubfolder}/`
|
|
188
|
+
};
|
|
189
|
+
})
|
|
190
|
+
.map((mChangeProperties) => FlexObjectFactory.createFromFileContent(mChangeProperties));
|
|
191
|
+
aDeletedVariants.forEach((oVariant) => {
|
|
192
|
+
oVariant.condenserState = "delete";
|
|
193
|
+
oVariant.setState(States.LifecycleState.DELETED);
|
|
179
194
|
});
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
195
|
+
|
|
196
|
+
await Storage.condense({
|
|
197
|
+
layer: sLayer,
|
|
198
|
+
reference: mPropertyBag.reference,
|
|
199
|
+
allChanges: aDeletedVariants,
|
|
200
|
+
condensedChanges: aDeletedVariants
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Deletes all USER layer variants for a given variant management.
|
|
206
|
+
* This API method does not need a running application.
|
|
207
|
+
*
|
|
208
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
209
|
+
* @param {string} mPropertyBag.reference - Flex reference of the app
|
|
210
|
+
* @param {string} mPropertyBag.variantManagementReference - Reference of the variant management control
|
|
211
|
+
* @returns {Promise<undefined>} Resolves when all variants are deleted
|
|
212
|
+
* @private
|
|
213
|
+
* @ui5-restricted SAP Business Network
|
|
214
|
+
*/
|
|
215
|
+
BusinessNetworkAPI.resetPersonalizationVariants = function(mPropertyBag) {
|
|
216
|
+
return Storage.deleteUserVariantsForVM({
|
|
217
|
+
flexReference: mPropertyBag.reference,
|
|
218
|
+
variantManagementReferences: [mPropertyBag.variantManagementReference],
|
|
219
|
+
layer: Layer.USER
|
|
185
220
|
});
|
|
186
|
-
return aFlexObjectsToDelete;
|
|
187
221
|
};
|
|
188
222
|
|
|
189
223
|
return BusinessNetworkAPI;
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
20
20
|
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
21
21
|
"sap/ui/fl/apply/_internal/flexState/FlexObjectState",
|
|
22
|
-
"sap/ui/fl/
|
|
22
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
23
23
|
"sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory",
|
|
24
24
|
"sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage",
|
|
25
25
|
"sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory",
|
|
@@ -29,7 +29,8 @@ sap.ui.define([
|
|
|
29
29
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
30
30
|
"sap/ui/fl/write/api/VersionsAPI",
|
|
31
31
|
"sap/ui/fl/Layer",
|
|
32
|
-
"sap/ui/fl/Utils"
|
|
32
|
+
"sap/ui/fl/Utils",
|
|
33
|
+
"sap/ui/fl/write/_internal/init"
|
|
33
34
|
], function(
|
|
34
35
|
_omit,
|
|
35
36
|
Log,
|
|
@@ -363,7 +364,7 @@ sap.ui.define([
|
|
|
363
364
|
* @param {string[]} mPropertyBag.variants - Variant IDs to be deleted
|
|
364
365
|
* @param {string} mPropertyBag.layer - Layer that the variants belong to
|
|
365
366
|
* @param {boolean} [mPropertyBag.forceDelete=false] - If set to true, the deletion will not check for draft or dirty state of the variants
|
|
366
|
-
* @returns {
|
|
367
|
+
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} Array of deleted Flex Objects
|
|
367
368
|
* @private
|
|
368
369
|
* @ui5-restricted sap.ui.fl, sap.ui.rta, similar tools
|
|
369
370
|
*/
|
|
@@ -7,12 +7,12 @@
|
|
|
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/
|
|
13
|
-
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
11
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
14
12
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
15
|
-
"sap/ui/fl/
|
|
13
|
+
"sap/ui/fl/apply/_internal/flexState/compVariants/applyChangesOnVariant",
|
|
14
|
+
"sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState",
|
|
15
|
+
"sap/ui/fl/write/_internal/flexState/compVariants/CompVariantManager",
|
|
16
16
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
17
17
|
"sap/ui/fl/write/_internal/Storage",
|
|
18
18
|
"sap/ui/fl/write/_internal/Versions",
|
|
@@ -21,16 +21,17 @@ sap.ui.define([
|
|
|
21
21
|
"sap/ui/fl/Layer",
|
|
22
22
|
"sap/ui/fl/LayerUtils",
|
|
23
23
|
"sap/ui/fl/Utils",
|
|
24
|
-
"sap/ui/model/json/JSONModel"
|
|
24
|
+
"sap/ui/model/json/JSONModel",
|
|
25
|
+
"sap/ui/fl/write/_internal/init"
|
|
25
26
|
], function(
|
|
26
27
|
Lib,
|
|
27
28
|
FlexObjectFactory,
|
|
28
|
-
CompVariantMerger,
|
|
29
29
|
VariantManagementState,
|
|
30
30
|
ManifestUtils,
|
|
31
|
-
ControlVariantApplyAPI,
|
|
32
31
|
FlexInfoSession,
|
|
33
|
-
|
|
32
|
+
applyChangesOnVariant,
|
|
33
|
+
CompVariantManagementState,
|
|
34
|
+
CompVariantManager,
|
|
34
35
|
FlexObjectManager,
|
|
35
36
|
Storage,
|
|
36
37
|
Versions,
|
|
@@ -122,8 +123,7 @@ sap.ui.define([
|
|
|
122
123
|
return FeaturesAPI.isContextBasedAdaptationAvailable(sLayer)
|
|
123
124
|
.then(function(bContextBasedAdaptationsEnabledResponse) {
|
|
124
125
|
bContextBasedAdaptationsEnabled = bContextBasedAdaptationsEnabledResponse;
|
|
125
|
-
|
|
126
|
-
return oAdaptationsPromise;
|
|
126
|
+
return bContextBasedAdaptationsEnabled ? ContextBasedAdaptationsAPI.load(mPropertyBag) : Promise.resolve({adaptations: []});
|
|
127
127
|
})
|
|
128
128
|
.then(function(oAdaptations) {
|
|
129
129
|
// Determine displayed adaptation
|
|
@@ -411,9 +411,8 @@ sap.ui.define([
|
|
|
411
411
|
|
|
412
412
|
// Clone it, to avoid that we modify the original and that modifying the original affects the state
|
|
413
413
|
var oClone = oVariant.clone();
|
|
414
|
-
|
|
414
|
+
applyChangesOnVariant(oClone, aVariantChanges);
|
|
415
415
|
// Avoid garbage
|
|
416
|
-
oClone.removeAllChanges();
|
|
417
416
|
oClone.destroy();
|
|
418
417
|
return oClone.mProperties;
|
|
419
418
|
}
|
|
@@ -476,7 +475,7 @@ sap.ui.define([
|
|
|
476
475
|
function createChangeSetVisibleFalseToRestrictedVariant(oVariant, mPropertyBag, contextBasedAdaptationId, VariantManager) {
|
|
477
476
|
if (oVariant.isA("sap.ui.fl.apply._internal.flexObjects.CompVariant")) {
|
|
478
477
|
var sPersistencyKey = oVariant.getPersistencyKey();
|
|
479
|
-
oVariant =
|
|
478
|
+
oVariant = CompVariantManager.updateVariant({
|
|
480
479
|
reference: mPropertyBag.appId,
|
|
481
480
|
persistencyKey: sPersistencyKey,
|
|
482
481
|
id: oVariant.getId(),
|
|
@@ -485,7 +484,7 @@ sap.ui.define([
|
|
|
485
484
|
adaptationId: contextBasedAdaptationId,
|
|
486
485
|
forceCreate: true
|
|
487
486
|
});
|
|
488
|
-
return
|
|
487
|
+
return CompVariantManagementState.getVariantChanges(oVariant).reverse()[0].convertToFileContent();
|
|
489
488
|
}
|
|
490
489
|
// Fl variant
|
|
491
490
|
var oAppComponent = FlexUtils.getAppComponentForControl(mPropertyBag.control);
|
|
@@ -504,10 +503,10 @@ sap.ui.define([
|
|
|
504
503
|
}
|
|
505
504
|
|
|
506
505
|
function getObjectsByLayerAndType(aFlexObjects, sChangesLayer, bVariants) {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
506
|
+
return aFlexObjects.filter((oFlexObject) =>
|
|
507
|
+
bVariants === oFlexObject.isA("sap.ui.fl.apply._internal.flexObjects.Variant")
|
|
508
|
+
&& oFlexObject.getLayer() === sChangesLayer
|
|
509
|
+
);
|
|
511
510
|
}
|
|
512
511
|
|
|
513
512
|
function getVariantReference(oChange) {
|
|
@@ -528,15 +527,12 @@ sap.ui.define([
|
|
|
528
527
|
}
|
|
529
528
|
|
|
530
529
|
function isSetContextChange(oChange) {
|
|
531
|
-
|
|
532
|
-
return true;
|
|
533
|
-
}
|
|
534
|
-
return false;
|
|
530
|
+
return oChange.getFileType() === "ctrl_variant_change" && oChange.getChangeType() === "setContexts";
|
|
535
531
|
}
|
|
536
532
|
|
|
537
533
|
/**
|
|
538
534
|
* Filter all changes that are relevant to be copied for an adaptation during migration.
|
|
539
|
-
* All non
|
|
535
|
+
* All non-variant changes are taken over. Variant dependent changes are filtered depending on the variant
|
|
540
536
|
* Changes for variants that will not be taken over into this adaptation will be removed
|
|
541
537
|
* Also removes setContext changes for FLVariants
|
|
542
538
|
* @param {array<string>} aIgnoredVariantIds - IDs of variants that are out of scope
|
|
@@ -7,10 +7,11 @@
|
|
|
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
|
-
"sap/ui/fl/Layer"
|
|
13
|
+
"sap/ui/fl/Layer",
|
|
14
|
+
"sap/ui/fl/write/_internal/init"
|
|
14
15
|
], function(
|
|
15
16
|
Component,
|
|
16
17
|
ComponentContainer,
|
|
@@ -20,7 +20,8 @@ sap.ui.define([
|
|
|
20
20
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
21
21
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
22
22
|
"sap/ui/fl/Layer",
|
|
23
|
-
"sap/ui/fl/Utils"
|
|
23
|
+
"sap/ui/fl/Utils",
|
|
24
|
+
"sap/ui/fl/write/_internal/init"
|
|
24
25
|
], function(
|
|
25
26
|
Log,
|
|
26
27
|
JsControlTreeModifier,
|
|
@@ -8,7 +8,8 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess",
|
|
9
9
|
"sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess",
|
|
10
10
|
"sap/ui/base/ManagedObject",
|
|
11
|
-
"sap/ui/fl/Utils"
|
|
11
|
+
"sap/ui/fl/Utils",
|
|
12
|
+
"sap/ui/fl/write/_internal/init"
|
|
12
13
|
], function(
|
|
13
14
|
ABAPAccess,
|
|
14
15
|
CAPAccess,
|
|
@@ -22,7 +23,7 @@ sap.ui.define([
|
|
|
22
23
|
*
|
|
23
24
|
* @namespace sap.ui.fl.write.api.FieldExtensibility
|
|
24
25
|
* @since 1.87
|
|
25
|
-
* @version 1.
|
|
26
|
+
* @version 1.141.0
|
|
26
27
|
* @private
|
|
27
28
|
* @ui5-restricted sap.ui.fl, sap.ui.rta, sap.ui.mdc
|
|
28
29
|
*/
|
|
@@ -9,11 +9,12 @@ 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",
|
|
16
|
-
"sap/ui/fl/Utils"
|
|
16
|
+
"sap/ui/fl/Utils",
|
|
17
|
+
"sap/ui/fl/write/_internal/init"
|
|
17
18
|
], function(
|
|
18
19
|
union,
|
|
19
20
|
JsControlTreeModifier,
|
|
@@ -12,9 +12,10 @@ 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/Loader",
|
|
18
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
18
19
|
"sap/ui/fl/initial/_internal/Settings",
|
|
19
20
|
"sap/ui/fl/write/_internal/condenser/Condenser",
|
|
20
21
|
"sap/ui/fl/write/_internal/flexState/changes/UIChangeManager",
|
|
@@ -23,7 +24,8 @@ sap.ui.define([
|
|
|
23
24
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
24
25
|
"sap/ui/fl/Layer",
|
|
25
26
|
"sap/ui/fl/LayerUtils",
|
|
26
|
-
"sap/ui/fl/Utils"
|
|
27
|
+
"sap/ui/fl/Utils",
|
|
28
|
+
"sap/ui/fl/write/_internal/init"
|
|
27
29
|
], function(
|
|
28
30
|
_omit,
|
|
29
31
|
Log,
|
|
@@ -32,9 +34,10 @@ sap.ui.define([
|
|
|
32
34
|
FlexCustomData,
|
|
33
35
|
UIChange,
|
|
34
36
|
FlexState,
|
|
35
|
-
ManifestUtils,
|
|
36
37
|
FlexRuntimeInfoAPI,
|
|
37
38
|
FlexInfoSession,
|
|
39
|
+
Loader,
|
|
40
|
+
ManifestUtils,
|
|
38
41
|
Settings,
|
|
39
42
|
Condenser,
|
|
40
43
|
UIChangeManager,
|
|
@@ -111,23 +114,19 @@ sap.ui.define([
|
|
|
111
114
|
* @private
|
|
112
115
|
* @ui5-restricted
|
|
113
116
|
*/
|
|
114
|
-
PersistenceWriteAPI.hasHigherLayerChanges = function(mPropertyBag) {
|
|
117
|
+
PersistenceWriteAPI.hasHigherLayerChanges = async function(mPropertyBag) {
|
|
115
118
|
mPropertyBag.upToLayer ||= LayerUtils.getCurrentLayer();
|
|
116
119
|
|
|
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
|
-
});
|
|
120
|
+
const aFlexObjects = await FlexObjectManager.getFlexObjects(mPropertyBag);
|
|
121
|
+
const aFilteredFlexObjects = aFlexObjects.filter(
|
|
122
|
+
(oFlexObject) => LayerUtils.isOverLayer(oFlexObject.getLayer(), mPropertyBag.upToLayer)
|
|
123
|
+
);
|
|
124
|
+
if (aFilteredFlexObjects.length === 0) {
|
|
125
|
+
return false;
|
|
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;
|
|
131
130
|
};
|
|
132
131
|
|
|
133
132
|
/**
|
|
@@ -154,9 +153,13 @@ sap.ui.define([
|
|
|
154
153
|
FlexInfoSession.setByReference(oFlexInfoSession, sReference);
|
|
155
154
|
await FlexObjectManager.saveFlexObjects(mPropertyBag);
|
|
156
155
|
|
|
156
|
+
// When activating a new version or saving a new draft the request has to be made with the new version as parameter
|
|
157
|
+
oFlexInfoSession.version = mPropertyBag.version;
|
|
158
|
+
FlexInfoSession.setByReference(oFlexInfoSession, sReference);
|
|
159
|
+
|
|
157
160
|
// This is needed as long the save requests does not return the necessary information to update the FlexState without a new request
|
|
158
161
|
const aFlexObjects = await FlexObjectManager.getFlexObjects({
|
|
159
|
-
..._omit(mPropertyBag, ["skipUpdateCache", "layer"]),
|
|
162
|
+
..._omit(mPropertyBag, ["skipUpdateCache", "layer", "version"]),
|
|
160
163
|
invalidateCache: true,
|
|
161
164
|
currentLayer: mPropertyBag.layer,
|
|
162
165
|
includeCtrlVariants: true
|
|
@@ -221,7 +224,7 @@ sap.ui.define([
|
|
|
221
224
|
};
|
|
222
225
|
|
|
223
226
|
FlexInfoSession.setByReference(oNewFlexInfoSession, sReference);
|
|
224
|
-
|
|
227
|
+
Loader.setAllContextsProvided(sReference, oNewFlexInfoSession.allContextsProvided);
|
|
225
228
|
};
|
|
226
229
|
|
|
227
230
|
/**
|
|
@@ -6,23 +6,26 @@
|
|
|
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/Loader",
|
|
11
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
11
12
|
"sap/ui/fl/initial/_internal/Settings",
|
|
12
13
|
"sap/ui/fl/initial/api/Version",
|
|
13
|
-
"sap/ui/fl/write/_internal/flexState/compVariants/
|
|
14
|
+
"sap/ui/fl/write/_internal/flexState/compVariants/CompVariantManager",
|
|
14
15
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
15
16
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
16
17
|
"sap/ui/fl/write/api/VersionsAPI",
|
|
17
18
|
"sap/ui/fl/Layer",
|
|
18
|
-
"sap/ui/fl/LayerUtils"
|
|
19
|
+
"sap/ui/fl/LayerUtils",
|
|
20
|
+
"sap/ui/fl/write/_internal/init"
|
|
19
21
|
], function(
|
|
20
22
|
FlexState,
|
|
21
|
-
ManifestUtils,
|
|
22
23
|
FlexInfoSession,
|
|
24
|
+
Loader,
|
|
25
|
+
ManifestUtils,
|
|
23
26
|
Settings,
|
|
24
27
|
Version,
|
|
25
|
-
|
|
28
|
+
CompVariantManager,
|
|
26
29
|
FeaturesAPI,
|
|
27
30
|
PersistenceWriteAPI,
|
|
28
31
|
VersionsAPI,
|
|
@@ -64,7 +67,7 @@ sap.ui.define([
|
|
|
64
67
|
|
|
65
68
|
function checkSVMControlsForDirty(oReloadInfo) {
|
|
66
69
|
if (LayerUtils.isOverLayer(Layer.USER, oReloadInfo.layer)) {
|
|
67
|
-
return
|
|
70
|
+
return CompVariantManager.checkSVMControlsForDirty((ManifestUtils.getFlexReferenceForControl(oReloadInfo.selector)));
|
|
68
71
|
}
|
|
69
72
|
return false;
|
|
70
73
|
}
|
|
@@ -95,7 +98,7 @@ sap.ui.define([
|
|
|
95
98
|
// Refresh oFlexInfoSession with updated backend data updated in updateResetAndPublishInfo
|
|
96
99
|
oFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
97
100
|
} else {
|
|
98
|
-
|
|
101
|
+
Loader.setAllContextsProvided(sReference, oFlexInfoSession.allContextsProvided);
|
|
99
102
|
}
|
|
100
103
|
oFlexInfoSession.initialAllContexts = !oFlexInfoSession.allContextsProvided;
|
|
101
104
|
FlexInfoSession.setByReference(oFlexInfoSession, sReference);
|
|
@@ -5,16 +5,17 @@
|
|
|
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",
|
|
12
|
-
"sap/ui/fl/
|
|
11
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
12
|
+
"sap/ui/fl/Layer",
|
|
13
|
+
"sap/ui/fl/write/_internal/init"
|
|
13
14
|
], function(
|
|
14
|
-
|
|
15
|
-
ManifestUtils,
|
|
15
|
+
CompVariantManager,
|
|
16
16
|
CompVariantUtils,
|
|
17
17
|
FlexState,
|
|
18
|
+
ManifestUtils,
|
|
18
19
|
Layer
|
|
19
20
|
) {
|
|
20
21
|
"use strict";
|
|
@@ -72,7 +73,7 @@ sap.ui.define([
|
|
|
72
73
|
return Promise.reject("the user is not authorized to edit the PUBLIC variant (no author nor key user)");
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
return
|
|
76
|
+
CompVariantManager.updateVariant(mPropertyBag);
|
|
77
|
+
return CompVariantManager.persist(mPropertyBag);
|
|
77
78
|
};
|
|
78
79
|
});
|
|
@@ -5,14 +5,15 @@
|
|
|
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",
|
|
12
12
|
"sap/ui/fl/write/_internal/SaveAs",
|
|
13
13
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
14
14
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
15
|
-
"sap/base/util/restricted/_pick"
|
|
15
|
+
"sap/base/util/restricted/_pick",
|
|
16
|
+
"sap/ui/fl/write/_internal/init"
|
|
16
17
|
], function(
|
|
17
18
|
ManifestUtils,
|
|
18
19
|
Settings,
|