@openui5/sap.ui.rta 1.131.1 → 1.132.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 +1 -2
- package/THIRDPARTY.txt +1 -1
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +2 -2
- package/src/sap/ui/rta/Client.js +2 -2
- package/src/sap/ui/rta/RuntimeAuthoring.js +26 -10
- package/src/sap/ui/rta/Utils.js +2 -2
- package/src/sap/ui/rta/api/startAdaptation.js +1 -1
- package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
- package/src/sap/ui/rta/appVariant/Feature.js +1 -1
- package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
- package/src/sap/ui/rta/appVariant/Utils.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +27 -27
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.html +3 -3
- package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
- package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
- package/src/sap/ui/rta/command/AddIFrame.js +2 -2
- package/src/sap/ui/rta/command/AddProperty.js +2 -2
- package/src/sap/ui/rta/command/AddXML.js +2 -2
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/command/AnnotationCommand.js +79 -0
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
- package/src/sap/ui/rta/command/BaseCommand.js +2 -2
- package/src/sap/ui/rta/command/BindProperty.js +6 -8
- package/src/sap/ui/rta/command/Combine.js +2 -2
- package/src/sap/ui/rta/command/CommandFactory.js +3 -3
- package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +9 -5
- package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +8 -6
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +14 -11
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +6 -4
- package/src/sap/ui/rta/command/CreateContainer.js +2 -2
- package/src/sap/ui/rta/command/CustomAdd.js +2 -2
- package/src/sap/ui/rta/command/FlexCommand.js +2 -2
- package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
- package/src/sap/ui/rta/command/LocalReset.js +2 -2
- package/src/sap/ui/rta/command/Move.js +2 -2
- package/src/sap/ui/rta/command/Property.js +2 -2
- package/src/sap/ui/rta/command/Remove.js +2 -2
- package/src/sap/ui/rta/command/Rename.js +2 -2
- package/src/sap/ui/rta/command/Resize.js +2 -2
- package/src/sap/ui/rta/command/Reveal.js +2 -2
- package/src/sap/ui/rta/command/Settings.js +2 -2
- package/src/sap/ui/rta/command/Split.js +2 -2
- package/src/sap/ui/rta/command/Stack.js +2 -2
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +14 -2
- package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +15 -16
- package/src/sap/ui/rta/library.js +3 -3
- package/src/sap/ui/rta/messagebundle.properties +18 -0
- package/src/sap/ui/rta/messagebundle_ar.properties +10 -0
- package/src/sap/ui/rta/messagebundle_bg.properties +13 -3
- package/src/sap/ui/rta/messagebundle_ca.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cnr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cs.properties +10 -0
- package/src/sap/ui/rta/messagebundle_cy.properties +10 -0
- package/src/sap/ui/rta/messagebundle_da.properties +10 -0
- package/src/sap/ui/rta/messagebundle_de.properties +10 -0
- package/src/sap/ui/rta/messagebundle_el.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +347 -325
- package/src/sap/ui/rta/messagebundle_es.properties +10 -0
- package/src/sap/ui/rta/messagebundle_es_MX.properties +18 -8
- package/src/sap/ui/rta/messagebundle_et.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_hu.properties +10 -0
- package/src/sap/ui/rta/messagebundle_id.properties +10 -0
- package/src/sap/ui/rta/messagebundle_it.properties +10 -0
- package/src/sap/ui/rta/messagebundle_iw.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ja.properties +10 -0
- package/src/sap/ui/rta/messagebundle_kk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ko.properties +10 -0
- package/src/sap/ui/rta/messagebundle_lt.properties +10 -0
- package/src/sap/ui/rta/messagebundle_lv.properties +10 -0
- package/src/sap/ui/rta/messagebundle_mk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ms.properties +14 -4
- package/src/sap/ui/rta/messagebundle_nl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_no.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pt.properties +10 -0
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ro.properties +10 -0
- package/src/sap/ui/rta/messagebundle_ru.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sh.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sk.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sl.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_sv.properties +10 -0
- package/src/sap/ui/rta/messagebundle_th.properties +10 -0
- package/src/sap/ui/rta/messagebundle_tr.properties +10 -0
- package/src/sap/ui/rta/messagebundle_uk.properties +11 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +10 -0
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +10 -0
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +10 -0
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
- package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
- package/src/sap/ui/rta/plugin/Combine.js +2 -2
- package/src/sap/ui/rta/plugin/CompVariant.js +4 -2
- package/src/sap/ui/rta/plugin/ControlVariant.js +5 -23
- package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
- package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
- package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
- package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
- package/src/sap/ui/rta/plugin/Plugin.js +15 -13
- package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
- package/src/sap/ui/rta/plugin/Remove.js +2 -2
- package/src/sap/ui/rta/plugin/Rename.js +3 -3
- package/src/sap/ui/rta/plugin/RenameHandler.js +5 -9
- package/src/sap/ui/rta/plugin/Resize.js +3 -3
- package/src/sap/ui/rta/plugin/Selection.js +2 -2
- package/src/sap/ui/rta/plugin/Settings.js +2 -21
- package/src/sap/ui/rta/plugin/Split.js +2 -2
- package/src/sap/ui/rta/plugin/Stretch.js +7 -5
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -126
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +28 -31
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +141 -172
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +108 -137
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +96 -141
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +112 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +183 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +109 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +239 -0
- package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +15 -0
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +3 -3
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
- package/src/sap/ui/rta/service/Action.js +2 -2
- package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
- package/src/sap/ui/rta/service/Outline.js +2 -2
- package/src/sap/ui/rta/service/Property.js +2 -2
- package/src/sap/ui/rta/service/Receiver.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +2 -2
- package/src/sap/ui/rta/service/SupportTools.js +2 -2
- package/src/sap/ui/rta/service/index.js +1 -1
- package/src/sap/ui/rta/themes/base/WhatsNew.less +5 -0
- package/src/sap/ui/rta/themes/base/library.source.less +1 -1
- package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/rta/toolbar/Adaptation.js +2 -2
- package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +2 -2
- package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +3 -4
- package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
- package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
- package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +1 -1
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -2
- package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
- package/src/sap/ui/rta/util/Animation.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +16 -10
- package/src/sap/ui/rta/util/PopupManager.js +3 -3
- package/src/sap/ui/rta/util/ReloadManager.js +9 -9
- package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
- package/src/sap/ui/rta/util/ServiceManager.js +2 -2
- package/src/sap/ui/rta/util/adaptationStarter.js +17 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
- package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +5 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
- package/src/sap/ui/rta/util/hasStableId.js +1 -1
- package/src/sap/ui/rta/util/showMessageBox.js +1 -1
- package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
- package/src/sap/ui/rta/util/validateStableIds.js +1 -1
- package/src/sap/ui/rta/util/validateText.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +2 -2
- package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +5 -4
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +8 -2
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +1 -1
- package/src/sap/ui/rta/command/Annotation.js +0 -45
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -384,7 +384,7 @@ sap.ui.define([
|
|
|
384
384
|
noSelector: true
|
|
385
385
|
},
|
|
386
386
|
annotation: {
|
|
387
|
-
clazz: "sap/ui/rta/command/
|
|
387
|
+
clazz: "sap/ui/rta/command/AnnotationCommand",
|
|
388
388
|
noSelector: true
|
|
389
389
|
},
|
|
390
390
|
addIFrame: {
|
|
@@ -493,7 +493,7 @@ sap.ui.define([
|
|
|
493
493
|
* @extends sap.ui.base.ManagedObject
|
|
494
494
|
*
|
|
495
495
|
* @author SAP SE
|
|
496
|
-
* @version 1.
|
|
496
|
+
* @version 1.132.0
|
|
497
497
|
*
|
|
498
498
|
* @constructor
|
|
499
499
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
22
|
*
|
|
23
23
|
* @author SAP SE
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.132.0
|
|
25
25
|
*
|
|
26
26
|
* @constructor
|
|
27
27
|
* @private
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
7
7
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
8
8
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
9
9
|
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
10
|
+
"sap/ui/fl/variants/VariantManager",
|
|
10
11
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
11
12
|
"sap/ui/fl/Utils",
|
|
12
13
|
"sap/ui/rta/command/BaseCommand",
|
|
@@ -15,6 +16,7 @@ sap.ui.define([
|
|
|
15
16
|
JsControlTreeModifier,
|
|
16
17
|
ControlVariantApplyAPI,
|
|
17
18
|
FlexRuntimeInfoAPI,
|
|
19
|
+
VariantManager,
|
|
18
20
|
ChangesWriteAPI,
|
|
19
21
|
FlUtils,
|
|
20
22
|
BaseCommand,
|
|
@@ -28,7 +30,7 @@ sap.ui.define([
|
|
|
28
30
|
* @class
|
|
29
31
|
* @extends sap.ui.rta.command.BaseCommand
|
|
30
32
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
33
|
+
* @version 1.132.0
|
|
32
34
|
* @constructor
|
|
33
35
|
* @private
|
|
34
36
|
* @since 1.52
|
|
@@ -99,7 +101,7 @@ sap.ui.define([
|
|
|
99
101
|
this.getChanges().forEach(function(mChangeProperties) {
|
|
100
102
|
mChangeProperties.appComponent = this.oAppComponent;
|
|
101
103
|
mChangeProperties.generator = rtaLibrary.GENERATOR_NAME;
|
|
102
|
-
this._aPreparedChanges.push(
|
|
104
|
+
this._aPreparedChanges.push(VariantManager.addVariantChange(this.sVariantManagementReference, mChangeProperties));
|
|
103
105
|
}.bind(this));
|
|
104
106
|
|
|
105
107
|
this._aDeletedFlexObjects = ChangesWriteAPI.deleteVariantsAndRelatedObjects({
|
|
@@ -125,7 +127,9 @@ sap.ui.define([
|
|
|
125
127
|
delete this._aDeletedFlexObjects;
|
|
126
128
|
|
|
127
129
|
this.getChanges().forEach(function(mChangeProperties, index) {
|
|
128
|
-
const mPropertyBag = {
|
|
130
|
+
const mPropertyBag = {
|
|
131
|
+
appComponent: this.oAppComponent
|
|
132
|
+
};
|
|
129
133
|
Object.keys(mChangeProperties).forEach(function(sProperty) {
|
|
130
134
|
var sOriginalProperty = `original${sProperty.charAt(0).toUpperCase()}${sProperty.substr(1)}`;
|
|
131
135
|
if (sProperty === "visible") {
|
|
@@ -138,7 +142,7 @@ sap.ui.define([
|
|
|
138
142
|
}
|
|
139
143
|
});
|
|
140
144
|
var oChange = this._aPreparedChanges[index];
|
|
141
|
-
|
|
145
|
+
VariantManager.deleteVariantChange(this.sVariantManagementReference, mPropertyBag, oChange);
|
|
142
146
|
}.bind(this));
|
|
143
147
|
|
|
144
148
|
this._aPreparedChanges = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @class
|
|
21
21
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.132.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @since 1.86
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
7
7
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
8
|
+
"sap/ui/fl/variants/VariantManager",
|
|
8
9
|
"sap/ui/fl/write/api/ContextSharingAPI",
|
|
9
10
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
10
11
|
"sap/ui/fl/Utils",
|
|
@@ -13,6 +14,7 @@ sap.ui.define([
|
|
|
13
14
|
"sap/ui/rta/Utils"
|
|
14
15
|
], function(
|
|
15
16
|
JsControlTreeModifier,
|
|
17
|
+
VariantManager,
|
|
16
18
|
ContextSharingAPI,
|
|
17
19
|
PersistenceWriteAPI,
|
|
18
20
|
flUtils,
|
|
@@ -28,7 +30,7 @@ sap.ui.define([
|
|
|
28
30
|
* @class
|
|
29
31
|
* @extends sap.ui.rta.command.BaseCommand
|
|
30
32
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
33
|
+
* @version 1.132.0
|
|
32
34
|
* @constructor
|
|
33
35
|
* @private
|
|
34
36
|
* @since 1.86
|
|
@@ -115,7 +117,7 @@ sap.ui.define([
|
|
|
115
117
|
mParams.layer = this.sLayer;
|
|
116
118
|
mParams.newVariantReference = this.sNewVariantReference;
|
|
117
119
|
mParams.generator = rtaLibrary.GENERATOR_NAME;
|
|
118
|
-
return
|
|
120
|
+
return VariantManager.handleSaveEvent(this.oVariantManagementControl, mParams, this.oModel)
|
|
119
121
|
.then(function(aDirtyChanges) {
|
|
120
122
|
this._aPreparedChanges = aDirtyChanges;
|
|
121
123
|
[this._oVariantChange] = aDirtyChanges;
|
|
@@ -151,11 +153,11 @@ sap.ui.define([
|
|
|
151
153
|
variant: this._oVariantChange,
|
|
152
154
|
sourceVariantReference: this.getSourceVariantReference(),
|
|
153
155
|
variantManagementReference: this.sVariantManagementReference,
|
|
154
|
-
|
|
156
|
+
appComponent: this.oAppComponent
|
|
155
157
|
};
|
|
156
158
|
|
|
157
|
-
await
|
|
158
|
-
await
|
|
159
|
+
await VariantManager.removeVariant(mPropertyBag, true);
|
|
160
|
+
await VariantManager.addAndApplyChangesOnVariant(this._aControlChangesWithoutVariant, this.oAppComponent);
|
|
159
161
|
this._aPreparedChanges = null;
|
|
160
162
|
this._oVariantChange = null;
|
|
161
163
|
}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
7
|
-
"sap/ui/rta/command/BaseCommand",
|
|
8
|
-
"sap/ui/rta/library",
|
|
9
7
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
10
8
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
11
|
-
"sap/ui/fl/
|
|
9
|
+
"sap/ui/fl/variants/VariantManager",
|
|
10
|
+
"sap/ui/fl/Utils",
|
|
11
|
+
"sap/ui/rta/command/BaseCommand",
|
|
12
|
+
"sap/ui/rta/library"
|
|
12
13
|
], function(
|
|
13
|
-
BaseCommand,
|
|
14
|
-
rtaLibrary,
|
|
15
14
|
JsControlTreeModifier,
|
|
16
15
|
ControlVariantApplyAPI,
|
|
17
|
-
|
|
16
|
+
VariantManager,
|
|
17
|
+
flUtils,
|
|
18
|
+
BaseCommand,
|
|
19
|
+
rtaLibrary
|
|
18
20
|
) {
|
|
19
21
|
"use strict";
|
|
20
22
|
|
|
@@ -24,7 +26,7 @@ sap.ui.define([
|
|
|
24
26
|
* @class
|
|
25
27
|
* @extends sap.ui.rta.command.BaseCommand
|
|
26
28
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
29
|
+
* @version 1.132.0
|
|
28
30
|
* @constructor
|
|
29
31
|
* @private
|
|
30
32
|
* @since 1.50
|
|
@@ -87,7 +89,7 @@ sap.ui.define([
|
|
|
87
89
|
generator: rtaLibrary.GENERATOR_NAME
|
|
88
90
|
};
|
|
89
91
|
|
|
90
|
-
return Promise.resolve(
|
|
92
|
+
return Promise.resolve(VariantManager.addVariantChange(this.sVariantManagementReference, mPropertyBag))
|
|
91
93
|
.then(function(oChange) {
|
|
92
94
|
this._oVariantChange = oChange;
|
|
93
95
|
}.bind(this));
|
|
@@ -102,11 +104,12 @@ sap.ui.define([
|
|
|
102
104
|
var mPropertyBag = {
|
|
103
105
|
variantReference: this.sCurrentVariant,
|
|
104
106
|
changeType: "setTitle",
|
|
105
|
-
title: this.getOldText()
|
|
107
|
+
title: this.getOldText(),
|
|
108
|
+
appComponent: this.oAppComponent
|
|
106
109
|
};
|
|
107
110
|
var oChange = this._oVariantChange;
|
|
108
111
|
|
|
109
|
-
return Promise.resolve(
|
|
112
|
+
return Promise.resolve(VariantManager.deleteVariantChange(this.sVariantManagementReference, mPropertyBag, oChange))
|
|
110
113
|
.then(function() {
|
|
111
114
|
this._oVariantChange = null;
|
|
112
115
|
}.bind(this));
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
7
7
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
8
8
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
9
|
+
"sap/ui/fl/variants/VariantManager",
|
|
9
10
|
"sap/ui/fl/Utils",
|
|
10
11
|
"sap/ui/rta/command/BaseCommand"
|
|
11
12
|
], function(
|
|
12
13
|
JsControlTreeModifier,
|
|
13
14
|
ControlVariantApplyAPI,
|
|
15
|
+
VariantManager,
|
|
14
16
|
flUtils,
|
|
15
17
|
BaseCommand
|
|
16
18
|
) {
|
|
@@ -22,7 +24,7 @@ sap.ui.define([
|
|
|
22
24
|
* @class
|
|
23
25
|
* @extends sap.ui.rta.command.BaseCommand
|
|
24
26
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
27
|
+
* @version 1.132.0
|
|
26
28
|
* @constructor
|
|
27
29
|
* @private
|
|
28
30
|
* @since 1.50
|
|
@@ -59,7 +61,7 @@ sap.ui.define([
|
|
|
59
61
|
});
|
|
60
62
|
|
|
61
63
|
function discardVariantContent(sVReference) {
|
|
62
|
-
return
|
|
64
|
+
return VariantManager.eraseDirtyChangesOnVariant(this.sVariantManagementReference, sVReference, this._getAppComponent())
|
|
63
65
|
.then(function(aDirtyChanges) {
|
|
64
66
|
this.setDiscardedChanges(aDirtyChanges);
|
|
65
67
|
}.bind(this));
|
|
@@ -107,7 +109,7 @@ sap.ui.define([
|
|
|
107
109
|
.then(function() {
|
|
108
110
|
// When discarding, dirty changes on source variant need to be applied AFTER the switch
|
|
109
111
|
if (this.getDiscardVariantContent()) {
|
|
110
|
-
return
|
|
112
|
+
return VariantManager.addAndApplyChangesOnVariant(this.getDiscardedChanges(), this._getAppComponent())
|
|
111
113
|
.then(function() {
|
|
112
114
|
this.setDiscardedChanges([]);
|
|
113
115
|
this.oModel.checkUpdate(true);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
12
12
|
* @class
|
|
13
13
|
* @extends sap.ui.rta.command.FlexCommand
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.132.0
|
|
16
16
|
* @constructor
|
|
17
17
|
* @private
|
|
18
18
|
* @since 1.34
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
12
12
|
* @class
|
|
13
13
|
* @extends sap.ui.rta.command.FlexCommand
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.132.0
|
|
16
16
|
* @constructor
|
|
17
17
|
* @private
|
|
18
18
|
* @since 1.62
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @extends sap.ui.rta.command.BaseCommand
|
|
36
36
|
*
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.132.0
|
|
39
39
|
*
|
|
40
40
|
* @constructor
|
|
41
41
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class
|
|
28
28
|
* @extends sap.ui.base.ManagedObject
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.132.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @private
|
|
33
33
|
* @since 1.42
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @class
|
|
21
21
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.132.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @since 1.90
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -17,7 +17,7 @@ function(
|
|
|
17
17
|
* @class
|
|
18
18
|
* @extends sap.ui.rta.command.FlexCommand
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.132.0
|
|
21
21
|
* @constructor
|
|
22
22
|
* @private
|
|
23
23
|
* @since 1.34
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @class
|
|
17
17
|
* @extends sap.ui.rta.command.FlexCommand
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.132.0
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @since 1.34
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
12
12
|
* @class
|
|
13
13
|
* @extends sap.ui.rta.command.FlexCommand
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.132.0
|
|
16
16
|
* @constructor
|
|
17
17
|
* @private
|
|
18
18
|
* @since 1.42
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
12
12
|
* @class
|
|
13
13
|
* @extends sap.ui.rta.command.FlexCommand
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.132.0
|
|
16
16
|
* @constructor
|
|
17
17
|
* @private
|
|
18
18
|
* @since 1.34
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @class
|
|
17
17
|
* @extends sap.ui.rta.command.FlexCommand
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.132.0
|
|
20
20
|
* @constructor
|
|
21
21
|
* @private
|
|
22
22
|
* @since 1.101
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
12
12
|
* @class
|
|
13
13
|
* @extends sap.ui.rta.command.FlexCommand
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.132.0
|
|
16
16
|
* @constructor
|
|
17
17
|
* @private
|
|
18
18
|
* @since 1.44
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
|
|
|
12
12
|
* @class
|
|
13
13
|
* @extends sap.ui.rta.command.FlexCommand
|
|
14
14
|
* @author SAP SE
|
|
15
|
-
* @version 1.
|
|
15
|
+
* @version 1.132.0
|
|
16
16
|
* @constructor
|
|
17
17
|
* @private
|
|
18
18
|
* @since 1.44
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -14,7 +14,7 @@ sap.ui.define([
|
|
|
14
14
|
* @class
|
|
15
15
|
* @extends sap.ui.rta.command.FlexCommand
|
|
16
16
|
* @author SAP SE
|
|
17
|
-
* @version 1.
|
|
17
|
+
* @version 1.132.0
|
|
18
18
|
* @constructor
|
|
19
19
|
* @private
|
|
20
20
|
* @since 1.46
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -73,7 +73,7 @@ sap.ui.define([
|
|
|
73
73
|
* @class
|
|
74
74
|
* @extends sap.ui.base.ManagedObject
|
|
75
75
|
* @author SAP SE
|
|
76
|
-
* @version 1.
|
|
76
|
+
* @version 1.132.0
|
|
77
77
|
* @constructor
|
|
78
78
|
* @private
|
|
79
79
|
* @since 1.34
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* @extends sap.ui.rta.command.AppDescriptorCommand
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.132.0
|
|
23
23
|
*
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @class
|
|
21
21
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.132.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @since 1.102
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @class
|
|
21
21
|
* @extends sap.ui.rta.command.BaseCommand
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.132.0
|
|
24
24
|
* @constructor
|
|
25
25
|
* @private
|
|
26
26
|
* @since 1.87
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* @class
|
|
19
19
|
* @extends sap.ui.rta.command.BaseCommand
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.132.0
|
|
22
22
|
* @constructor
|
|
23
23
|
* @private
|
|
24
24
|
* @since 1.87
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2025 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([
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
* @class
|
|
23
23
|
* @extends sap.ui.rta.command.BaseCommand
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.132.0
|
|
26
26
|
* @constructor
|
|
27
27
|
* @private
|
|
28
28
|
* @since 1.87
|
|
@@ -41,6 +41,9 @@ sap.ui.define([
|
|
|
41
41
|
oldDefaultVariantId: {
|
|
42
42
|
type: "string"
|
|
43
43
|
},
|
|
44
|
+
oldSelectedVariantId: {
|
|
45
|
+
type: "string"
|
|
46
|
+
},
|
|
44
47
|
onlySave: {
|
|
45
48
|
type: "boolean"
|
|
46
49
|
},
|
|
@@ -91,6 +94,11 @@ sap.ui.define([
|
|
|
91
94
|
if (oValue.deleted) {
|
|
92
95
|
callFlAPIFunction.call(this, "removeVariant", sVariantId, {});
|
|
93
96
|
this.getElement().removeVariant({variantId: sVariantId});
|
|
97
|
+
// Redo of delete command without direct UI interaction in VM dialog can keep deleted variant in the control.
|
|
98
|
+
// In this case we need to reactivate the *standard* variant
|
|
99
|
+
if (this.getElement().getCurrentVariantId() === sVariantId) {
|
|
100
|
+
this.getElement().activateVariant("*standard*");
|
|
101
|
+
}
|
|
94
102
|
} else {
|
|
95
103
|
var oVariant = callFlAPIFunction.call(this, "updateVariantMetadata", sVariantId, oValue);
|
|
96
104
|
this.getElement().updateVariant(oVariant);
|
|
@@ -119,6 +127,10 @@ sap.ui.define([
|
|
|
119
127
|
var oVariant = callFlAPIFunction.call(this, "revert", sVariantId, {});
|
|
120
128
|
if (oValue.deleted) {
|
|
121
129
|
this.getElement().addVariant(oVariant);
|
|
130
|
+
// If the current selected variant is deleted, the undo action should reactivate it
|
|
131
|
+
if (this.getOldSelectedVariantId() === sVariantId) {
|
|
132
|
+
this.getElement().activateVariant(sVariantId);
|
|
133
|
+
}
|
|
122
134
|
} else {
|
|
123
135
|
this.getElement().updateVariant(oVariant);
|
|
124
136
|
}
|