@openui5/sap.ui.fl 1.108.2 → 1.110.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/.reuse/dep5 +16 -16
- package/THIRDPARTY.txt +2 -2
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +2 -2
- package/src/sap/ui/fl/Cache.js +19 -6
- package/src/sap/ui/fl/ChangePersistence.js +47 -85
- package/src/sap/ui/fl/ChangePersistenceFactory.js +2 -2
- package/src/sap/ui/fl/FakeLrepConnector.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +2 -2
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +2 -2
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +2 -2
- package/src/sap/ui/fl/FlexController.js +27 -27
- package/src/sap/ui/fl/FlexControllerFactory.js +8 -7
- package/src/sap/ui/fl/Layer.js +2 -2
- package/src/sap/ui/fl/LayerUtils.js +4 -4
- package/src/sap/ui/fl/Scenario.js +1 -1
- package/src/sap/ui/fl/Utils.js +70 -297
- package/src/sap/ui/fl/apply/_internal/ChangesController.js +18 -3
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +5 -5
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +35 -83
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +49 -178
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +10 -16
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +11 -16
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +11 -9
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyUtil.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +6 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +2 -2
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector.js +2 -2
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +2 -2
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +3 -2
- package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +2 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +10 -12
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData.js +6 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +2 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +13 -13
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +32 -13
- package/src/sap/ui/fl/apply/_internal/flexObjects/RevertData.js +3 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +20 -5
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +462 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +18 -9
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +3 -2
- package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +235 -0
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +157 -33
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +72 -0
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +28 -3
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +67 -36
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +8 -8
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +6 -4
- package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +2 -13
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +10 -12
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/prepareVariantsMap.js +28 -8
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +2 -2
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +2 -2
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +2 -2
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +2 -2
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +18 -10
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +11 -47
- package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +5 -5
- package/src/sap/ui/fl/changeHandler/AddXML.js +2 -2
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/fl/changeHandler/Base.js +6 -5
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +7 -7
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +21 -19
- package/src/sap/ui/fl/changeHandler/BaseRename.js +7 -7
- package/src/sap/ui/fl/changeHandler/BaseTreeModifier.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +7 -7
- package/src/sap/ui/fl/changeHandler/MoveControls.js +6 -6
- package/src/sap/ui/fl/changeHandler/MoveElements.js +3 -3
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +3 -3
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +3 -3
- package/src/sap/ui/fl/changeHandler/StashControl.js +7 -7
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +6 -6
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +6 -6
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +5 -5
- package/src/sap/ui/fl/changeHandler/common/ChangeCategories.js +1 -1
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +2 -2
- package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +2 -2
- package/src/sap/ui/fl/changeHandler/common/revertAddedControls.js +1 -1
- package/src/sap/ui/fl/changeHandler/condenser/Classification.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +5 -5
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +2 -2
- package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +1 -1
- package/src/sap/ui/fl/designtime/library.designtime.js +1 -1
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +1 -1
- package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +5 -3
- package/src/sap/ui/fl/initial/_internal/Storage.js +2 -2
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +4 -15
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +2 -2
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +3 -3
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +1 -2
- package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +6 -6
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +4 -4
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +4 -4
- package/src/sap/ui/fl/interfaces/Delegate.js +2 -2
- package/src/sap/ui/fl/library.js +47 -48
- package/src/sap/ui/fl/library.support.js +1 -1
- package/src/sap/ui/fl/registry/Settings.js +3 -13
- package/src/sap/ui/fl/requireAsync.js +1 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +5 -3
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +2 -2
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +2 -2
- package/src/sap/ui/fl/support/api/SupportAPI.js +2 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/Component.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +2 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +2 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +2 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +2 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +2 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +8 -8
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +5 -5
- package/src/sap/ui/fl/themes/base/library.source.less +1 -3
- package/src/sap/ui/fl/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/fl/transport/TransportDialog.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +2 -2
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +3 -3
- package/src/sap/ui/fl/util/IFrame.flexibility.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +2 -2
- package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +2 -2
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +2 -2
- package/src/sap/ui/fl/util/getContainerUserInfo.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +2 -2
- package/src/sap/ui/fl/variants/VariantManagement.js +70 -10
- package/src/sap/ui/fl/variants/VariantModel.js +97 -48
- package/src/sap/ui/fl/variants/context/Component.js +1 -2
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +1 -1
- package/src/sap/ui/fl/write/_internal/FlexInfoSession.js +1 -1
- package/src/sap/ui/fl/write/_internal/SaveAs.js +5 -3
- package/src/sap/ui/fl/write/_internal/Storage.js +21 -12
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +3 -5
- package/src/sap/ui/fl/write/_internal/Versions.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +4 -4
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +29 -27
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +10 -5
- package/src/sap/ui/fl/write/_internal/condenser/Utils.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/LastOneWins.js +2 -2
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Reverse.js +3 -3
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Update.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/JsObjectConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +5 -3
- package/src/sap/ui/fl/write/_internal/connectors/LocalStorageConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +31 -19
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +8 -2
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/ObjectStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +5 -2
- package/src/sap/ui/fl/write/_internal/delegates/ODataV4ReadDelegate.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +2 -2
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +3 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +2 -2
- 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 +1 -1
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +18 -17
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +33 -37
- package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +19 -20
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +2 -2
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +7 -7
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +81 -15
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +3 -3
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +6 -4
- package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +2 -2
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +7 -7
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +10 -10
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +1 -1
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +5 -5
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +2 -1
- package/src/sap/ui/fl/write/api/TranslationAPI.js +1 -1
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/Version.js +1 -1
- package/src/sap/ui/fl/write/api/VersionsAPI.js +1 -1
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +2 -2
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +7 -1
- package/ui5.yaml +4 -2
- package/src/sap/ui/fl/Change.js +0 -1092
- package/src/sap/ui/fl/changeHandler/JsControlTreeModifier.js +0 -17
- package/src/sap/ui/fl/changeHandler/XmlTreeModifier.js +0 -17
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +0 -122
- package/src/sap/ui/fl/themes/base/VariantManagement.less +0 -97
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/base/util/isEmptyObject",
|
|
9
|
+
"sap/base/util/isPlainObject",
|
|
10
|
+
"sap/ui/fl/apply/_internal/flexObjects/FlexObject",
|
|
11
|
+
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
12
|
+
"sap/ui/fl/Utils"
|
|
13
|
+
], function(
|
|
14
|
+
isEmptyObject,
|
|
15
|
+
isPlainObject,
|
|
16
|
+
FlexObject,
|
|
17
|
+
States,
|
|
18
|
+
Utils
|
|
19
|
+
) {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Base class for all UI Changes
|
|
24
|
+
*
|
|
25
|
+
* @class Flexibility class UIChange
|
|
26
|
+
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
27
|
+
* @alias sap.ui.fl.apply._internal.flexObjects.UIChange
|
|
28
|
+
* @since 1.109
|
|
29
|
+
* @version 1.110.0
|
|
30
|
+
* @private
|
|
31
|
+
* @ui5-restricted
|
|
32
|
+
*/
|
|
33
|
+
var UIChange = FlexObject.extend("sap.ui.fl.apply._internal.flexObjects.UIChange", /* @lends sap.ui.fl.apply._internal.flexObjects.UIChange.prototype */ {
|
|
34
|
+
metadata: {
|
|
35
|
+
properties: {
|
|
36
|
+
/**
|
|
37
|
+
* Reference to a control that this UIChange is bound to
|
|
38
|
+
*/
|
|
39
|
+
selector: {
|
|
40
|
+
type: "object",
|
|
41
|
+
defaultValue: {}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Additional references to controls that are needed for this UIChange to work properly
|
|
46
|
+
*/
|
|
47
|
+
dependentSelectors: {
|
|
48
|
+
type: "object",
|
|
49
|
+
defaultValue: {}
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Describes the current state of the UIChange regarding the application and reversion of changes.
|
|
54
|
+
*/
|
|
55
|
+
applyState: {
|
|
56
|
+
type: "string",
|
|
57
|
+
defaultValue: States.ApplyState.NEW
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Indicates if the UIChange should be skipped during XML preprocessing
|
|
62
|
+
*/
|
|
63
|
+
jsOnly: {
|
|
64
|
+
type: "boolean"
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* ID of a variant, if the UIChange is part of a variant management control
|
|
69
|
+
*/
|
|
70
|
+
variantReference: {
|
|
71
|
+
type: "string"
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
// TODO: consolidate with other revert data properties
|
|
75
|
+
/**
|
|
76
|
+
* Information with which the UIChange can be reverted
|
|
77
|
+
*/
|
|
78
|
+
revertData: {
|
|
79
|
+
type: "any",
|
|
80
|
+
defaultValue: null
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
aggregations: {},
|
|
84
|
+
associations: {},
|
|
85
|
+
events: {}
|
|
86
|
+
},
|
|
87
|
+
constructor: function() {
|
|
88
|
+
FlexObject.apply(this, arguments);
|
|
89
|
+
|
|
90
|
+
this._oChangeProcessingPromises = {};
|
|
91
|
+
this.setInitialApplyState();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
97
|
+
* @returns {object} Mapping information
|
|
98
|
+
* @static
|
|
99
|
+
*/
|
|
100
|
+
UIChange.getMappingInfo = function() {
|
|
101
|
+
return Object.assign(FlexObject.getMappingInfo(), {
|
|
102
|
+
selector: "selector",
|
|
103
|
+
dependentSelectors: "dependentSelector",
|
|
104
|
+
jsOnly: "jsOnly",
|
|
105
|
+
variantReference: "variantReference"
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
111
|
+
* Can be overridden to avoid access of static mapping within base methods.
|
|
112
|
+
* @returns {object} Mapping information
|
|
113
|
+
*/
|
|
114
|
+
UIChange.prototype.getMappingInfo = function() {
|
|
115
|
+
return UIChange.getMappingInfo();
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
UIChange.prototype.setQueuedForRevert = function() {
|
|
119
|
+
if (this._aQueuedProcesses[this._aQueuedProcesses.length - 1] !== States.Operations.REVERT) {
|
|
120
|
+
this._aQueuedProcesses.unshift(States.Operations.REVERT);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
UIChange.prototype.isQueuedForRevert = function() {
|
|
125
|
+
return this._aQueuedProcesses.indexOf(States.Operations.REVERT) > -1;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
UIChange.prototype.setQueuedForApply = function() {
|
|
129
|
+
// Not optimized application code can result that the change applying is called twice
|
|
130
|
+
// So check if there was already APPLY operation to prevent permanent waitForChangeApplied issue
|
|
131
|
+
// Same applies for setQueuedForRevert
|
|
132
|
+
if (this._aQueuedProcesses[this._aQueuedProcesses.length - 1] !== States.Operations.APPLY) {
|
|
133
|
+
this._aQueuedProcesses.unshift(States.Operations.APPLY);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
UIChange.prototype.isQueuedForApply = function() {
|
|
138
|
+
return this._aQueuedProcesses.indexOf(States.Operations.APPLY) > -1;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
UIChange.prototype.setInitialApplyState = function() {
|
|
142
|
+
this._aQueuedProcesses = [];
|
|
143
|
+
delete this._ignoreOnce;
|
|
144
|
+
this.setApplyState(States.ApplyState.INITIAL);
|
|
145
|
+
this._oChangeProcessedPromise = {};
|
|
146
|
+
this._oChangeProcessedPromise.promise = new Promise(function(resolve) {
|
|
147
|
+
this._oChangeProcessedPromise.resolveFunction = {
|
|
148
|
+
resolve: resolve
|
|
149
|
+
};
|
|
150
|
+
}.bind(this));
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
UIChange.prototype.isInInitialState = function() {
|
|
154
|
+
return (this._aQueuedProcesses.length === 0) && (this.getApplyState() === States.ApplyState.INITIAL);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
UIChange.prototype.isValidForDependencyMap = function() {
|
|
158
|
+
//Change without id in selector should be skipped from adding dependencies process
|
|
159
|
+
return !!this.getSelector().id;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
UIChange.prototype.startApplying = function() {
|
|
163
|
+
this.setApplyState(States.ApplyState.APPLYING);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// Deprecated, use markSuccessful or markFailed instead
|
|
167
|
+
UIChange.prototype.markFinished = function(oResult, bApplySuccessful) {
|
|
168
|
+
this._aQueuedProcesses.pop();
|
|
169
|
+
this._resolveChangeProcessingPromiseWithError(States.Operations.APPLY, oResult);
|
|
170
|
+
var sNewApplyState = bApplySuccessful !== false
|
|
171
|
+
? States.ApplyState.APPLY_SUCCESSFUL
|
|
172
|
+
: States.ApplyState.APPLY_FAILED;
|
|
173
|
+
this.setApplyState(sNewApplyState);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
UIChange.prototype.markSuccessful = function(oResult) {
|
|
177
|
+
this.markFinished(oResult, true);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
UIChange.prototype.markFailed = function(oResult) {
|
|
181
|
+
this.markFinished(oResult, false);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
UIChange.prototype.startReverting = function() {
|
|
185
|
+
this.setApplyState(States.ApplyState.REVERTING);
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
UIChange.prototype.markRevertFinished = function(oResult) {
|
|
189
|
+
this._aQueuedProcesses.pop();
|
|
190
|
+
this._resolveChangeProcessingPromiseWithError(States.Operations.REVERT, oResult);
|
|
191
|
+
this.setApplyState(States.ApplyState.REVERT_FINISHED);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
UIChange.prototype.hasApplyProcessStarted = function() {
|
|
195
|
+
return this.getApplyState() === States.ApplyState.APPLYING;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
UIChange.prototype.isSuccessfullyApplied = function() {
|
|
199
|
+
return this.getApplyState() === States.ApplyState.APPLY_SUCCESSFUL;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
UIChange.prototype.hasApplyProcessFailed = function() {
|
|
203
|
+
return this.getApplyState() === States.ApplyState.APPLY_FAILED;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
UIChange.prototype.isApplyProcessFinished = function() {
|
|
207
|
+
return this.isSuccessfullyApplied() || this.hasApplyProcessFailed();
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
UIChange.prototype.hasRevertProcessStarted = function() {
|
|
211
|
+
return this.getApplyState() === States.ApplyState.REVERTING;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
UIChange.prototype.isRevertProcessFinished = function() {
|
|
215
|
+
return this.getApplyState() === States.ApplyState.REVERT_FINISHED;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
UIChange.prototype.isCurrentProcessFinished = function() {
|
|
219
|
+
return this._aQueuedProcesses.length === 0 && this.getApplyState() !== States.ApplyState.INITIAL;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Adds and returns a promise that resolves as soon as
|
|
224
|
+
* <code>resolveChangeProcessingPromise</code> or <code>resolveChangeProcessingPromiseWithError</code> is called.
|
|
225
|
+
* The promise will always resolve, either without a parameter or with an object and an <code>error</code> parameter inside.
|
|
226
|
+
* At any time, there is only one object for 'apply' or 'revert'. If this function is called multiple times for the same key, only the current promise will be returned.
|
|
227
|
+
*
|
|
228
|
+
* _oChangeProcessingPromises: {
|
|
229
|
+
* States.Operations.APPLY: {
|
|
230
|
+
* promise: <Promise>,
|
|
231
|
+
* resolveFunction: {}
|
|
232
|
+
* },
|
|
233
|
+
* States.Operations.REVERT: {
|
|
234
|
+
* promise: <Promise>,
|
|
235
|
+
* resolveFunction: {}
|
|
236
|
+
* }
|
|
237
|
+
* }
|
|
238
|
+
*
|
|
239
|
+
* @param {string} sKey - Current process, should be either <code>States.Operations.APPLY</code> or <code>States.Operations.REVERT</code>
|
|
240
|
+
* @returns {Promise} Promise
|
|
241
|
+
*/
|
|
242
|
+
UIChange.prototype.addChangeProcessingPromise = function(sKey) {
|
|
243
|
+
if (!this._oChangeProcessingPromises[sKey]) {
|
|
244
|
+
this._oChangeProcessingPromises[sKey] = {};
|
|
245
|
+
this._oChangeProcessingPromises[sKey].promise = new Promise(function(resolve) {
|
|
246
|
+
this._oChangeProcessingPromises[sKey].resolveFunction = {
|
|
247
|
+
resolve: resolve
|
|
248
|
+
};
|
|
249
|
+
}.bind(this));
|
|
250
|
+
}
|
|
251
|
+
return this._oChangeProcessingPromises[sKey].promise;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Calls <code>addChangeProcessingPromise</code> for all currently queued processes.
|
|
256
|
+
*
|
|
257
|
+
* @returns {Promise[]} Array with all promises for every process
|
|
258
|
+
*/
|
|
259
|
+
UIChange.prototype.addChangeProcessingPromises = function() {
|
|
260
|
+
var aReturn = [];
|
|
261
|
+
if (this.getApplyState() === States.ApplyState.INITIAL && this._oChangeProcessedPromise) {
|
|
262
|
+
aReturn.push(this._oChangeProcessedPromise.promise);
|
|
263
|
+
}
|
|
264
|
+
this._aQueuedProcesses.forEach(function(sProcess) {
|
|
265
|
+
aReturn.push(this.addChangeProcessingPromise(sProcess));
|
|
266
|
+
}, this);
|
|
267
|
+
return aReturn;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
UIChange.prototype.addPromiseForApplyProcessing = function() {
|
|
271
|
+
return this.addChangeProcessingPromise(States.Operations.APPLY);
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
UIChange.prototype._resolveChangeProcessingPromiseWithError = function(sKey, oResult) {
|
|
275
|
+
if (this._oChangeProcessingPromises[sKey]) {
|
|
276
|
+
this._oChangeProcessingPromises[sKey].resolveFunction.resolve(oResult);
|
|
277
|
+
delete this._oChangeProcessingPromises[sKey];
|
|
278
|
+
}
|
|
279
|
+
if (this._oChangeProcessedPromise) {
|
|
280
|
+
this._oChangeProcessedPromise.resolveFunction.resolve(oResult);
|
|
281
|
+
this._oChangeProcessedPromise = null;
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
UIChange.prototype.hasRevertData = function() {
|
|
286
|
+
return this.getRevertData() !== null;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
UIChange.prototype.resetRevertData = function() {
|
|
290
|
+
this.setRevertData(null);
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
UIChange.prototype.setDependentSelectors = function(mDependentSelectors) {
|
|
294
|
+
this.setProperty("dependentSelectors", mDependentSelectors);
|
|
295
|
+
delete this._aDependentSelectorList;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Adds the selector to the dependent selector list.
|
|
300
|
+
*
|
|
301
|
+
* @param {(string|sap.ui.core.Control|string[]|sap.ui.core.Control[])} vControl - SAPUI5 control, or ID string, or array of SAPUI5 controls, for which the selector should be determined
|
|
302
|
+
* @param {string} sAlias - Alias under which the dependent object is saved
|
|
303
|
+
* @param {object} mPropertyBag - Property bag
|
|
304
|
+
* @param {sap.ui.core.util.reflection.BaseTreeModifier} mPropertyBag.modifier - Modifier for the controls
|
|
305
|
+
* @param {sap.ui.core.Component} [mPropertyBag.appComponent] - Application component; only needed if <code>vControl</code> is a string or an XML node
|
|
306
|
+
* @param {object} [mAdditionalSelectorInformation] - Additional mapped data which is added to the selector
|
|
307
|
+
*
|
|
308
|
+
* @throws {Exception} oException If <code>sAlias</code> already exists
|
|
309
|
+
*/
|
|
310
|
+
UIChange.prototype.addDependentControl = function(vControl, sAlias, mPropertyBag, mAdditionalSelectorInformation) {
|
|
311
|
+
if (!vControl) {
|
|
312
|
+
throw new Error("Parameter vControl is mandatory");
|
|
313
|
+
}
|
|
314
|
+
if (!sAlias) {
|
|
315
|
+
throw new Error("Parameter sAlias is mandatory");
|
|
316
|
+
}
|
|
317
|
+
if (!mPropertyBag || isEmptyObject(mPropertyBag)) {
|
|
318
|
+
throw new Error("Parameter mPropertyBag is mandatory");
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
var oCurrentDependentSelectors = Object.assign({}, this.getDependentSelectors());
|
|
322
|
+
|
|
323
|
+
if (oCurrentDependentSelectors[sAlias]) {
|
|
324
|
+
throw new Error("Alias '" + sAlias + "' already exists in the change.");
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
var oModifier = mPropertyBag.modifier;
|
|
328
|
+
var oAppComponent = mPropertyBag.appComponent;
|
|
329
|
+
|
|
330
|
+
if (Array.isArray(vControl)) {
|
|
331
|
+
var aSelector = [];
|
|
332
|
+
vControl.forEach(function(oControl) {
|
|
333
|
+
aSelector.push(oModifier.getSelector(oControl, oAppComponent, mAdditionalSelectorInformation));
|
|
334
|
+
});
|
|
335
|
+
oCurrentDependentSelectors[sAlias] = aSelector;
|
|
336
|
+
} else {
|
|
337
|
+
oCurrentDependentSelectors[sAlias] = oModifier.getSelector(vControl, oAppComponent, mAdditionalSelectorInformation);
|
|
338
|
+
}
|
|
339
|
+
this.setDependentSelectors(oCurrentDependentSelectors);
|
|
340
|
+
|
|
341
|
+
//remove dependency list so that it will be created again in method getDependentSelectorList
|
|
342
|
+
delete this._aDependentSelectorList;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Returns the control or array of controls saved under the passed alias.
|
|
347
|
+
*
|
|
348
|
+
* @param {string} sAlias - Retrieves the selectors that have been saved under this alias
|
|
349
|
+
* @param {object} mPropertyBag - Property bag
|
|
350
|
+
* @param {sap.ui.core.util.reflection.BaseTreeModifier} mPropertyBag.modifier - Modifier for the controls
|
|
351
|
+
* @param {sap.ui.core.Component} mPropertyBag.appComponent - Application component needed to retrieve the control from the selector
|
|
352
|
+
* @param {Node} mPropertyBag.view - For XML processing: XML node of the view
|
|
353
|
+
*
|
|
354
|
+
* @returns {array|object} Dependent selector list in <code>selectorPropertyName:selectorPropertyValue</code> format, or the selector saved under the alias
|
|
355
|
+
*/
|
|
356
|
+
UIChange.prototype.getDependentControl = function(sAlias, mPropertyBag) {
|
|
357
|
+
var aDependentControls = [];
|
|
358
|
+
if (!sAlias) {
|
|
359
|
+
throw new Error("Parameter sAlias is mandatory");
|
|
360
|
+
}
|
|
361
|
+
if (!mPropertyBag) {
|
|
362
|
+
throw new Error("Parameter mPropertyBag is mandatory");
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
var oModifier = mPropertyBag.modifier;
|
|
366
|
+
var oAppComponent = mPropertyBag.appComponent;
|
|
367
|
+
|
|
368
|
+
var oDependentSelector = this.getDependentSelectors()[sAlias];
|
|
369
|
+
if (Array.isArray(oDependentSelector)) {
|
|
370
|
+
oDependentSelector.forEach(function(oSelector) {
|
|
371
|
+
aDependentControls.push(oModifier.bySelector(oSelector, oAppComponent, mPropertyBag.view));
|
|
372
|
+
});
|
|
373
|
+
return aDependentControls;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return oModifier.bySelector(oDependentSelector, oAppComponent, mPropertyBag.view);
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Returns all dependent selectors, including the selector from the selector of the change.
|
|
381
|
+
*
|
|
382
|
+
* @returns {array} Dependent selector list
|
|
383
|
+
*/
|
|
384
|
+
UIChange.prototype.getDependentSelectorList = function() {
|
|
385
|
+
var aDependentSelectors = [this.getSelector()];
|
|
386
|
+
|
|
387
|
+
if (!this._aDependentSelectorList) {
|
|
388
|
+
// if there is an 'originalSelector' as dependent the change is made inside a template; this means that the
|
|
389
|
+
// dependent selectors point to the specific clones of the template; those clones don't go through the
|
|
390
|
+
// propagation listener and will never be cleaned up from the dependencies, thus blocking the JS Change Applying
|
|
391
|
+
// therefore all the dependents have to be ignored and the dependents reset to the initial state (only selector)
|
|
392
|
+
if (!this.getOriginalSelector()) {
|
|
393
|
+
Object.entries(this.getDependentSelectors()).some(function(aProperties) {
|
|
394
|
+
var vDependentSelector = aProperties[1];
|
|
395
|
+
|
|
396
|
+
if (!Array.isArray(vDependentSelector)) {
|
|
397
|
+
vDependentSelector = [vDependentSelector];
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
vDependentSelector.forEach(function(oCurrentSelector) {
|
|
401
|
+
if (oCurrentSelector && Utils.indexOfObject(aDependentSelectors, oCurrentSelector) === -1) {
|
|
402
|
+
aDependentSelectors.push(oCurrentSelector);
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
this._aDependentSelectorList = aDependentSelectors;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
return this._aDependentSelectorList;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Returns a list of selectors of the controls that the change depends on, excluding the selector of the change.
|
|
415
|
+
*
|
|
416
|
+
* @returns {array} List of selectors that the change depends on
|
|
417
|
+
*/
|
|
418
|
+
UIChange.prototype.getDependentControlSelectorList = function() {
|
|
419
|
+
var aDependentSelectors = this.getDependentSelectorList().concat();
|
|
420
|
+
|
|
421
|
+
if (aDependentSelectors.length > 0) {
|
|
422
|
+
var oSelector = this.getSelector();
|
|
423
|
+
var iIndex = Utils.indexOfObject(aDependentSelectors, oSelector);
|
|
424
|
+
if (iIndex > -1) {
|
|
425
|
+
aDependentSelectors.splice(iIndex, 1);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return aDependentSelectors;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Returns the 'originalSelector' from the dependent selectors. This is only set in case of changes on a template.
|
|
434
|
+
*
|
|
435
|
+
* @returns {sap.ui.fl.selector} the original selector if available
|
|
436
|
+
*/
|
|
437
|
+
UIChange.prototype.getOriginalSelector = function() {
|
|
438
|
+
return this.getDependentSelectors().originalSelector;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
// TODO: check if extension point changes should have a dedicated class
|
|
442
|
+
/**
|
|
443
|
+
* Sets the extension point information.
|
|
444
|
+
* @param {*} oExtensionPointInfo Extension point information
|
|
445
|
+
*/
|
|
446
|
+
UIChange.prototype.setExtensionPointInfo = function(oExtensionPointInfo) {
|
|
447
|
+
this._oExtensionPointInfo = oExtensionPointInfo;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Gets the extension point information.
|
|
452
|
+
* @returns {*} Extension point information
|
|
453
|
+
*/
|
|
454
|
+
UIChange.prototype.getExtensionPointInfo = function() {
|
|
455
|
+
if (isPlainObject(this._oExtensionPointInfo)) {
|
|
456
|
+
return Object.assign({}, this._oExtensionPointInfo);
|
|
457
|
+
}
|
|
458
|
+
return this._oExtensionPointInfo;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
return UIChange;
|
|
462
|
+
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/
|
|
9
|
-
], function
|
|
10
|
-
|
|
8
|
+
"sap/ui/fl/apply/_internal/flexObjects/UIChange"
|
|
9
|
+
], function(
|
|
10
|
+
UIChange
|
|
11
11
|
) {
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
@@ -16,24 +16,33 @@ sap.ui.define([
|
|
|
16
16
|
* This class also be updated as well as reverted.
|
|
17
17
|
*
|
|
18
18
|
* @class sap.ui.fl.apply._internal.flexObjects.UpdatableChange
|
|
19
|
-
* @extends sap.ui.fl.
|
|
19
|
+
* @extends sap.ui.fl.apply._internal.flexObjects.UIChange
|
|
20
|
+
* @alias sap.ui.fl.apply._internal.flexObjects.UpdatableChange
|
|
20
21
|
* @private
|
|
21
22
|
* @ui5-restricted
|
|
22
23
|
* @experimental Since 1.90.0
|
|
23
24
|
*/
|
|
24
|
-
var UpdatableChange =
|
|
25
|
+
var UpdatableChange = UIChange.extend("sap.ui.fl.apply._internal.flexObjects.UpdatableChange", /** @lends sap.ui.fl.apply._internal.flexObjects.UpdatableChange.prototype */ {
|
|
25
26
|
metadata: {
|
|
26
27
|
aggregations: {
|
|
27
28
|
revertInfo: {
|
|
28
|
-
type: "sap.ui.fl.apply._internal.flexObjects.RevertData"
|
|
29
|
+
type: "sap.ui.base.ManagedObject", // "sap.ui.fl.apply._internal.flexObjects.RevertData"
|
|
29
30
|
multiple: true,
|
|
30
|
-
singularName: "revertInfo"
|
|
31
|
-
defaultValue: []
|
|
31
|
+
singularName: "revertInfo"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
39
|
+
* @returns {object} Mapping information
|
|
40
|
+
* @static
|
|
41
|
+
*/
|
|
42
|
+
UpdatableChange.getMappingInfo = function() {
|
|
43
|
+
return Object.assign(UIChange.getMappingInfo(), {});
|
|
44
|
+
};
|
|
45
|
+
|
|
37
46
|
UpdatableChange.prototype.popLatestRevertInfo = function () {
|
|
38
47
|
var oLatestRevertInfo = this.getRevertInfo().pop();
|
|
39
48
|
this.removeRevertInfo(oLatestRevertInfo);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
@@ -9,6 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
FlexObject
|
|
10
10
|
) {
|
|
11
11
|
"use strict";
|
|
12
|
+
|
|
12
13
|
/**
|
|
13
14
|
* Base class for all variants.
|
|
14
15
|
*
|
|
@@ -16,7 +17,7 @@ sap.ui.define([
|
|
|
16
17
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
17
18
|
* @alias sap.ui.fl.apply._internal.flexObjects.Variant
|
|
18
19
|
* @since 1.103
|
|
19
|
-
* @version 1.
|
|
20
|
+
* @version 1.110.0
|
|
20
21
|
* @private
|
|
21
22
|
* @ui5-restricted sap.ui.fl
|
|
22
23
|
*/
|