@openui5/sap.ui.rta 1.120.7 → 1.121.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.
Files changed (164) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +1 -1
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +507 -759
  7. package/src/sap/ui/rta/Utils.js +1 -146
  8. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
  9. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +3 -3
  11. package/src/sap/ui/rta/appVariant/Utils.js +3 -3
  12. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +5 -3
  13. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_bg.properties +1 -1
  14. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saprigi.properties +27 -27
  15. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_et.properties +1 -1
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fi.properties +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr.properties +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_kk.properties +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_lv.properties +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_mk.properties +1 -1
  21. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ru.properties +1 -1
  22. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_th.properties +1 -1
  23. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  24. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  25. package/src/sap/ui/rta/command/AddXML.js +1 -1
  26. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +3 -3
  27. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  28. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  29. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  30. package/src/sap/ui/rta/command/Combine.js +1 -1
  31. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  32. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  33. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  34. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  35. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -5
  36. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  37. package/src/sap/ui/rta/command/ControlVariantSwitch.js +10 -4
  38. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  39. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  40. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  41. package/src/sap/ui/rta/command/LREPSerializer.js +4 -3
  42. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  43. package/src/sap/ui/rta/command/Move.js +1 -1
  44. package/src/sap/ui/rta/command/Property.js +1 -1
  45. package/src/sap/ui/rta/command/Remove.js +1 -1
  46. package/src/sap/ui/rta/command/Rename.js +1 -1
  47. package/src/sap/ui/rta/command/Resize.js +1 -1
  48. package/src/sap/ui/rta/command/Reveal.js +1 -1
  49. package/src/sap/ui/rta/command/Settings.js +1 -1
  50. package/src/sap/ui/rta/command/Split.js +1 -1
  51. package/src/sap/ui/rta/command/Stack.js +23 -1
  52. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  53. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  54. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  55. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  56. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  57. package/src/sap/ui/rta/enablement/elementActionTest.js +180 -258
  58. package/src/sap/ui/rta/library.js +3 -2
  59. package/src/sap/ui/rta/messagebundle.properties +8 -0
  60. package/src/sap/ui/rta/messagebundle_ar.properties +4 -0
  61. package/src/sap/ui/rta/messagebundle_bg.properties +5 -1
  62. package/src/sap/ui/rta/messagebundle_ca.properties +4 -0
  63. package/src/sap/ui/rta/messagebundle_cnr.properties +5 -1
  64. package/src/sap/ui/rta/messagebundle_cs.properties +4 -0
  65. package/src/sap/ui/rta/messagebundle_cy.properties +8 -4
  66. package/src/sap/ui/rta/messagebundle_da.properties +4 -0
  67. package/src/sap/ui/rta/messagebundle_de.properties +5 -1
  68. package/src/sap/ui/rta/messagebundle_el.properties +4 -0
  69. package/src/sap/ui/rta/messagebundle_en.properties +4 -0
  70. package/src/sap/ui/rta/messagebundle_en_GB.properties +4 -0
  71. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +322 -318
  72. package/src/sap/ui/rta/messagebundle_es.properties +4 -0
  73. package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -1
  74. package/src/sap/ui/rta/messagebundle_et.properties +6 -2
  75. package/src/sap/ui/rta/messagebundle_fi.properties +4 -0
  76. package/src/sap/ui/rta/messagebundle_fr.properties +5 -1
  77. package/src/sap/ui/rta/messagebundle_fr_CA.properties +4 -0
  78. package/src/sap/ui/rta/messagebundle_hi.properties +4 -0
  79. package/src/sap/ui/rta/messagebundle_hr.properties +6 -2
  80. package/src/sap/ui/rta/messagebundle_hu.properties +4 -0
  81. package/src/sap/ui/rta/messagebundle_id.properties +5 -1
  82. package/src/sap/ui/rta/messagebundle_it.properties +10 -6
  83. package/src/sap/ui/rta/messagebundle_iw.properties +9 -5
  84. package/src/sap/ui/rta/messagebundle_ja.properties +4 -0
  85. package/src/sap/ui/rta/messagebundle_kk.properties +4 -0
  86. package/src/sap/ui/rta/messagebundle_ko.properties +4 -0
  87. package/src/sap/ui/rta/messagebundle_lt.properties +5 -1
  88. package/src/sap/ui/rta/messagebundle_lv.properties +11 -7
  89. package/src/sap/ui/rta/messagebundle_mk.properties +15 -11
  90. package/src/sap/ui/rta/messagebundle_ms.properties +5 -1
  91. package/src/sap/ui/rta/messagebundle_nl.properties +4 -0
  92. package/src/sap/ui/rta/messagebundle_no.properties +4 -0
  93. package/src/sap/ui/rta/messagebundle_pl.properties +5 -1
  94. package/src/sap/ui/rta/messagebundle_pt.properties +4 -0
  95. package/src/sap/ui/rta/messagebundle_pt_PT.properties +4 -0
  96. package/src/sap/ui/rta/messagebundle_ro.properties +8 -4
  97. package/src/sap/ui/rta/messagebundle_ru.properties +5 -1
  98. package/src/sap/ui/rta/messagebundle_sh.properties +5 -1
  99. package/src/sap/ui/rta/messagebundle_sk.properties +4 -0
  100. package/src/sap/ui/rta/messagebundle_sl.properties +7 -3
  101. package/src/sap/ui/rta/messagebundle_sr.properties +6 -2
  102. package/src/sap/ui/rta/messagebundle_sv.properties +4 -0
  103. package/src/sap/ui/rta/messagebundle_th.properties +9 -5
  104. package/src/sap/ui/rta/messagebundle_tr.properties +7 -3
  105. package/src/sap/ui/rta/messagebundle_uk.properties +5 -1
  106. package/src/sap/ui/rta/messagebundle_vi.properties +4 -0
  107. package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -1
  108. package/src/sap/ui/rta/messagebundle_zh_TW.properties +6 -2
  109. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +16 -11
  110. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  111. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  112. package/src/sap/ui/rta/plugin/CompVariant.js +43 -1
  113. package/src/sap/ui/rta/plugin/ControlVariant.js +3 -2
  114. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  115. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  116. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  117. package/src/sap/ui/rta/plugin/EasyAdd.js +2 -2
  118. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  119. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  120. package/src/sap/ui/rta/plugin/Plugin.js +18 -10
  121. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  122. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  123. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  124. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -2
  125. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  126. package/src/sap/ui/rta/plugin/Selection.js +24 -9
  127. package/src/sap/ui/rta/plugin/Settings.js +17 -15
  128. package/src/sap/ui/rta/plugin/Split.js +1 -1
  129. package/src/sap/ui/rta/plugin/Stretch.js +14 -13
  130. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  131. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  132. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +134 -67
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  134. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +6 -2
  135. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  136. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +57 -47
  137. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +21 -8
  138. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +56 -41
  139. package/src/sap/ui/rta/service/Action.js +1 -1
  140. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  141. package/src/sap/ui/rta/service/Outline.js +22 -18
  142. package/src/sap/ui/rta/service/Property.js +1 -1
  143. package/src/sap/ui/rta/service/Selection.js +1 -1
  144. package/src/sap/ui/rta/service/SupportTools.js +23 -19
  145. package/src/sap/ui/rta/toolbar/Adaptation.js +16 -18
  146. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  147. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  148. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  149. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  150. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  151. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  152. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  153. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  154. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +12 -5
  155. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  156. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  157. package/src/sap/ui/rta/util/ReloadManager.js +19 -59
  158. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  159. package/src/sap/ui/rta/util/ServiceManager.js +193 -0
  160. package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
  161. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +90 -45
  162. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +32 -25
  163. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +98 -132
  164. package/LICENSES/BSD-2-Clause.txt +0 -22
