@openui5/sap.ui.fl 1.136.3 → 1.139.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 -29
- package/THIRDPARTY.txt +72 -90
- 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 +4 -2
- 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 +3 -8
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +5 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/ChangeModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +6 -6
- 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 +3 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +3 -3
- 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 +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +43 -51
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +13 -11
- 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/changes/UIChangesState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +3 -3
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +5 -9
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +22 -3
- 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 +10 -12
- 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/initial/_internal/Settings.js +151 -0
- package/src/sap/ui/fl/initial/_internal/Storage.js +3 -2
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +18 -24
- 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 +19 -7
- package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +3 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +5 -2
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/initial/api/InitialFlexAPI.js +3 -3
- 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.properties +0 -9
- package/src/sap/ui/fl/messagebundle_ar.properties +0 -6
- package/src/sap/ui/fl/messagebundle_bg.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ca.properties +0 -6
- package/src/sap/ui/fl/messagebundle_cnr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_cs.properties +0 -6
- package/src/sap/ui/fl/messagebundle_cy.properties +0 -6
- package/src/sap/ui/fl/messagebundle_da.properties +0 -6
- package/src/sap/ui/fl/messagebundle_de.properties +0 -6
- package/src/sap/ui/fl/messagebundle_el.properties +0 -6
- package/src/sap/ui/fl/messagebundle_en.properties +0 -6
- package/src/sap/ui/fl/messagebundle_en_GB.properties +0 -6
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_es.properties +0 -6
- package/src/sap/ui/fl/messagebundle_es_MX.properties +0 -6
- package/src/sap/ui/fl/messagebundle_et.properties +0 -6
- package/src/sap/ui/fl/messagebundle_fi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_fr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +0 -6
- package/src/sap/ui/fl/messagebundle_hi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_hr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_hu.properties +0 -6
- package/src/sap/ui/fl/messagebundle_id.properties +0 -6
- package/src/sap/ui/fl/messagebundle_it.properties +0 -6
- package/src/sap/ui/fl/messagebundle_iw.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ja.properties +0 -6
- package/src/sap/ui/fl/messagebundle_kk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ko.properties +0 -6
- package/src/sap/ui/fl/messagebundle_lt.properties +0 -6
- package/src/sap/ui/fl/messagebundle_lv.properties +0 -6
- package/src/sap/ui/fl/messagebundle_mk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ms.properties +0 -6
- package/src/sap/ui/fl/messagebundle_nl.properties +0 -6
- package/src/sap/ui/fl/messagebundle_no.properties +0 -6
- package/src/sap/ui/fl/messagebundle_pl.properties +0 -6
- package/src/sap/ui/fl/messagebundle_pt.properties +0 -6
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ro.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ru.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sh.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sl.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sv.properties +0 -6
- package/src/sap/ui/fl/messagebundle_th.properties +0 -6
- package/src/sap/ui/fl/messagebundle_tr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_uk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_vi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +0 -6
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +0 -6
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +5 -1
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +2 -2
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +4 -4
- 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 +2 -2
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +4 -2
- package/src/sap/ui/fl/variants/VariantManagement.js +3 -5
- package/src/sap/ui/fl/variants/VariantManager.js +12 -10
- package/src/sap/ui/fl/variants/VariantModel.js +26 -24
- package/src/sap/ui/fl/write/_internal/SaveAs.js +7 -8
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -14
- package/src/sap/ui/fl/write/_internal/Versions.js +40 -27
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -11
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +4 -14
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +2 -39
- 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 +4 -4
- 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 +304 -50
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +3 -3
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +5 -5
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +14 -14
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/BusinessNetworkAPI.js +55 -2
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +38 -16
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +7 -7
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +6 -11
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +23 -17
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +29 -14
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +48 -76
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +7 -7
- package/src/sap/ui/fl/write/api/VersionsAPI.js +15 -0
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +0 -9
- package/ui5.yaml +0 -1
- package/src/sap/ui/fl/ChangePersistence.js +0 -438
- package/src/sap/ui/fl/ChangePersistenceFactory.js +0 -60
- package/src/sap/ui/fl/FlexController.js +0 -174
- package/src/sap/ui/fl/FlexControllerFactory.js +0 -82
- package/src/sap/ui/fl/registry/Settings.js +0 -477
|
@@ -5,28 +5,28 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/
|
|
9
|
-
"sap/ui/fl/
|
|
10
|
-
"sap/ui/fl/Layer",
|
|
11
|
-
"sap/ui/fl/write/_internal/transport/Transports",
|
|
8
|
+
"sap/ui/core/BusyIndicator",
|
|
9
|
+
"sap/ui/fl/initial/_internal/Settings",
|
|
12
10
|
"sap/ui/fl/write/_internal/transport/TransportDialog",
|
|
13
|
-
"sap/ui/fl/
|
|
14
|
-
"sap/ui/
|
|
11
|
+
"sap/ui/fl/write/_internal/transport/Transports",
|
|
12
|
+
"sap/ui/fl/Layer",
|
|
13
|
+
"sap/ui/fl/LayerUtils",
|
|
14
|
+
"sap/ui/fl/Utils"
|
|
15
15
|
], function(
|
|
16
|
-
|
|
17
|
-
LayerUtils,
|
|
18
|
-
Layer,
|
|
19
|
-
Transports,
|
|
20
|
-
TransportDialog,
|
|
16
|
+
BusyIndicator,
|
|
21
17
|
FlexSettings,
|
|
22
|
-
|
|
18
|
+
TransportDialog,
|
|
19
|
+
Transports,
|
|
20
|
+
Layer,
|
|
21
|
+
LayerUtils,
|
|
22
|
+
FlUtils
|
|
23
23
|
) {
|
|
24
24
|
"use strict";
|
|
25
25
|
/**
|
|
26
26
|
* @private
|
|
27
27
|
* @alias sap.ui.fl.write._internal.transport.TransportSelection
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.139.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.
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
if (sLayerType && ((sLayerType === Layer.CUSTOMER) || (sLayerType === Layer.CUSTOMER_BASE))) {
|
|
84
84
|
// CUSTOMER layer --> retrieve the settings and check if ATO is enabled
|
|
85
85
|
FlexSettings.getInstance().then(function(oSettings) {
|
|
86
|
-
if (oSettings.
|
|
86
|
+
if (oSettings.getIsAtoEnabled()) {
|
|
87
87
|
// ATO is enabled
|
|
88
88
|
if (!(oObjectInfo && oObjectInfo.name && oObjectInfo.namespace && oObjectInfo.type)) {
|
|
89
89
|
// Object info is not completed (public scenario)+ ATO is enabled + CUSTOMER layer: No getTransport is necessary
|
|
@@ -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.139.0
|
|
31
31
|
* @since 1.74.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
@@ -9,8 +9,10 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
11
11
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
12
|
+
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
12
13
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
13
14
|
"sap/ui/fl/write/_internal/Storage",
|
|
15
|
+
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
14
16
|
"sap/ui/fl/Layer",
|
|
15
17
|
"sap/ui/fl/Utils"
|
|
16
18
|
], (
|
|
@@ -18,8 +20,10 @@ sap.ui.define([
|
|
|
18
20
|
ControlVariantsUtils,
|
|
19
21
|
FlexObjectFactory,
|
|
20
22
|
ManifestUtils,
|
|
23
|
+
FlexInfoSession,
|
|
21
24
|
FlexObjectManager,
|
|
22
25
|
Storage,
|
|
26
|
+
ChangesWriteAPI,
|
|
23
27
|
Layer,
|
|
24
28
|
Utils
|
|
25
29
|
) => {
|
|
@@ -31,7 +35,7 @@ sap.ui.define([
|
|
|
31
35
|
* @namespace
|
|
32
36
|
* @alias module:sap/ui/fl/write/api/BusinessNetworkAPI
|
|
33
37
|
* @since 1.135
|
|
34
|
-
* @version 1.
|
|
38
|
+
* @version 1.139.0
|
|
35
39
|
* @private
|
|
36
40
|
* @ui5-restricted SAP Business Network
|
|
37
41
|
*/
|
|
@@ -133,5 +137,54 @@ sap.ui.define([
|
|
|
133
137
|
});
|
|
134
138
|
};
|
|
135
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Set the max layer to CUSTOMER to disable personalization.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} sReference - Flex reference of the app
|
|
144
|
+
* @throws {Error} If the provided reference is invalid
|
|
145
|
+
* @private
|
|
146
|
+
* @ui5-restricted SAP Business Network
|
|
147
|
+
*/
|
|
148
|
+
BusinessNetworkAPI.disablePersonalization = function(sReference) {
|
|
149
|
+
const oFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
150
|
+
if (!oFlexInfoSession || Object.keys(oFlexInfoSession).length === 0) {
|
|
151
|
+
throw new Error(`Invalid reference provided: ${sReference}`);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
oFlexInfoSession.maxLayer = Layer.CUSTOMER;
|
|
155
|
+
// 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
|
|
156
|
+
// if the user would start the app again in that session, which is not a supported scenario.
|
|
157
|
+
oFlexInfoSession.saveChangeKeepSession = true;
|
|
158
|
+
FlexInfoSession.setByReference(oFlexInfoSession, sReference);
|
|
159
|
+
window.sessionStorage.setItem("sap.ui.rta.skipReload", true);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Deletes a list of control variants and their associated changes, and saves.
|
|
164
|
+
*
|
|
165
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
166
|
+
* @param {sap.ui.fl.variants.VariantManagement} mPropertyBag.vmControl - Variant Management control instance
|
|
167
|
+
* @param {string[]} mPropertyBag.variants - Variant IDs to be deleted
|
|
168
|
+
* @param {sap.ui.fl.Layer} [mPropertyBag.layer="CUSTOMER"] - Layer of the variants to be deleted
|
|
169
|
+
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} Array of flex objects that were deleted
|
|
170
|
+
* @private
|
|
171
|
+
* @ui5-restricted SAP Business Network
|
|
172
|
+
*/
|
|
173
|
+
BusinessNetworkAPI.deleteVariants = async function(mPropertyBag) {
|
|
174
|
+
const aFlexObjectsToDelete = ChangesWriteAPI.deleteVariantsAndRelatedObjects({
|
|
175
|
+
variantManagementControl: mPropertyBag.vmControl,
|
|
176
|
+
variants: mPropertyBag.variants,
|
|
177
|
+
layer: mPropertyBag.layer || Layer.CUSTOMER,
|
|
178
|
+
forceDelete: true // Skips the deletion checks such as draft status
|
|
179
|
+
});
|
|
180
|
+
await FlexObjectManager.saveFlexObjects({
|
|
181
|
+
selector: mPropertyBag.vmControl,
|
|
182
|
+
flexObjects: aFlexObjectsToDelete,
|
|
183
|
+
layer: mPropertyBag.layer || Layer.CUSTOMER,
|
|
184
|
+
includeCtrlVariants: true
|
|
185
|
+
});
|
|
186
|
+
return aFlexObjectsToDelete;
|
|
187
|
+
};
|
|
188
|
+
|
|
136
189
|
return BusinessNetworkAPI;
|
|
137
|
-
});
|
|
190
|
+
});
|
|
@@ -17,6 +17,7 @@ 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
22
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
22
23
|
"sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory",
|
|
@@ -25,7 +26,9 @@ sap.ui.define([
|
|
|
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 {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>} Promise resolving with the array of deleted FlexObjects
|
|
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
|
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/core/Component",
|
|
9
|
+
"sap/ui/core/ComponentContainer",
|
|
9
10
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
11
|
+
"sap/ui/fl/initial/_internal/Settings",
|
|
10
12
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
11
|
-
"sap/ui/
|
|
12
|
-
"sap/ui/fl/Layer",
|
|
13
|
-
"sap/ui/fl/registry/Settings"
|
|
13
|
+
"sap/ui/fl/Layer"
|
|
14
14
|
], function(
|
|
15
15
|
Component,
|
|
16
|
+
ComponentContainer,
|
|
16
17
|
ManifestUtils,
|
|
18
|
+
Settings,
|
|
17
19
|
ContextBasedAdaptationsAPI,
|
|
18
|
-
|
|
19
|
-
Layer,
|
|
20
|
-
Settings
|
|
20
|
+
Layer
|
|
21
21
|
) {
|
|
22
22
|
"use strict";
|
|
23
23
|
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
}
|
|
47
47
|
const sReference = ManifestUtils.getFlexReferenceForControl(mPropertyBag.variantManagementControl);
|
|
48
48
|
const oSettings = await Settings.getInstance();
|
|
49
|
-
const bIsEnabled = oSettings.
|
|
49
|
+
const bIsEnabled = oSettings.getIsContextSharingEnabled()
|
|
50
50
|
&& !ContextBasedAdaptationsAPI.adaptationExists({reference: sReference, layer: Layer.CUSTOMER});
|
|
51
51
|
return bIsEnabled;
|
|
52
52
|
},
|
|
@@ -15,11 +15,10 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
16
16
|
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
17
17
|
"sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage",
|
|
18
|
-
"sap/ui/fl/
|
|
18
|
+
"sap/ui/fl/initial/_internal/Settings",
|
|
19
19
|
"sap/ui/fl/write/_internal/flexState/changes/UIChangeManager",
|
|
20
20
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
21
21
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
22
|
-
"sap/ui/fl/FlexControllerFactory",
|
|
23
22
|
"sap/ui/fl/Layer",
|
|
24
23
|
"sap/ui/fl/Utils"
|
|
25
24
|
], function(
|
|
@@ -37,7 +36,6 @@ sap.ui.define([
|
|
|
37
36
|
UIChangeManager,
|
|
38
37
|
FlexObjectManager,
|
|
39
38
|
ChangesWriteAPI,
|
|
40
|
-
FlexControllerFactory,
|
|
41
39
|
Layer,
|
|
42
40
|
Utils
|
|
43
41
|
) {
|
|
@@ -383,10 +381,9 @@ sap.ui.define([
|
|
|
383
381
|
if (!oAppComponent) {
|
|
384
382
|
return logAndReject("App Component could not be determined");
|
|
385
383
|
}
|
|
386
|
-
var oFlexController = FlexControllerFactory.createForControl(oAppComponent);
|
|
387
384
|
|
|
388
385
|
if (FlexState.isInitialized({control: oAppComponent})) {
|
|
389
|
-
return
|
|
386
|
+
return FlexObjectManager.saveFlexObjects({ flexObjects: mPropertyBag.changes, selector: oAppComponent });
|
|
390
387
|
}
|
|
391
388
|
return Promise.resolve();
|
|
392
389
|
},
|
|
@@ -422,13 +419,11 @@ sap.ui.define([
|
|
|
422
419
|
*
|
|
423
420
|
* @returns {Promise<boolean>} Resolves to a boolean indicating if condensing is enabled
|
|
424
421
|
* @private
|
|
425
|
-
* @
|
|
422
|
+
* @ui5-restricted sap.ovp
|
|
426
423
|
*/
|
|
427
|
-
isCondensingEnabled() {
|
|
428
|
-
|
|
429
|
-
.
|
|
430
|
-
return oSettings.isCondensingEnabled(Layer.USER);
|
|
431
|
-
});
|
|
424
|
+
async isCondensingEnabled() {
|
|
425
|
+
const oSettings = await Settings.getInstance();
|
|
426
|
+
return oSettings.getIsCondensingEnabled();
|
|
432
427
|
},
|
|
433
428
|
|
|
434
429
|
/**
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/ui/fl/initial/_internal/Settings",
|
|
8
9
|
"sap/ui/fl/initial/api/InitialFlexAPI",
|
|
9
|
-
"sap/ui/fl/registry/Settings",
|
|
10
10
|
"sap/ui/fl/write/_internal/Storage",
|
|
11
11
|
"sap/ui/fl/Layer",
|
|
12
12
|
"sap/ui/fl/Utils"
|
|
13
13
|
], function(
|
|
14
|
-
InitialFlexAPI,
|
|
15
14
|
Settings,
|
|
15
|
+
InitialFlexAPI,
|
|
16
16
|
Storage,
|
|
17
17
|
Layer,
|
|
18
18
|
Utils
|
|
@@ -41,8 +41,14 @@ sap.ui.define([
|
|
|
41
41
|
isPublishAvailable() {
|
|
42
42
|
return Settings.getInstance().then(function(oSettings) {
|
|
43
43
|
return (
|
|
44
|
-
oSettings.
|
|
45
|
-
(
|
|
44
|
+
oSettings.getIsPublishAvailable() ||
|
|
45
|
+
// if the flag is not given, publish should be available on ABAP systems (?) which are not productive systems
|
|
46
|
+
!!(
|
|
47
|
+
!oSettings.getIsProductiveSystem()
|
|
48
|
+
// TODO this is pretty arbitrary, not sure what the intention here is
|
|
49
|
+
&& oSettings.getSystem()
|
|
50
|
+
&& oSettings.getClient()
|
|
51
|
+
)
|
|
46
52
|
);
|
|
47
53
|
});
|
|
48
54
|
},
|
|
@@ -70,7 +76,8 @@ sap.ui.define([
|
|
|
70
76
|
var oSettings = aPromises[0];
|
|
71
77
|
var oCrossAppNav = aPromises[1];
|
|
72
78
|
return (
|
|
73
|
-
oSettings.
|
|
79
|
+
!oSettings.getIsContextBasedAdaptationEnabled()
|
|
80
|
+
&& oSettings.getIsAppVariantSaveAsEnabled()
|
|
74
81
|
&& sLayer === Layer.CUSTOMER
|
|
75
82
|
&& oCrossAppNav !== undefined // Not a standalone app
|
|
76
83
|
);
|
|
@@ -92,7 +99,7 @@ sap.ui.define([
|
|
|
92
99
|
*/
|
|
93
100
|
isContextBasedAdaptationAvailable(sLayer) {
|
|
94
101
|
return Settings.getInstance().then(function(oSettings) {
|
|
95
|
-
if (oSettings.
|
|
102
|
+
if (oSettings.getIsContextBasedAdaptationEnabled() && sLayer === Layer.CUSTOMER) {
|
|
96
103
|
return true;
|
|
97
104
|
}
|
|
98
105
|
return false;
|
|
@@ -120,11 +127,10 @@ sap.ui.define([
|
|
|
120
127
|
* @private
|
|
121
128
|
* @ui5-restricted sap.ui.rta
|
|
122
129
|
*/
|
|
123
|
-
isVersioningEnabled(sLayer) {
|
|
124
|
-
|
|
125
|
-
.
|
|
126
|
-
|
|
127
|
-
});
|
|
130
|
+
async isVersioningEnabled(sLayer) {
|
|
131
|
+
const oSettings = await Settings.getInstance();
|
|
132
|
+
const oVersionInfo = oSettings.getVersioning();
|
|
133
|
+
return !!(oVersionInfo[sLayer] || oVersionInfo.ALL);
|
|
128
134
|
},
|
|
129
135
|
|
|
130
136
|
/**
|
|
@@ -139,7 +145,7 @@ sap.ui.define([
|
|
|
139
145
|
if (sLayer === Layer.CUSTOMER) {
|
|
140
146
|
return Settings.getInstance()
|
|
141
147
|
.then(function(oSettings) {
|
|
142
|
-
return oSettings.
|
|
148
|
+
return oSettings.getIsKeyUserTranslationEnabled();
|
|
143
149
|
});
|
|
144
150
|
}
|
|
145
151
|
return Promise.resolve(false);
|
|
@@ -160,7 +166,7 @@ sap.ui.define([
|
|
|
160
166
|
}
|
|
161
167
|
return Settings.getInstance()
|
|
162
168
|
.then(function(oSettings) {
|
|
163
|
-
return oSettings.
|
|
169
|
+
return oSettings.getIsContextSharingEnabled({layer: sLayer});
|
|
164
170
|
});
|
|
165
171
|
},
|
|
166
172
|
|
|
@@ -172,7 +178,7 @@ sap.ui.define([
|
|
|
172
178
|
*/
|
|
173
179
|
async isSeenFeaturesAvailable() {
|
|
174
180
|
const oSettings = await Settings.getInstance();
|
|
175
|
-
return oSettings.
|
|
181
|
+
return oSettings.getIsSeenFeaturesAvailable();
|
|
176
182
|
},
|
|
177
183
|
|
|
178
184
|
/**
|
|
@@ -216,7 +222,7 @@ sap.ui.define([
|
|
|
216
222
|
*/
|
|
217
223
|
isVariantAdaptationEnabled() {
|
|
218
224
|
const oSettings = Settings.getInstanceOrUndef();
|
|
219
|
-
return oSettings?.
|
|
225
|
+
return oSettings?.getIsVariantAdaptationEnabled();
|
|
220
226
|
},
|
|
221
227
|
|
|
222
228
|
/**
|
|
@@ -227,7 +233,7 @@ sap.ui.define([
|
|
|
227
233
|
*/
|
|
228
234
|
isLocalResetEnabled() {
|
|
229
235
|
const oSettings = Settings.getInstanceOrUndef();
|
|
230
|
-
return oSettings?.
|
|
236
|
+
return oSettings?.getIsLocalResetEnabled();
|
|
231
237
|
},
|
|
232
238
|
|
|
233
239
|
/**
|
|
@@ -238,7 +244,7 @@ sap.ui.define([
|
|
|
238
244
|
*/
|
|
239
245
|
areAnnotationChangesEnabled() {
|
|
240
246
|
const oSettings = Settings.getInstanceOrUndef();
|
|
241
|
-
return oSettings?.
|
|
247
|
+
return oSettings?.getIsAnnotationChangeEnabled();
|
|
242
248
|
}
|
|
243
249
|
};
|
|
244
250
|
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
16
16
|
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
17
17
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
18
|
-
"sap/ui/fl/
|
|
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",
|
|
21
21
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
@@ -79,8 +79,7 @@ sap.ui.define([
|
|
|
79
79
|
* @returns {Promise<boolean>} Promise that resolves to a boolean indicating if changes exist
|
|
80
80
|
*/
|
|
81
81
|
function hasChanges(mPropertyBag) {
|
|
82
|
-
mPropertyBag
|
|
83
|
-
return PersistenceWriteAPI._getUIChanges(mPropertyBag)
|
|
82
|
+
return PersistenceWriteAPI._getUIChanges({...mPropertyBag, includeCtrlVariants: true})
|
|
84
83
|
.then(function(aChanges) {
|
|
85
84
|
return aChanges.length > 0;
|
|
86
85
|
});
|
|
@@ -141,8 +140,7 @@ sap.ui.define([
|
|
|
141
140
|
* @param {string} [mPropertyBag.layer=CUSTOMER] - Proposed layer (might be overwritten by the backend) when creating a new app variant - Smart Business must pass the layer
|
|
142
141
|
* @param {boolean} [mPropertyBag.draft=false] - Indicates if changes should be written as a draft
|
|
143
142
|
* @param {boolean} [mPropertyBag.removeOtherLayerChanges=false] - Whether to remove changes on other layers before saving
|
|
144
|
-
*
|
|
145
|
-
* @returns {Promise} Promise that resolves with an array of responses or is rejected with the first error
|
|
143
|
+
* @returns {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>} Resolves with all loaded flex objects after saving
|
|
146
144
|
* @private
|
|
147
145
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
148
146
|
*/
|
|
@@ -150,11 +148,20 @@ sap.ui.define([
|
|
|
150
148
|
// when save or activate a version in rta no reload is triggered but flex/data request is send
|
|
151
149
|
// and will delete version and maxLayer without saveChangeKeepSession
|
|
152
150
|
// after the request saveChangeKeepSession needs to be delete again
|
|
153
|
-
const sReference = ManifestUtils.
|
|
151
|
+
const sReference = ManifestUtils.getFlexReferenceForSelector(mPropertyBag.selector);
|
|
154
152
|
let oFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
155
153
|
oFlexInfoSession.saveChangeKeepSession = true;
|
|
156
154
|
FlexInfoSession.setByReference(oFlexInfoSession, sReference);
|
|
157
|
-
|
|
155
|
+
await FlexObjectManager.saveFlexObjects(mPropertyBag);
|
|
156
|
+
|
|
157
|
+
// 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
|
+
..._omit(mPropertyBag, ["skipUpdateCache", "layer"]),
|
|
160
|
+
invalidateCache: true,
|
|
161
|
+
currentLayer: mPropertyBag.layer,
|
|
162
|
+
includeCtrlVariants: true
|
|
163
|
+
});
|
|
164
|
+
|
|
158
165
|
if (aFlexObjects?.length > 0) {
|
|
159
166
|
await PersistenceWriteAPI.updateResetAndPublishInfo(mPropertyBag);
|
|
160
167
|
}
|
|
@@ -176,6 +183,7 @@ sap.ui.define([
|
|
|
176
183
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
177
184
|
*/
|
|
178
185
|
PersistenceWriteAPI.updateResetAndPublishInfo = async function(mPropertyBag) {
|
|
186
|
+
const sReference = ManifestUtils.getFlexReferenceForSelector(mPropertyBag.selector);
|
|
179
187
|
const [bHasChanges, bIsPublishAvailable] = await Promise.all([
|
|
180
188
|
hasChanges(mPropertyBag),
|
|
181
189
|
FeaturesAPI.isPublishAvailable()
|
|
@@ -192,7 +200,10 @@ sap.ui.define([
|
|
|
192
200
|
// If the layer is transportable, fetch additional information from the backend
|
|
193
201
|
if (bIsLayerTransportable) {
|
|
194
202
|
try {
|
|
195
|
-
const oResponse = await Storage.getFlexInfo(
|
|
203
|
+
const oResponse = await Storage.getFlexInfo({
|
|
204
|
+
...mPropertyBag,
|
|
205
|
+
reference: sReference
|
|
206
|
+
});
|
|
196
207
|
// default is true, so only set to false if explicitly set to false
|
|
197
208
|
oFlexInfo.allContextsProvided = oResponse.allContextsProvided !== false;
|
|
198
209
|
oFlexInfo.isResetEnabled = oResponse.isResetEnabled;
|
|
@@ -203,7 +214,6 @@ sap.ui.define([
|
|
|
203
214
|
}
|
|
204
215
|
|
|
205
216
|
// Update the Flex Info Session
|
|
206
|
-
const sReference = ManifestUtils.getFlexReferenceForControl(mPropertyBag.selector);
|
|
207
217
|
const oOldFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
208
218
|
const oNewFlexInfoSession = {
|
|
209
219
|
...oOldFlexInfoSession,
|
|
@@ -379,14 +389,19 @@ sap.ui.define([
|
|
|
379
389
|
*/
|
|
380
390
|
PersistenceWriteAPI.getChangesWarning = function(mPropertyBag) {
|
|
381
391
|
return this._getUIChanges(mPropertyBag).then(function(aChanges) {
|
|
382
|
-
|
|
392
|
+
const bHasChangesFromOtherSystem = aChanges.some(function(oChange) {
|
|
383
393
|
return oChange.isChangeFromOtherSystem();
|
|
384
394
|
});
|
|
385
395
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
396
|
+
const oSettingsInstance = Settings.getInstanceOrUndef();
|
|
397
|
+
// TODO System and Client info have nothing to do with the transport system
|
|
398
|
+
const isProductiveSystemWithTransports =
|
|
399
|
+
oSettingsInstance
|
|
400
|
+
&& oSettingsInstance.getIsProductiveSystem()
|
|
401
|
+
&& oSettingsInstance.getSystem()
|
|
402
|
+
&& oSettingsInstance.getClient();
|
|
403
|
+
const bHasNoChanges = aChanges.length === 0;
|
|
404
|
+
let oChangesWarning = {showWarning: false};
|
|
390
405
|
|
|
391
406
|
if (bHasChangesFromOtherSystem) {
|
|
392
407
|
oChangesWarning = {showWarning: true, warningType: "mixedChangesWarning"};
|