@openui5/sap.ui.fl 1.115.0 → 1.116.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/.eslintrc.json +33 -2
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +29 -29
- package/src/sap/ui/fl/ChangePersistence.js +69 -71
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnector.js +7 -7
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +7 -7
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +5 -5
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +157 -130
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/Layer.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +11 -11
- package/src/sap/ui/fl/Utils.js +16 -17
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +41 -38
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +114 -94
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +19 -19
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory.js +4 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyUtil.js +1 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +15 -15
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +8 -8
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +6 -6
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -2
- 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 +3 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +4 -6
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +10 -10
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +2 -4
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector.js +4 -5
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +29 -29
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +1 -2
- package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +6 -4
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +44 -44
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +15 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -14
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +3 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +6 -5
- package/src/sap/ui/fl/apply/_internal/flexObjects/RevertData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +12 -4
- package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +23 -5
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +183 -64
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +27 -17
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +50 -50
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +27 -13
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +55 -37
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +12 -12
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +5 -5
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +6 -6
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -2
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +4 -4
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +5 -5
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +10 -4
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +5 -5
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +6 -6
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +21 -21
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +34 -34
- package/src/sap/ui/fl/changeHandler/Base.js +7 -7
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +107 -107
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +45 -45
- package/src/sap/ui/fl/changeHandler/BaseRename.js +26 -26
- package/src/sap/ui/fl/changeHandler/BaseTreeModifier.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +15 -16
- package/src/sap/ui/fl/changeHandler/MoveControls.js +190 -191
- package/src/sap/ui/fl/changeHandler/MoveElements.js +36 -36
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +7 -7
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +7 -7
- package/src/sap/ui/fl/changeHandler/StashControl.js +35 -35
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +7 -7
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +21 -21
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +39 -39
- package/src/sap/ui/fl/changeHandler/common/ChangeCategories.js +1 -1
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +5 -5
- package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +5 -5
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +12 -12
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +7 -9
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +12 -12
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +60 -60
- package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +2 -5
- package/src/sap/ui/fl/initial/_internal/Storage.js +18 -19
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +4 -4
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +20 -21
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +6 -6
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +4 -4
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +18 -18
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +4 -4
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +2 -2
- package/src/sap/ui/fl/interfaces/Delegate.js +7 -9
- package/src/sap/ui/fl/library.js +44 -45
- package/src/sap/ui/fl/library.support.js +59 -59
- package/src/sap/ui/fl/messagebundle.properties +4 -119
- package/src/sap/ui/fl/messagebundle_ar.properties +2 -79
- package/src/sap/ui/fl/messagebundle_bg.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ca.properties +2 -79
- package/src/sap/ui/fl/messagebundle_cs.properties +2 -79
- package/src/sap/ui/fl/messagebundle_cy.properties +2 -79
- package/src/sap/ui/fl/messagebundle_da.properties +2 -79
- package/src/sap/ui/fl/messagebundle_de.properties +2 -79
- package/src/sap/ui/fl/messagebundle_el.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +2 -79
- package/src/sap/ui/fl/messagebundle_es.properties +2 -79
- package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -79
- package/src/sap/ui/fl/messagebundle_et.properties +2 -79
- package/src/sap/ui/fl/messagebundle_fi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_fr.properties +2 -79
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -79
- package/src/sap/ui/fl/messagebundle_hi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_hr.properties +2 -79
- package/src/sap/ui/fl/messagebundle_hu.properties +2 -79
- package/src/sap/ui/fl/messagebundle_id.properties +2 -79
- package/src/sap/ui/fl/messagebundle_it.properties +2 -79
- package/src/sap/ui/fl/messagebundle_iw.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ja.properties +2 -79
- package/src/sap/ui/fl/messagebundle_kk.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ko.properties +2 -79
- package/src/sap/ui/fl/messagebundle_lt.properties +2 -79
- package/src/sap/ui/fl/messagebundle_lv.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ms.properties +2 -79
- package/src/sap/ui/fl/messagebundle_nl.properties +2 -79
- package/src/sap/ui/fl/messagebundle_no.properties +2 -79
- package/src/sap/ui/fl/messagebundle_pl.properties +2 -79
- package/src/sap/ui/fl/messagebundle_pt.properties +2 -79
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ro.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ru.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sh.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sk.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sl.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sv.properties +2 -79
- package/src/sap/ui/fl/messagebundle_th.properties +2 -79
- package/src/sap/ui/fl/messagebundle_tr.properties +2 -79
- package/src/sap/ui/fl/messagebundle_uk.properties +3 -80
- package/src/sap/ui/fl/messagebundle_vi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -79
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -79
- package/src/sap/ui/fl/registry/Settings.js +41 -43
- package/src/sap/ui/fl/requireAsync.js +7 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +8 -8
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +22 -22
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +3 -3
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/Component.js +3 -5
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +27 -27
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +20 -20
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +17 -17
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +4 -4
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +34 -34
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +10 -10
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +5 -5
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +2 -2
- package/src/sap/ui/fl/util/IFrame.js +18 -18
- package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +7 -7
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +2 -2
- package/src/sap/ui/fl/util/getContainerUserInfo.js +25 -25
- package/src/sap/ui/fl/util/resolveBinding.js +3 -3
- package/src/sap/ui/fl/variants/VariantManagement.js +8 -32
- package/src/sap/ui/fl/variants/VariantModel.js +182 -124
- package/src/sap/ui/fl/variants/context/Component.js +1 -2
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -5
- package/src/sap/ui/fl/write/_internal/SaveAs.js +143 -143
- package/src/sap/ui/fl/write/_internal/Storage.js +46 -49
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -4
- package/src/sap/ui/fl/write/_internal/Versions.js +104 -94
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +9 -9
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +7 -7
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +3 -5
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +15 -10
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +10 -10
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +23 -24
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +60 -61
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +4 -4
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +6 -6
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +14 -14
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +3 -3
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +15 -7
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +2 -2
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +3 -3
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +3 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +4 -4
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +2 -2
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +26 -26
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +78 -57
- package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +12 -13
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +12 -12
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +7 -7
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +7 -7
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +9 -9
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +546 -110
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +109 -67
- package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +3 -3
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +19 -20
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +19 -19
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +59 -54
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +8 -8
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +6 -6
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +14 -13
- package/src/sap/ui/fl/write/api/TranslationAPI.js +13 -13
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/VersionsAPI.js +14 -14
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +1 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +7 -7
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +17 -17
|
@@ -15,6 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage",
|
|
16
16
|
"sap/ui/fl/registry/Settings",
|
|
17
17
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
18
|
+
"sap/ui/fl/ChangePersistenceFactory",
|
|
18
19
|
"sap/ui/fl/FlexControllerFactory",
|
|
19
20
|
"sap/ui/fl/Layer",
|
|
20
21
|
"sap/ui/fl/Utils"
|
|
@@ -29,6 +30,7 @@ sap.ui.define([
|
|
|
29
30
|
ChangeHandlerStorage,
|
|
30
31
|
Settings,
|
|
31
32
|
ChangesWriteAPI,
|
|
33
|
+
ChangePersistenceFactory,
|
|
32
34
|
FlexControllerFactory,
|
|
33
35
|
Layer,
|
|
34
36
|
Utils
|
|
@@ -125,72 +127,72 @@ sap.ui.define([
|
|
|
125
127
|
var aChanges = [];
|
|
126
128
|
return mPropertyBag.changes.reduce(function(pPromise, oPersonalizationChange) {
|
|
127
129
|
return pPromise
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
130
|
+
.then(function() {
|
|
131
|
+
oPersonalizationChange.selectorControl = oPersonalizationChange.selectorElement;
|
|
132
|
+
return checkChangeSpecificData(oPersonalizationChange, sLayer);
|
|
133
|
+
})
|
|
134
|
+
.then(function() {
|
|
135
|
+
// Transient changes are always VM-independent
|
|
136
|
+
if (!oPersonalizationChange.transient && !mPropertyBag.ignoreVariantManagement) {
|
|
137
|
+
// check for preset variantReference
|
|
138
|
+
if (!oPersonalizationChange.changeSpecificData.variantReference) {
|
|
139
|
+
var sVariantManagementReference = getRelevantVariantManagementReference(oAppComponent, oPersonalizationChange.selectorControl, mPropertyBag.useStaticArea);
|
|
140
|
+
if (sVariantManagementReference) {
|
|
141
|
+
var sCurrentVariantReference = oVariantModel.oData[sVariantManagementReference].currentVariant;
|
|
142
|
+
oPersonalizationChange.changeSpecificData.variantReference = sCurrentVariantReference;
|
|
142
143
|
}
|
|
143
|
-
} else {
|
|
144
|
-
// delete preset variantReference
|
|
145
|
-
delete oPersonalizationChange.changeSpecificData.variantReference;
|
|
146
144
|
}
|
|
145
|
+
} else {
|
|
146
|
+
// delete preset variantReference
|
|
147
|
+
delete oPersonalizationChange.changeSpecificData.variantReference;
|
|
148
|
+
}
|
|
147
149
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
oPersonalizationChange.changeSpecificData = Object.assign(oPersonalizationChange.changeSpecificData, {developerMode: false, layer: sLayer});
|
|
151
|
+
return ChangesWriteAPI.create({
|
|
152
|
+
changeSpecificData: oPersonalizationChange.changeSpecificData,
|
|
153
|
+
selector: oPersonalizationChange.selectorControl
|
|
154
|
+
});
|
|
155
|
+
})
|
|
156
|
+
.then(function(oCreatedChange) {
|
|
157
|
+
if (!oPersonalizationChange.transient) {
|
|
158
|
+
oCreatedChange = oFlexController.addPreparedChange(oCreatedChange, oAppComponent);
|
|
159
|
+
}
|
|
158
160
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
163
|
-
})
|
|
164
|
-
.catch(function(oError) {
|
|
165
|
-
Log.error("A Change was not added successfully. Reason: ", oError.message);
|
|
161
|
+
aChanges.push({
|
|
162
|
+
changeInstance: oCreatedChange,
|
|
163
|
+
selectorControl: oPersonalizationChange.selectorControl
|
|
166
164
|
});
|
|
167
|
-
|
|
168
|
-
.
|
|
169
|
-
|
|
165
|
+
})
|
|
166
|
+
.catch(function(oError) {
|
|
167
|
+
Log.error("A Change was not added successfully. Reason: ", oError.message);
|
|
170
168
|
});
|
|
169
|
+
}, Promise.resolve())
|
|
170
|
+
.then(function() {
|
|
171
|
+
return aChanges;
|
|
172
|
+
});
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
function applyChanges(aChanges) {
|
|
174
176
|
return aChanges.reduce(function(pPromise, oChange) {
|
|
175
177
|
return pPromise
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
});
|
|
182
|
-
})
|
|
183
|
-
.then(function(oResult) {
|
|
184
|
-
if (oResult.success) {
|
|
185
|
-
aSuccessfulChanges.push(oChange.changeInstance);
|
|
186
|
-
} else {
|
|
187
|
-
throw oResult.error || new Error("ChangesWriteAPI.apply failed with unspecified error");
|
|
188
|
-
}
|
|
189
|
-
})
|
|
190
|
-
.catch(function(oError) {
|
|
191
|
-
oFlexController.deleteChange(oChange.changeInstance, oAppComponent);
|
|
192
|
-
Log.error("A Change was not applied successfully. Reason: ", oError.message);
|
|
178
|
+
.then(function() {
|
|
179
|
+
oChange.changeInstance.setQueuedForApply();
|
|
180
|
+
return ChangesWriteAPI.apply({
|
|
181
|
+
change: oChange.changeInstance,
|
|
182
|
+
element: oChange.selectorControl
|
|
193
183
|
});
|
|
184
|
+
})
|
|
185
|
+
.then(function(oResult) {
|
|
186
|
+
if (oResult.success) {
|
|
187
|
+
aSuccessfulChanges.push(oChange.changeInstance);
|
|
188
|
+
} else {
|
|
189
|
+
throw oResult.error || new Error("ChangesWriteAPI.apply failed with unspecified error");
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
.catch(function(oError) {
|
|
193
|
+
oFlexController.deleteChange(oChange.changeInstance, oAppComponent);
|
|
194
|
+
Log.error("A Change was not applied successfully. Reason: ", oError.message);
|
|
195
|
+
});
|
|
194
196
|
}, Promise.resolve());
|
|
195
197
|
}
|
|
196
198
|
|
|
@@ -201,14 +203,14 @@ sap.ui.define([
|
|
|
201
203
|
componentId: oAppComponent.getId()
|
|
202
204
|
}).then(function() {
|
|
203
205
|
return createChanges()
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
});
|
|
210
|
-
return aSuccessfulChanges;
|
|
206
|
+
.then(applyChanges)
|
|
207
|
+
.then(function() {
|
|
208
|
+
(mChangeCreationListeners[sFlexReference] || [])
|
|
209
|
+
.forEach(function(fnCallback) {
|
|
210
|
+
fnCallback(aSuccessfulChanges);
|
|
211
211
|
});
|
|
212
|
+
return aSuccessfulChanges;
|
|
213
|
+
});
|
|
212
214
|
});
|
|
213
215
|
},
|
|
214
216
|
|
|
@@ -234,7 +236,7 @@ sap.ui.define([
|
|
|
234
236
|
return logAndReject("App Component could not be determined");
|
|
235
237
|
}
|
|
236
238
|
|
|
237
|
-
var aSelectorIds = mPropertyBag.selectors.map(function
|
|
239
|
+
var aSelectorIds = mPropertyBag.selectors.map(function(vControl) {
|
|
238
240
|
var sControlId = vControl.id || vControl.getId();
|
|
239
241
|
var sLocalId = oAppComponent.getLocalId(sControlId);
|
|
240
242
|
return sLocalId || sControlId;
|
|
@@ -260,7 +262,7 @@ sap.ui.define([
|
|
|
260
262
|
* @private
|
|
261
263
|
* @ui5-restricted
|
|
262
264
|
*/
|
|
263
|
-
restore: function
|
|
265
|
+
restore: function(mPropertyBag) {
|
|
264
266
|
if (!mPropertyBag || !mPropertyBag.selector) {
|
|
265
267
|
return Promise.reject("No selector was provided");
|
|
266
268
|
}
|
|
@@ -279,6 +281,46 @@ sap.ui.define([
|
|
|
279
281
|
return Promise.resolve();
|
|
280
282
|
},
|
|
281
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Checks for dirty flex objects that match the given parameters.
|
|
286
|
+
* This function can be used to determine if a restore should be enabled.
|
|
287
|
+
*
|
|
288
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
289
|
+
* @param {sap.ui.core.Control} mPropertyBag.selector - Control for which dirty flex objects are checked
|
|
290
|
+
* @param {string} [mPropertyBag.generator] - Generator of changes
|
|
291
|
+
* @param {string[]} [mPropertyBag.changeTypes] - Types of changes
|
|
292
|
+
* @returns {boolean} True if the control has dirty flex objects
|
|
293
|
+
*/
|
|
294
|
+
hasDirtyFlexObjects: function(mPropertyBag) {
|
|
295
|
+
if (!mPropertyBag || !mPropertyBag.selector) {
|
|
296
|
+
throw Error("No selector was provided");
|
|
297
|
+
}
|
|
298
|
+
var oAppComponent = Utils.getAppComponentForControl(mPropertyBag.selector);
|
|
299
|
+
if (!oAppComponent) {
|
|
300
|
+
throw Error("App Component could not be determined");
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
var oChangePersistence = ChangePersistenceFactory.getChangePersistenceForControl(oAppComponent);
|
|
304
|
+
var aDirtyFlexObjects = oChangePersistence.getDirtyChanges();
|
|
305
|
+
|
|
306
|
+
return aDirtyFlexObjects.some(function(oFlexObject) {
|
|
307
|
+
if (oFlexObject.getLayer() !== Layer.USER) {
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (mPropertyBag.generator && oFlexObject.getSupportInformation().generator !== mPropertyBag.generator) {
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (mPropertyBag.changeTypes && mPropertyBag.changeTypes.indexOf(oFlexObject.getChangeType()) === -1) {
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
var vSelector = oFlexObject.getSelector();
|
|
320
|
+
return mPropertyBag.selector.getId() === JsControlTreeModifier.getControlIdBySelector(vSelector, oAppComponent);
|
|
321
|
+
});
|
|
322
|
+
},
|
|
323
|
+
|
|
282
324
|
/**
|
|
283
325
|
* Saves unsaved changes to the backend service.
|
|
284
326
|
*
|
|
@@ -337,11 +379,11 @@ sap.ui.define([
|
|
|
337
379
|
* @private
|
|
338
380
|
* @sapui5-restricted sap.ovp
|
|
339
381
|
*/
|
|
340
|
-
isCondensingEnabled: function
|
|
382
|
+
isCondensingEnabled: function() {
|
|
341
383
|
return Settings.getInstance()
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
384
|
+
.then(function(oSettings) {
|
|
385
|
+
return oSettings.isCondensingEnabled(Layer.USER);
|
|
386
|
+
});
|
|
345
387
|
},
|
|
346
388
|
|
|
347
389
|
/**
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @param {object} mPropertyBag.view - View object
|
|
30
30
|
* @returns {object} mExtensionPointInfo - Map of extension point information
|
|
31
31
|
*/
|
|
32
|
-
getExtensionPointInfo: function
|
|
32
|
+
getExtensionPointInfo: function(mPropertyBag) {
|
|
33
33
|
return ExtensionPointRegistry.getExtensionPointInfo(mPropertyBag.name, mPropertyBag.view);
|
|
34
34
|
},
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* @param {string} mPropertyBag.viewId - ID of the view
|
|
40
40
|
* @returns {object} map of extension points
|
|
41
41
|
*/
|
|
42
|
-
getExtensionPointInfoByViewId: function
|
|
42
|
+
getExtensionPointInfoByViewId: function(mPropertyBag) {
|
|
43
43
|
return ExtensionPointRegistry.getExtensionPointInfoByViewId(mPropertyBag.viewId);
|
|
44
44
|
},
|
|
45
45
|
|
|
@@ -50,7 +50,7 @@ sap.ui.define([
|
|
|
50
50
|
* @param {string} mPropertyBag.parentId - ID of the extension point parent control
|
|
51
51
|
* @returns {Array} Array of extension point information
|
|
52
52
|
*/
|
|
53
|
-
getExtensionPointInfoByParentId: function
|
|
53
|
+
getExtensionPointInfoByParentId: function(mPropertyBag) {
|
|
54
54
|
return ExtensionPointRegistry.getExtensionPointInfoByParentId(mPropertyBag.parentId);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
@@ -34,8 +34,8 @@ sap.ui.define([
|
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted
|
|
36
36
|
*/
|
|
37
|
-
isPublishAvailable: function
|
|
38
|
-
return Settings.getInstance().then(function
|
|
37
|
+
isPublishAvailable: function() {
|
|
38
|
+
return Settings.getInstance().then(function(oSettings) {
|
|
39
39
|
return (
|
|
40
40
|
oSettings.isPublishAvailable() ||
|
|
41
41
|
(!oSettings.isProductiveSystem() && oSettings.isSystemWithTransports())
|
|
@@ -57,12 +57,12 @@ sap.ui.define([
|
|
|
57
57
|
* @private
|
|
58
58
|
* @ui5-restricted
|
|
59
59
|
*/
|
|
60
|
-
isSaveAsAvailable: function
|
|
60
|
+
isSaveAsAvailable: function(sLayer) {
|
|
61
61
|
return Promise.all([
|
|
62
62
|
Settings.getInstance(),
|
|
63
63
|
Utils.getUShellService("CrossApplicationNavigation")
|
|
64
64
|
])
|
|
65
|
-
.then(function
|
|
65
|
+
.then(function(aPromises) {
|
|
66
66
|
var oSettings = aPromises[0];
|
|
67
67
|
var oCrossAppNav = aPromises[1];
|
|
68
68
|
return (
|
|
@@ -71,13 +71,12 @@ sap.ui.define([
|
|
|
71
71
|
&& oCrossAppNav !== undefined // Not a standalone app
|
|
72
72
|
);
|
|
73
73
|
})
|
|
74
|
-
.catch(function
|
|
75
|
-
//either Settings or CrossApplicationNavigation service from Unified Shell failed -> disable save as app variant
|
|
74
|
+
.catch(function() {
|
|
75
|
+
// either Settings or CrossApplicationNavigation service from Unified Shell failed -> disable save as app variant
|
|
76
76
|
return false;
|
|
77
77
|
});
|
|
78
78
|
},
|
|
79
79
|
|
|
80
|
-
|
|
81
80
|
/**
|
|
82
81
|
* Determine if the context-based adaptation feature is available in the connected backend
|
|
83
82
|
*
|
|
@@ -88,7 +87,7 @@ sap.ui.define([
|
|
|
88
87
|
* @ui5-restricted
|
|
89
88
|
*/
|
|
90
89
|
isContextBasedAdaptationAvailable: function(sLayer) {
|
|
91
|
-
return Settings.getInstance().then(function
|
|
90
|
+
return Settings.getInstance().then(function(oSettings) {
|
|
92
91
|
if (oSettings.isContextBasedAdaptationEnabled() && sLayer === Layer.CUSTOMER) {
|
|
93
92
|
return true;
|
|
94
93
|
}
|
|
@@ -105,11 +104,11 @@ sap.ui.define([
|
|
|
105
104
|
* @returns {Promise<boolean>} Resolves to a boolean indicating if the key user role is assigned to the user
|
|
106
105
|
* @public
|
|
107
106
|
*/
|
|
108
|
-
isKeyUser: function
|
|
107
|
+
isKeyUser: function() {
|
|
109
108
|
return Settings.getInstance()
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
.then(function(oSettings) {
|
|
110
|
+
return oSettings.isKeyUser();
|
|
111
|
+
});
|
|
113
112
|
},
|
|
114
113
|
|
|
115
114
|
/**
|
|
@@ -120,11 +119,11 @@ sap.ui.define([
|
|
|
120
119
|
* @private
|
|
121
120
|
* @ui5-restricted sap.ui.rta
|
|
122
121
|
*/
|
|
123
|
-
isVersioningEnabled: function
|
|
122
|
+
isVersioningEnabled: function(sLayer) {
|
|
124
123
|
return Settings.getInstance()
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
.then(function(oSettings) {
|
|
125
|
+
return oSettings.isVersioningEnabled(sLayer);
|
|
126
|
+
});
|
|
128
127
|
},
|
|
129
128
|
|
|
130
129
|
/**
|
|
@@ -135,10 +134,10 @@ sap.ui.define([
|
|
|
135
134
|
* @private
|
|
136
135
|
* @ui5-restricted sap.ui.rta
|
|
137
136
|
*/
|
|
138
|
-
isKeyUserTranslationEnabled: function
|
|
137
|
+
isKeyUserTranslationEnabled: function(sLayer) {
|
|
139
138
|
if (sLayer === Layer.CUSTOMER) {
|
|
140
139
|
return Settings.getInstance()
|
|
141
|
-
.then(function
|
|
140
|
+
.then(function(oSettings) {
|
|
142
141
|
return oSettings.isKeyUserTranslationEnabled();
|
|
143
142
|
});
|
|
144
143
|
}
|
|
@@ -154,12 +153,12 @@ sap.ui.define([
|
|
|
154
153
|
* @deprecated
|
|
155
154
|
* @ui5-restricted sap.ui.fl.write.api.ContextSharingAPI
|
|
156
155
|
*/
|
|
157
|
-
isContextSharingEnabled: function
|
|
156
|
+
isContextSharingEnabled: function(sLayer) {
|
|
158
157
|
if (sLayer !== Layer.CUSTOMER) {
|
|
159
158
|
return Promise.resolve(false);
|
|
160
159
|
}
|
|
161
160
|
return Settings.getInstance()
|
|
162
|
-
.then(function
|
|
161
|
+
.then(function(oSettings) {
|
|
163
162
|
return oSettings.isContextSharingEnabled({layer: sLayer});
|
|
164
163
|
});
|
|
165
164
|
}
|
|
@@ -41,12 +41,12 @@ sap.ui.define([
|
|
|
41
41
|
};
|
|
42
42
|
var oChangePersistence = ChangePersistenceFactory.getChangePersistenceForControl(oControl);
|
|
43
43
|
return oChangePersistence.getAllUIChanges(mPropertyBag)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
.filter(function(oChange) {
|
|
45
|
+
return (
|
|
46
|
+
oChange.getState() !== States.LifecycleState.DELETED
|
|
47
47
|
&& oChange.getVariantReference() === (sCurrentVariant || undefined)
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
function getNestedChangesForControlCheck(oTargetControl) {
|
|
@@ -70,30 +70,30 @@ sap.ui.define([
|
|
|
70
70
|
|
|
71
71
|
function checkChange(oChange) {
|
|
72
72
|
return oChange.getDependentSelectorList()
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
.map(function(sSelector) {
|
|
74
|
+
return JsControlTreeModifier.bySelector(sSelector, oComponent);
|
|
75
|
+
})
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.some(function(oDependent) {
|
|
78
|
+
return isPartOfTargetControlTree(oDependent);
|
|
79
|
+
});
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
return checkChange;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
LocalResetAPI.resetChanges = function
|
|
85
|
+
LocalResetAPI.resetChanges = function(aChanges, oAppComponent) {
|
|
86
86
|
// Reset in reverse order, make sure not to mutate the original order as it is used to restore
|
|
87
87
|
var aReverseChanges = aChanges.slice().reverse();
|
|
88
88
|
|
|
89
|
-
var aRevertQueue = aReverseChanges.map(function
|
|
89
|
+
var aRevertQueue = aReverseChanges.map(function(oChange) {
|
|
90
90
|
var oControl = JsControlTreeModifier.bySelector(oChange.getSelector(), oAppComponent);
|
|
91
|
-
return function
|
|
91
|
+
return function() {
|
|
92
92
|
return PersistenceWriteAPI.remove({
|
|
93
93
|
change: oChange,
|
|
94
94
|
selector: oControl
|
|
95
95
|
})
|
|
96
|
-
.then(function
|
|
96
|
+
.then(function() {
|
|
97
97
|
oChange.setQueuedForRevert();
|
|
98
98
|
return ChangesWriteAPI.revert({
|
|
99
99
|
change: oChange,
|
|
@@ -105,9 +105,9 @@ sap.ui.define([
|
|
|
105
105
|
return Utils.execPromiseQueueSequentially(aRevertQueue);
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
LocalResetAPI.restoreChanges = function
|
|
109
|
-
var aApplyQueue = aChanges.map(function
|
|
110
|
-
return function
|
|
108
|
+
LocalResetAPI.restoreChanges = function(aChanges, oAppComponent) {
|
|
109
|
+
var aApplyQueue = aChanges.map(function(oChange) {
|
|
110
|
+
return function() {
|
|
111
111
|
oChange.restorePreviousState();
|
|
112
112
|
var oControl = JsControlTreeModifier.bySelector(oChange.getSelector(), oAppComponent);
|
|
113
113
|
PersistenceWriteAPI.add({
|
|
@@ -51,7 +51,7 @@ sap.ui.define([
|
|
|
51
51
|
* @ui5-restricted sap.ui.rta, similar tools
|
|
52
52
|
*
|
|
53
53
|
*/
|
|
54
|
-
var PersistenceWriteAPI =
|
|
54
|
+
var PersistenceWriteAPI = /** @lends sap.ui.fl.write.api.PersistenceWriteAPI */ {};
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Retrieves the changes from the flex persistence for the selector.
|
|
@@ -77,9 +77,9 @@ sap.ui.define([
|
|
|
77
77
|
mPropertyBag.includeCtrlVariants = true;
|
|
78
78
|
mPropertyBag.invalidateCache = false;
|
|
79
79
|
return PersistenceWriteAPI._getUIChanges(mPropertyBag)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
.then(function(aChanges) {
|
|
81
|
+
return aChanges.length > 0;
|
|
82
|
+
});
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -109,14 +109,14 @@ sap.ui.define([
|
|
|
109
109
|
mPropertyBag.upToLayer = mPropertyBag.upToLayer || LayerUtils.getCurrentLayer();
|
|
110
110
|
|
|
111
111
|
return FlexObjectState.getFlexObjects(mPropertyBag)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
})
|
|
117
|
-
.then(function(aFilteredFlexObjects) {
|
|
118
|
-
return aFilteredFlexObjects.length > 0;
|
|
112
|
+
.then(function(aFlexObjects) {
|
|
113
|
+
return aFlexObjects.filter(function(oFlexObject) {
|
|
114
|
+
return LayerUtils.isOverLayer(oFlexObject.getLayer(), mPropertyBag.upToLayer);
|
|
119
115
|
});
|
|
116
|
+
})
|
|
117
|
+
.then(function(aFilteredFlexObjects) {
|
|
118
|
+
return aFilteredFlexObjects.length > 0;
|
|
119
|
+
});
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
/**
|
|
@@ -137,8 +137,10 @@ sap.ui.define([
|
|
|
137
137
|
PersistenceWriteAPI.save = function(mPropertyBag) {
|
|
138
138
|
return FlexObjectState.saveFlexObjects(mPropertyBag).then(function(oFlexObject) {
|
|
139
139
|
if (oFlexObject && oFlexObject.length !== 0) {
|
|
140
|
-
return PersistenceWriteAPI.getResetAndPublishInfo(mPropertyBag).then(function
|
|
141
|
-
|
|
140
|
+
return PersistenceWriteAPI.getResetAndPublishInfo(mPropertyBag).then(function(oResult) {
|
|
141
|
+
// other attributes like adaptationId, isEndUserAdaptation, init needs to be taken from flex info session if available
|
|
142
|
+
var oExistingFlexInfo = FlexInfoSession.get(mPropertyBag.selector) || {};
|
|
143
|
+
FlexInfoSession.set(Object.assign(oExistingFlexInfo, oResult), mPropertyBag.selector);
|
|
142
144
|
return oFlexObject;
|
|
143
145
|
});
|
|
144
146
|
}
|
|
@@ -178,18 +180,18 @@ sap.ui.define([
|
|
|
178
180
|
// because of control variant reset logic through setVisible change and app descriptor changes
|
|
179
181
|
if (bIsLayerTransportable) {
|
|
180
182
|
return Storage.getFlexInfo(mPropertyBag)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
183
|
+
.then(function(oResponse) {
|
|
184
|
+
oFlexInfo.allContextsProvided = oResponse.allContextsProvided === undefined || oResponse.allContextsProvided;
|
|
185
|
+
oFlexInfo.isResetEnabled = oResponse.isResetEnabled;
|
|
186
|
+
// Together with publish info from back end,
|
|
187
|
+
// system setting info for publish availability also need to be checked
|
|
188
|
+
oFlexInfo.isPublishEnabled = bIsPublishAvailable && oResponse.isPublishEnabled;
|
|
189
|
+
return oFlexInfo;
|
|
190
|
+
})
|
|
191
|
+
.catch(function(oError) {
|
|
192
|
+
Log.error("Sending request to flex/info route failed: " + oError.message);
|
|
193
|
+
return oFlexInfo;
|
|
194
|
+
});
|
|
193
195
|
}
|
|
194
196
|
return oFlexInfo;
|
|
195
197
|
});
|
|
@@ -250,7 +252,7 @@ sap.ui.define([
|
|
|
250
252
|
mPropertyBag.styleClass = mPropertyBag.styleClass || "";
|
|
251
253
|
var oAppComponent = ChangesController.getAppComponentForSelector(mPropertyBag.selector);
|
|
252
254
|
return ChangesController.getFlexControllerInstance(oAppComponent)
|
|
253
|
-
|
|
255
|
+
._oChangePersistence.transportAllUIChanges({}, mPropertyBag.styleClass, mPropertyBag.layer, mPropertyBag.appVariantDescriptors);
|
|
254
256
|
};
|
|
255
257
|
|
|
256
258
|
/**
|
|
@@ -287,30 +289,33 @@ sap.ui.define([
|
|
|
287
289
|
var oFlexController;
|
|
288
290
|
var oAppComponent;
|
|
289
291
|
return Promise.resolve()
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
oFlexController = ChangesController.getFlexControllerInstance(oAppComponent);
|
|
306
|
-
// remove custom data for flex change
|
|
307
|
-
if (oElement) {
|
|
308
|
-
FlexCustomData.destroyAppliedCustomData(oElement, mPropertyBag.change, JsControlTreeModifier);
|
|
309
|
-
}
|
|
310
|
-
// delete from flex persistence map
|
|
311
|
-
oFlexController.deleteChange(mPropertyBag.change);
|
|
292
|
+
.then(function() {
|
|
293
|
+
if (!mPropertyBag.selector) {
|
|
294
|
+
return Promise.reject(
|
|
295
|
+
new Error("An invalid selector was passed so change could not be removed with id: " + mPropertyBag.change.getId()));
|
|
296
|
+
}
|
|
297
|
+
oAppComponent = ChangesController.getAppComponentForSelector(mPropertyBag.selector);
|
|
298
|
+
if (!oAppComponent) {
|
|
299
|
+
return Promise.reject(
|
|
300
|
+
new Error("Invalid application component for selector, change could not be removed with id: "
|
|
301
|
+
+ mPropertyBag.change.getId()));
|
|
302
|
+
}
|
|
303
|
+
// descriptor change
|
|
304
|
+
if (isDescriptorChange(mPropertyBag.change)) {
|
|
305
|
+
var oDescriptorFlexController = ChangesController.getFlexControllerInstance(oAppComponent);
|
|
306
|
+
oDescriptorFlexController.deleteChange(mPropertyBag.change);
|
|
312
307
|
return undefined;
|
|
313
|
-
}
|
|
308
|
+
}
|
|
309
|
+
var oElement = JsControlTreeModifier.bySelector(mPropertyBag.change.getSelector(), oAppComponent);
|
|
310
|
+
oFlexController = ChangesController.getFlexControllerInstance(oAppComponent);
|
|
311
|
+
// remove custom data for flex change
|
|
312
|
+
if (oElement) {
|
|
313
|
+
FlexCustomData.destroyAppliedCustomData(oElement, mPropertyBag.change, JsControlTreeModifier);
|
|
314
|
+
}
|
|
315
|
+
// delete from flex persistence map
|
|
316
|
+
oFlexController.deleteChange(mPropertyBag.change);
|
|
317
|
+
return undefined;
|
|
318
|
+
});
|
|
314
319
|
};
|
|
315
320
|
|
|
316
321
|
/**
|
|
@@ -326,9 +331,9 @@ sap.ui.define([
|
|
|
326
331
|
* @returns {Promise} Resolves with object that decides if warning should be shown
|
|
327
332
|
*
|
|
328
333
|
*/
|
|
329
|
-
PersistenceWriteAPI.getChangesWarning = function
|
|
330
|
-
return this._getUIChanges(mPropertyBag).then(function
|
|
331
|
-
var bHasChangesFromOtherSystem = aChanges.some(function
|
|
334
|
+
PersistenceWriteAPI.getChangesWarning = function(mPropertyBag) {
|
|
335
|
+
return this._getUIChanges(mPropertyBag).then(function(aChanges) {
|
|
336
|
+
var bHasChangesFromOtherSystem = aChanges.some(function(oChange) {
|
|
332
337
|
return oChange.isChangeFromOtherSystem();
|
|
333
338
|
});
|
|
334
339
|
|
|
@@ -395,11 +400,11 @@ sap.ui.define([
|
|
|
395
400
|
*/
|
|
396
401
|
PersistenceWriteAPI._getUIChanges = function(mPropertyBag) {
|
|
397
402
|
if (mPropertyBag.layer) {
|
|
398
|
-
//TODO: sync the layer parameter name with new persistence and remove this line
|
|
403
|
+
// TODO: sync the layer parameter name with new persistence and remove this line
|
|
399
404
|
mPropertyBag.currentLayer = mPropertyBag.layer;
|
|
400
405
|
}
|
|
401
406
|
|
|
402
|
-
//TODO: Check the mPropertyBag.selector parameter name - the methods called on FlexObjectState expect a control
|
|
407
|
+
// TODO: Check the mPropertyBag.selector parameter name - the methods called on FlexObjectState expect a control
|
|
403
408
|
return FlexObjectState.getFlexObjects(mPropertyBag);
|
|
404
409
|
};
|
|
405
410
|
|
|
@@ -109,7 +109,7 @@ sap.ui.define([
|
|
|
109
109
|
* @return {boolean} true if allContextsProvided false and RTA wasn't started yet, otherwise false.
|
|
110
110
|
*/
|
|
111
111
|
function needContextSpecificReload(oReloadInfo) {
|
|
112
|
-
//TODO: could be disabled when ContextBasedAdaptationAPI is enabled
|
|
112
|
+
// TODO: could be disabled when ContextBasedAdaptationAPI is enabled
|
|
113
113
|
var oFlexInfoSession = FlexInfoSession.get(oReloadInfo.selector);
|
|
114
114
|
if (oFlexInfoSession && oFlexInfoSession.initialAllContexts) {
|
|
115
115
|
return false; // if we are already in RTA mode, no reload needed again
|
|
@@ -120,13 +120,13 @@ sap.ui.define([
|
|
|
120
120
|
layer: oReloadInfo.layer
|
|
121
121
|
};
|
|
122
122
|
return PersistenceWriteAPI.getResetAndPublishInfo(mPropertyBag)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
.then(function(oResult) {
|
|
124
|
+
if (oFlexInfoSession === null || !oFlexInfoSession.initialAllContexts) {
|
|
125
|
+
oResult.initialAllContexts = true;
|
|
126
|
+
}
|
|
127
|
+
FlexInfoSession.set(oResult, oReloadInfo.selector);
|
|
128
|
+
return !oResult.allContextsProvided;
|
|
129
|
+
});
|
|
130
130
|
}
|
|
131
131
|
oFlexInfoSession.initialAllContexts = true;
|
|
132
132
|
FlexInfoSession.set(oFlexInfoSession, oReloadInfo.selector);
|