@@ -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.120.7
24
+ * @version 1.121.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.rta.command.BaseCommand
26
26
  * @author SAP SE
27
- * @version 1.120.7
27
+ * @version 1.121.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.52
@@ -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.120.7
23
+ * @version 1.121.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.86
@@ -4,7 +4,6 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/core/Core",
8
7
  "sap/ui/core/util/reflection/JsControlTreeModifier",
9
8
  "sap/ui/fl/Utils",
10
9
  "sap/ui/fl/write/api/ContextSharingAPI",
@@ -12,7 +11,6 @@ sap.ui.define([
12
11
  "sap/ui/rta/library",
13
12
  "sap/ui/rta/Utils"
14
13
  ], function(
15
- Core,
16
14
  JsControlTreeModifier,
17
15
  flUtils,
18
16
  ContextSharingAPI,
@@ -28,7 +26,7 @@ sap.ui.define([
28
26
  * @class
29
27
  * @extends sap.ui.rta.command.BaseCommand
30
28
  * @author SAP SE
31
- * @version 1.120.7
29
+ * @version 1.121.0
32
30
  * @constructor
33
31
  * @private
34
32
  * @since 1.86
@@ -107,7 +105,10 @@ sap.ui.define([
107
105
  */
108
106
  ControlVariantSaveAs.prototype.execute = function() {
109
107
  var sSourceVariantReference = this.getSourceVariantReference();
110
- this._aControlChanges = this.oModel.getVariant(sSourceVariantReference, this.sVariantManagementReference).controlChanges;
108
+ // once a change is saved to a variant it will automatically be restored by the VariantModel
109
+ this._aControlChangesWithoutVariant = this.oModel.getVariant(sSourceVariantReference, this.sVariantManagementReference)
110
+ .controlChanges
111
+ .filter((oFlexObject) => !oFlexObject.getSavedToVariant());
111
112
  var mParams = this.getNewVariantParameters();
112
113
  mParams.layer = this.sLayer;
113
114
  mParams.newVariantReference = this.sNewVariantReference;
@@ -150,7 +151,8 @@ sap.ui.define([
150
151
 
151
152
  return this.oModel.removeVariant(mPropertyBag, true)
152
153
  .then(function() {
153
- return this.oModel.addAndApplyChangesOnVariant(this._aControlChanges);
154
+ const aRelevantChanges = this._aControlChangesWithoutVariant;
155
+ return this.oModel.addAndApplyChangesOnVariant(aRelevantChanges);
154
156
  }.bind(this))
155
157
  .then(function() {
156
158
  this._aPreparedChanges = null;
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.rta.command.BaseCommand
26
26
  * @author SAP SE
27
- * @version 1.120.7
27
+ * @version 1.121.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.50
@@ -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.120.7
25
+ * @version 1.121.0
26
26
  * @constructor
27
27
  * @private
28
28
  * @since 1.50
@@ -40,6 +40,12 @@ sap.ui.define([
40
40
  },
41
41
  discardVariantContent: {
42
42
  type: "boolean"
43
+ },
44
+ /**
45
+ * Discarded changes when user switches from a dirty variant choosing "discard"
46
+ */
47
+ discardedChanges: {
48
+ type: "array"
43
49
  }
44
50
  },
45
51
  associations: {},
@@ -55,7 +61,7 @@ sap.ui.define([
55
61
  function discardVariantContent(sVReference) {
56
62
  return this.oModel.eraseDirtyChangesOnVariant(this.sVariantManagementReference, sVReference)
57
63
  .then(function(aDirtyChanges) {
58
- this._aSourceVariantDirtyChanges = aDirtyChanges;
64
+ this.setDiscardedChanges(aDirtyChanges);
59
65
  }.bind(this));
60
66
  }
61
67
 
@@ -101,9 +107,9 @@ sap.ui.define([
101
107
  .then(function() {
102
108
  // When discarding, dirty changes on source variant need to be applied AFTER the switch
103
109
  if (this.getDiscardVariantContent()) {
104
- return this.oModel.addAndApplyChangesOnVariant(this._aSourceVariantDirtyChanges)
110
+ return this.oModel.addAndApplyChangesOnVariant(this.getDiscardedChanges())
105
111
  .then(function() {
106
- this._aSourceVariantDirtyChanges = null;
112
+ this.setDiscardedChanges([]);
107
113
  this.oModel.checkUpdate(true);
108
114
  }.bind(this));
109
115
  }
@@ -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.120.7
15
+ * @version 1.121.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.34
@@ -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.120.7
15
+ * @version 1.121.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.62
@@ -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.120.7
38
+ * @version 1.121.0
39
39
  *
40
40
  * @constructor
41
41
  * @private
@@ -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.120.7
30
+ * @version 1.121.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.42
@@ -154,7 +154,8 @@ sap.ui.define([
154
154
  };
155
155
  /**
156
156
  * Serializes and saves all changes to LREP
157
- * In case of Base Applications (no App Variants) the App Descriptor Changes and UI Changes are saved in different Flex Persistence instances,
157
+ * In case of Base Applications (no App Variants) the App Descriptor Changes
158
+ * and UI Changes are saved in different Flex Persistence instances,
158
159
  * so we have to call save twice. For App Variants all the changes are saved in one place.
159
160
  * @param {object} mPropertyBag - Property bag
160
161
  * @param {boolean} mPropertyBag.saveAsDraft - save the changes as a draft
@@ -186,7 +187,7 @@ sap.ui.define([
186
187
  });
187
188
  }.bind(this))
188
189
  .then(function() {
189
- Log.info("UI adaptation successfully transfered changes to layered repository");
190
+ Log.info("UI adaptation successfully wrote changes to the persistence");
190
191
  this.getCommandStack().setSaved(true);
191
192
  this.getCommandStack().removeAllCommands();
192
193
  }.bind(this));
@@ -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.120.7
23
+ * @version 1.121.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.90
@@ -17,7 +17,7 @@ function(
17
17
  * @class
18
18
  * @extends sap.ui.rta.command.FlexCommand
19
19
  * @author SAP SE
20
- * @version 1.120.7
20
+ * @version 1.121.0
21
21
  * @constructor
22
22
  * @private
23
23
  * @since 1.34
@@ -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.120.7
19
+ * @version 1.121.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.34
@@ -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.120.7
15
+ * @version 1.121.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.42
@@ -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.120.7
15
+ * @version 1.121.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.34
@@ -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.120.7
19
+ * @version 1.121.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.101
@@ -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.120.7
15
+ * @version 1.121.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.44
@@ -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.120.7
15
+ * @version 1.121.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.44
@@ -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.120.7
17
+ * @version 1.121.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.46
@@ -53,13 +53,27 @@ sap.ui.define([
53
53
  }
54
54
  }
55
55
 
56
+ // If changes are discarded (e.g. after a variant switch), the corresponding commands are not relevant for save
57
+ function handleDiscardedChanges(aDiscardedChanges, bSaveRelevant) {
58
+ const aAllExecutedCommands = this.getAllExecutedCommands();
59
+ aDiscardedChanges.forEach((oChange) => {
60
+ aAllExecutedCommands.some((oExecutedCommand) => {
61
+ if (oExecutedCommand.getPreparedChange?.().getId() === oChange.getId()) {
62
+ oExecutedCommand.setRelevantForSave(bSaveRelevant);
63
+ return true;
64
+ }
65
+ return false;
66
+ });
67
+ });
68
+ }
69
+
56
70
  /**
57
71
  * Basic implementation for the command stack pattern.
58
72
  *
59
73
  * @class
60
74
  * @extends sap.ui.base.ManagedObject
61
75
  * @author SAP SE
62
- * @version 1.120.7
76
+ * @version 1.121.0
63
77
  * @constructor
64
78
  * @private
65
79
  * @since 1.34
@@ -236,6 +250,10 @@ sap.ui.define([
236
250
 
237
251
  .then(function() {
238
252
  this._toBeExecuted--;
253
+ const aDiscardedChanges = oCommand.getDiscardedChanges?.();
254
+ if (aDiscardedChanges) {
255
+ handleDiscardedChanges.call(this, aDiscardedChanges, false);
256
+ }
239
257
  this.fireCommandExecuted(mParam);
240
258
  this.fireModified();
241
259
  }.bind(this))
@@ -264,6 +282,7 @@ sap.ui.define([
264
282
  this._bUndoneCommands = true;
265
283
  this._toBeExecuted++;
266
284
  var oCommand = this._getCommandToBeExecuted();
285
+ const aDiscardedChanges = oCommand.getDiscardedChanges?.();
267
286
  if (oCommand) {
268
287
  var mParam = {
269
288
  command: oCommand,
@@ -274,6 +293,9 @@ sap.ui.define([
274
293
  .then(this._waitForCommandExecutionHandler.bind(this, mParam))
275
294
 
276
295
  .then(function() {
296
+ if (aDiscardedChanges) {
297
+ handleDiscardedChanges.call(this, aDiscardedChanges, true);
298
+ }
277
299
  this.fireCommandExecuted(mParam);
278
300
  this.fireModified();
279
301
  }.bind(this));
@@ -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.120.7
22
+ * @version 1.121.0
23
23
  *
24
24
  * @constructor
25
25
  * @private
@@ -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.120.7
23
+ * @version 1.121.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.102
@@ -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.120.7
23
+ * @version 1.121.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.87
@@ -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.120.7
21
+ * @version 1.121.0
22
22
  * @constructor
23
23
  * @private
24
24
  * @since 1.87
@@ -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.120.7
25
+ * @version 1.121.0
26
26
  * @constructor
27
27
  * @private
28
28
  * @since 1.87