@openui5/sap.ui.fl 1.115.1 → 1.117.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 +30 -33
- package/src/sap/ui/fl/ChangePersistence.js +139 -84
- 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 +82 -210
- package/src/sap/ui/fl/FlexControllerFactory.js +12 -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 +45 -88
- 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 +130 -94
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +10 -4
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +7 -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 +18 -16
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +11 -9
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +9 -7
- 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 +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +4 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +2 -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 +7 -7
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +13 -11
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +4 -4
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +4 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +5 -5
- 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 +16 -8
- 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 +206 -64
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +27 -17
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +16 -10
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +23 -7
- 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 +20 -23
- 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 +6 -6
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +15 -5
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +10 -4
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +6 -8
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +6 -6
- package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +3 -5
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +22 -22
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +43 -36
- 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 +20 -21
- 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 +3 -3
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +22 -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 +9 -9
- 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 -47
- package/src/sap/ui/fl/variants/VariantModel.js +236 -146
- 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 +163 -161
- package/src/sap/ui/fl/write/_internal/Storage.js +51 -53
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -4
- package/src/sap/ui/fl/write/_internal/Versions.js +105 -97
- 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 +40 -10
- 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 +33 -35
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +81 -59
- 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 +12 -15
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +222 -185
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +546 -110
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +122 -68
- package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +19 -4
- 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 +32 -33
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +119 -73
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +8 -8
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +18 -21
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +14 -13
- package/src/sap/ui/fl/write/api/TranslationAPI.js +13 -17
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +5 -7
- 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
- package/ui5.yaml +1 -2
- package/src/sap/ui/fl/apply/_internal/ChangesController.js +0 -49
|
@@ -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
|
|
@@ -116,81 +118,93 @@ sap.ui.define([
|
|
|
116
118
|
);
|
|
117
119
|
var oAppComponent = Utils.getAppComponentForControl(oReferenceControl);
|
|
118
120
|
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oReferenceControl});
|
|
119
|
-
var
|
|
121
|
+
var oChangePersistence = ChangePersistenceFactory.getChangePersistenceForControl(oAppComponent);
|
|
120
122
|
var oVariantModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
|
|
121
123
|
var sLayer = Layer.USER;
|
|
122
124
|
var aSuccessfulChanges = [];
|
|
123
125
|
|
|
124
126
|
function createChanges() {
|
|
125
127
|
var aChanges = [];
|
|
128
|
+
var aChangesToBeAdded = [];
|
|
126
129
|
return mPropertyBag.changes.reduce(function(pPromise, oPersonalizationChange) {
|
|
127
130
|
return pPromise
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
131
|
+
.then(function() {
|
|
132
|
+
oPersonalizationChange.selectorControl = oPersonalizationChange.selectorElement;
|
|
133
|
+
return checkChangeSpecificData(oPersonalizationChange, sLayer);
|
|
134
|
+
})
|
|
135
|
+
.then(function() {
|
|
136
|
+
// Transient changes are always VM-independent
|
|
137
|
+
if (!oPersonalizationChange.transient && !mPropertyBag.ignoreVariantManagement) {
|
|
138
|
+
// check for preset variantReference
|
|
139
|
+
if (!oPersonalizationChange.changeSpecificData.variantReference) {
|
|
140
|
+
var sVariantManagementReference = getRelevantVariantManagementReference(
|
|
141
|
+
oAppComponent,
|
|
142
|
+
oPersonalizationChange.selectorControl,
|
|
143
|
+
mPropertyBag.useStaticArea
|
|
144
|
+
);
|
|
145
|
+
if (sVariantManagementReference) {
|
|
146
|
+
var sCurrentVariantReference = oVariantModel.oData[sVariantManagementReference].currentVariant;
|
|
147
|
+
oPersonalizationChange.changeSpecificData.variantReference = sCurrentVariantReference;
|
|
142
148
|
}
|
|
143
|
-
} else {
|
|
144
|
-
// delete preset variantReference
|
|
145
|
-
delete oPersonalizationChange.changeSpecificData.variantReference;
|
|
146
149
|
}
|
|
150
|
+
} else {
|
|
151
|
+
// delete preset variantReference
|
|
152
|
+
delete oPersonalizationChange.changeSpecificData.variantReference;
|
|
153
|
+
}
|
|
147
154
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
oPersonalizationChange.changeSpecificData = Object.assign(
|
|
156
|
+
oPersonalizationChange.changeSpecificData,
|
|
157
|
+
{developerMode: false, layer: sLayer}
|
|
158
|
+
);
|
|
159
|
+
return ChangesWriteAPI.create({
|
|
160
|
+
changeSpecificData: oPersonalizationChange.changeSpecificData,
|
|
161
|
+
selector: oPersonalizationChange.selectorControl
|
|
162
|
+
});
|
|
163
|
+
})
|
|
164
|
+
.then(function(oCreatedChange) {
|
|
165
|
+
if (!oPersonalizationChange.transient) {
|
|
166
|
+
aChangesToBeAdded.push(oCreatedChange);
|
|
167
|
+
}
|
|
158
168
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
163
|
-
})
|
|
164
|
-
.catch(function(oError) {
|
|
165
|
-
Log.error("A Change was not added successfully. Reason: ", oError.message);
|
|
169
|
+
aChanges.push({
|
|
170
|
+
changeInstance: oCreatedChange,
|
|
171
|
+
selectorControl: oPersonalizationChange.selectorControl
|
|
166
172
|
});
|
|
167
|
-
|
|
168
|
-
.
|
|
169
|
-
|
|
173
|
+
})
|
|
174
|
+
.catch(function(oError) {
|
|
175
|
+
Log.error("A Change was not created successfully. Reason: ", oError.message);
|
|
170
176
|
});
|
|
177
|
+
}, Promise.resolve())
|
|
178
|
+
.then(function() {
|
|
179
|
+
oChangePersistence.addChanges(aChangesToBeAdded, oAppComponent);
|
|
180
|
+
return aChanges;
|
|
181
|
+
})
|
|
182
|
+
.catch(function(oError) {
|
|
183
|
+
Log.error("Changes were not added successfully. Reason: ", oError.message);
|
|
184
|
+
});
|
|
171
185
|
}
|
|
172
186
|
|
|
173
187
|
function applyChanges(aChanges) {
|
|
174
188
|
return aChanges.reduce(function(pPromise, oChange) {
|
|
175
189
|
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);
|
|
190
|
+
.then(function() {
|
|
191
|
+
oChange.changeInstance.setQueuedForApply();
|
|
192
|
+
return ChangesWriteAPI.apply({
|
|
193
|
+
change: oChange.changeInstance,
|
|
194
|
+
element: oChange.selectorControl
|
|
193
195
|
});
|
|
196
|
+
})
|
|
197
|
+
.then(function(oResult) {
|
|
198
|
+
if (oResult.success) {
|
|
199
|
+
aSuccessfulChanges.push(oChange.changeInstance);
|
|
200
|
+
} else {
|
|
201
|
+
throw oResult.error || new Error("ChangesWriteAPI.apply failed with unspecified error");
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
.catch(function(oError) {
|
|
205
|
+
oChangePersistence.deleteChange(oChange.changeInstance);
|
|
206
|
+
Log.error("A Change was not applied successfully. Reason: ", oError.message);
|
|
207
|
+
});
|
|
194
208
|
}, Promise.resolve());
|
|
195
209
|
}
|
|
196
210
|
|
|
@@ -201,14 +215,14 @@ sap.ui.define([
|
|
|
201
215
|
componentId: oAppComponent.getId()
|
|
202
216
|
}).then(function() {
|
|
203
217
|
return createChanges()
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
});
|
|
210
|
-
return aSuccessfulChanges;
|
|
218
|
+
.then(applyChanges)
|
|
219
|
+
.then(function() {
|
|
220
|
+
(mChangeCreationListeners[sFlexReference] || [])
|
|
221
|
+
.forEach(function(fnCallback) {
|
|
222
|
+
fnCallback(aSuccessfulChanges);
|
|
211
223
|
});
|
|
224
|
+
return aSuccessfulChanges;
|
|
225
|
+
});
|
|
212
226
|
});
|
|
213
227
|
},
|
|
214
228
|
|
|
@@ -234,7 +248,7 @@ sap.ui.define([
|
|
|
234
248
|
return logAndReject("App Component could not be determined");
|
|
235
249
|
}
|
|
236
250
|
|
|
237
|
-
var aSelectorIds = mPropertyBag.selectors.map(function
|
|
251
|
+
var aSelectorIds = mPropertyBag.selectors.map(function(vControl) {
|
|
238
252
|
var sControlId = vControl.id || vControl.getId();
|
|
239
253
|
var sLocalId = oAppComponent.getLocalId(sControlId);
|
|
240
254
|
return sLocalId || sControlId;
|
|
@@ -260,7 +274,7 @@ sap.ui.define([
|
|
|
260
274
|
* @private
|
|
261
275
|
* @ui5-restricted
|
|
262
276
|
*/
|
|
263
|
-
restore: function
|
|
277
|
+
restore: function(mPropertyBag) {
|
|
264
278
|
if (!mPropertyBag || !mPropertyBag.selector) {
|
|
265
279
|
return Promise.reject("No selector was provided");
|
|
266
280
|
}
|
|
@@ -279,6 +293,46 @@ sap.ui.define([
|
|
|
279
293
|
return Promise.resolve();
|
|
280
294
|
},
|
|
281
295
|
|
|
296
|
+
/**
|
|
297
|
+
* Checks for dirty flex objects that match the given parameters.
|
|
298
|
+
* This function can be used to determine if a restore should be enabled.
|
|
299
|
+
*
|
|
300
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
301
|
+
* @param {sap.ui.core.Control} mPropertyBag.selector - Control for which dirty flex objects are checked
|
|
302
|
+
* @param {string} [mPropertyBag.generator] - Generator of changes
|
|
303
|
+
* @param {string[]} [mPropertyBag.changeTypes] - Types of changes
|
|
304
|
+
* @returns {boolean} True if the control has dirty flex objects
|
|
305
|
+
*/
|
|
306
|
+
hasDirtyFlexObjects: function(mPropertyBag) {
|
|
307
|
+
if (!mPropertyBag || !mPropertyBag.selector) {
|
|
308
|
+
throw Error("No selector was provided");
|
|
309
|
+
}
|
|
310
|
+
var oAppComponent = Utils.getAppComponentForControl(mPropertyBag.selector);
|
|
311
|
+
if (!oAppComponent) {
|
|
312
|
+
throw Error("App Component could not be determined");
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
var oChangePersistence = ChangePersistenceFactory.getChangePersistenceForControl(oAppComponent);
|
|
316
|
+
var aDirtyFlexObjects = oChangePersistence.getDirtyChanges();
|
|
317
|
+
|
|
318
|
+
return aDirtyFlexObjects.some(function(oFlexObject) {
|
|
319
|
+
if (oFlexObject.getLayer() !== Layer.USER) {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (mPropertyBag.generator && oFlexObject.getSupportInformation().generator !== mPropertyBag.generator) {
|
|
324
|
+
return false;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (mPropertyBag.changeTypes && mPropertyBag.changeTypes.indexOf(oFlexObject.getChangeType()) === -1) {
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
var vSelector = oFlexObject.getSelector();
|
|
332
|
+
return mPropertyBag.selector.getId() === JsControlTreeModifier.getControlIdBySelector(vSelector, oAppComponent);
|
|
333
|
+
});
|
|
334
|
+
},
|
|
335
|
+
|
|
282
336
|
/**
|
|
283
337
|
* Saves unsaved changes to the backend service.
|
|
284
338
|
*
|
|
@@ -337,11 +391,11 @@ sap.ui.define([
|
|
|
337
391
|
* @private
|
|
338
392
|
* @sapui5-restricted sap.ovp
|
|
339
393
|
*/
|
|
340
|
-
isCondensingEnabled: function
|
|
394
|
+
isCondensingEnabled: function() {
|
|
341
395
|
return Settings.getInstance()
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
396
|
+
.then(function(oSettings) {
|
|
397
|
+
return oSettings.isCondensingEnabled(Layer.USER);
|
|
398
|
+
});
|
|
345
399
|
},
|
|
346
400
|
|
|
347
401
|
/**
|
|
@@ -29,17 +29,17 @@ 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
|
|
|
36
36
|
/**
|
|
37
37
|
* Returns the extension point information by view ID.
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
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,8 +50,23 @@ 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
|
+
},
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Adds the ids of controls created in an extension point to the registry.
|
|
59
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
60
|
+
* @param {string} mPropertyBag.name - Name of the extension point
|
|
61
|
+
* @param {object} mPropertyBag.viewId - ID of the view
|
|
62
|
+
* @param {string[]} mPropertyBag.createdControlsIds - Array with the IDs of the created controls
|
|
63
|
+
*/
|
|
64
|
+
addCreatedControlsToExtensionPointInfo: function(mPropertyBag) {
|
|
65
|
+
ExtensionPointRegistry.addCreatedControls(
|
|
66
|
+
mPropertyBag.name,
|
|
67
|
+
mPropertyBag.viewId,
|
|
68
|
+
mPropertyBag.createdControlsIds
|
|
69
|
+
);
|
|
55
70
|
}
|
|
56
71
|
};
|
|
57
72
|
|
|
@@ -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,50 +70,46 @@ 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
|
-
|
|
92
|
-
|
|
91
|
+
// execPromiseQueueSequentially expects promises wrapped inside a function
|
|
92
|
+
return function() {
|
|
93
|
+
oChange.setQueuedForRevert();
|
|
94
|
+
return ChangesWriteAPI.revert({
|
|
93
95
|
change: oChange,
|
|
94
|
-
|
|
95
|
-
})
|
|
96
|
-
.then(function () {
|
|
97
|
-
oChange.setQueuedForRevert();
|
|
98
|
-
return ChangesWriteAPI.revert({
|
|
99
|
-
change: oChange,
|
|
100
|
-
element: oControl
|
|
101
|
-
});
|
|
96
|
+
element: oControl
|
|
102
97
|
});
|
|
103
98
|
};
|
|
104
99
|
});
|
|
105
|
-
|
|
100
|
+
|
|
101
|
+
return PersistenceWriteAPI.remove({
|
|
102
|
+
flexObjects: aReverseChanges,
|
|
103
|
+
selector: oAppComponent
|
|
104
|
+
})
|
|
105
|
+
.then(Utils.execPromiseQueueSequentially.bind(Utils, 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
|
-
PersistenceWriteAPI.add({
|
|
114
|
-
change: oChange,
|
|
115
|
-
selector: oControl
|
|
116
|
-
});
|
|
117
113
|
if (oChange.getState() === States.LifecycleState.PERSISTED) {
|
|
118
114
|
var oChangePersistence = ChangePersistenceFactory.getChangePersistenceForControl(oAppComponent);
|
|
119
115
|
var aDirtyChanges = oChangePersistence.getDirtyChanges();
|
|
@@ -122,7 +118,6 @@ sap.ui.define([
|
|
|
122
118
|
aDirtyChanges.splice(iIndex, 1);
|
|
123
119
|
}
|
|
124
120
|
}
|
|
125
|
-
|
|
126
121
|
return ChangesWriteAPI.apply({
|
|
127
122
|
change: oChange,
|
|
128
123
|
element: oControl,
|
|
@@ -130,6 +125,10 @@ sap.ui.define([
|
|
|
130
125
|
});
|
|
131
126
|
};
|
|
132
127
|
});
|
|
128
|
+
PersistenceWriteAPI.add({
|
|
129
|
+
flexObjects: aChanges,
|
|
130
|
+
selector: oAppComponent
|
|
131
|
+
});
|
|
133
132
|
return Utils.execPromiseQueueSequentially(aApplyQueue);
|
|
134
133
|
};
|
|
135
134
|
|