@openui5/sap.ui.rta 1.96.2 → 1.98.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 (179) hide show
  1. package/.reuse/dep5 +26 -31
  2. package/THIRDPARTY.txt +15 -21
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +2 -2
  5. package/src/sap/ui/rta/Client.js +2 -2
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +187 -139
  7. package/src/sap/ui/rta/Utils.js +2 -2
  8. package/src/sap/ui/rta/api/startAdaptation.js +2 -3
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +3 -3
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +6 -4
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +5 -7
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +5 -12
  14. package/src/sap/ui/rta/appVariant/Feature.js +7 -6
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +3 -2
  16. package/src/sap/ui/rta/appVariant/Utils.js +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  21. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  22. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  23. package/src/sap/ui/rta/command/AddXML.js +2 -2
  24. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  25. package/src/sap/ui/rta/command/AppDescriptorCommand.js +5 -4
  26. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  27. package/src/sap/ui/rta/command/BindProperty.js +2 -2
  28. package/src/sap/ui/rta/command/Combine.js +2 -2
  29. package/src/sap/ui/rta/command/CommandFactory.js +2 -2
  30. package/src/sap/ui/rta/command/CompositeCommand.js +6 -6
  31. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  32. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  33. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
  35. package/src/sap/ui/rta/command/ControlVariantSwitch.js +2 -7
  36. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  37. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  38. package/src/sap/ui/rta/command/FlexCommand.js +2 -2
  39. package/src/sap/ui/rta/command/LREPSerializer.js +12 -4
  40. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  41. package/src/sap/ui/rta/command/Move.js +2 -2
  42. package/src/sap/ui/rta/command/Property.js +2 -2
  43. package/src/sap/ui/rta/command/Remove.js +2 -2
  44. package/src/sap/ui/rta/command/Rename.js +2 -2
  45. package/src/sap/ui/rta/command/Reveal.js +2 -2
  46. package/src/sap/ui/rta/command/Settings.js +2 -2
  47. package/src/sap/ui/rta/command/Split.js +2 -2
  48. package/src/sap/ui/rta/command/Stack.js +16 -22
  49. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
  50. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  51. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  52. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
  53. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  54. package/src/sap/ui/rta/enablement/elementActionTest.js +3 -3
  55. package/src/sap/ui/rta/library.js +3 -3
  56. package/src/sap/ui/rta/messagebundle.properties +38 -19
  57. package/src/sap/ui/rta/messagebundle_ar.properties +20 -10
  58. package/src/sap/ui/rta/messagebundle_bg.properties +20 -10
  59. package/src/sap/ui/rta/messagebundle_ca.properties +19 -9
  60. package/src/sap/ui/rta/messagebundle_cs.properties +20 -10
  61. package/src/sap/ui/rta/messagebundle_cy.properties +20 -10
  62. package/src/sap/ui/rta/messagebundle_da.properties +20 -10
  63. package/src/sap/ui/rta/messagebundle_de.properties +19 -9
  64. package/src/sap/ui/rta/messagebundle_el.properties +20 -10
  65. package/src/sap/ui/rta/messagebundle_en.properties +20 -10
  66. package/src/sap/ui/rta/messagebundle_en_GB.properties +20 -10
  67. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +20 -10
  68. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -14
  69. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +22 -12
  70. package/src/sap/ui/rta/messagebundle_es.properties +20 -10
  71. package/src/sap/ui/rta/messagebundle_es_MX.properties +23 -13
  72. package/src/sap/ui/rta/messagebundle_et.properties +21 -11
  73. package/src/sap/ui/rta/messagebundle_fi.properties +19 -9
  74. package/src/sap/ui/rta/messagebundle_fr.properties +20 -10
  75. package/src/sap/ui/rta/messagebundle_fr_CA.properties +20 -10
  76. package/src/sap/ui/rta/messagebundle_hi.properties +20 -10
  77. package/src/sap/ui/rta/messagebundle_hr.properties +20 -10
  78. package/src/sap/ui/rta/messagebundle_hu.properties +19 -9
  79. package/src/sap/ui/rta/messagebundle_id.properties +24 -14
  80. package/src/sap/ui/rta/messagebundle_it.properties +21 -11
  81. package/src/sap/ui/rta/messagebundle_iw.properties +20 -10
  82. package/src/sap/ui/rta/messagebundle_ja.properties +20 -10
  83. package/src/sap/ui/rta/messagebundle_kk.properties +20 -10
  84. package/src/sap/ui/rta/messagebundle_ko.properties +21 -11
  85. package/src/sap/ui/rta/messagebundle_lt.properties +20 -10
  86. package/src/sap/ui/rta/messagebundle_lv.properties +20 -10
  87. package/src/sap/ui/rta/messagebundle_ms.properties +20 -10
  88. package/src/sap/ui/rta/messagebundle_nl.properties +20 -10
  89. package/src/sap/ui/rta/messagebundle_no.properties +20 -10
  90. package/src/sap/ui/rta/messagebundle_pl.properties +20 -10
  91. package/src/sap/ui/rta/messagebundle_pt.properties +19 -9
  92. package/src/sap/ui/rta/messagebundle_pt_PT.properties +19 -9
  93. package/src/sap/ui/rta/messagebundle_ro.properties +20 -10
  94. package/src/sap/ui/rta/messagebundle_ru.properties +19 -9
  95. package/src/sap/ui/rta/messagebundle_sh.properties +20 -10
  96. package/src/sap/ui/rta/messagebundle_sk.properties +20 -10
  97. package/src/sap/ui/rta/messagebundle_sl.properties +20 -10
  98. package/src/sap/ui/rta/messagebundle_sv.properties +20 -10
  99. package/src/sap/ui/rta/messagebundle_th.properties +25 -15
  100. package/src/sap/ui/rta/messagebundle_tr.properties +20 -10
  101. package/src/sap/ui/rta/messagebundle_uk.properties +23 -13
  102. package/src/sap/ui/rta/messagebundle_vi.properties +20 -10
  103. package/src/sap/ui/rta/messagebundle_zh_CN.properties +20 -10
  104. package/src/sap/ui/rta/messagebundle_zh_TW.properties +20 -10
  105. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  106. package/src/sap/ui/rta/plugin/BaseCreate.js +3 -3
  107. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  108. package/src/sap/ui/rta/plugin/CompVariant.js +1 -1
  109. package/src/sap/ui/rta/plugin/ControlVariant.js +4 -5
  110. package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
  111. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  112. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  113. package/src/sap/ui/rta/plugin/EasyAdd.js +2 -2
  114. package/src/sap/ui/rta/plugin/EasyRemove.js +2 -2
  115. package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
  116. package/src/sap/ui/rta/plugin/Plugin.js +2 -2
  117. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  118. package/src/sap/ui/rta/plugin/Remove.js +2 -2
  119. package/src/sap/ui/rta/plugin/Rename.js +2 -2
  120. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -15
  121. package/src/sap/ui/rta/plugin/Selection.js +16 -27
  122. package/src/sap/ui/rta/plugin/Settings.js +2 -2
  123. package/src/sap/ui/rta/plugin/Split.js +3 -2
  124. package/src/sap/ui/rta/plugin/Stretch.js +2 -2
  125. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +16 -85
  126. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -68
  128. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +10 -11
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +4 -5
  130. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +18 -48
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +2 -17
  134. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +2 -2
  135. package/src/sap/ui/rta/service/Action.js +2 -2
  136. package/src/sap/ui/rta/service/ControllerExtension.js +6 -7
  137. package/src/sap/ui/rta/service/Outline.js +84 -31
  138. package/src/sap/ui/rta/service/Property.js +2 -4
  139. package/src/sap/ui/rta/service/Receiver.js +1 -1
  140. package/src/sap/ui/rta/service/Selection.js +3 -2
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/themes/base/ChangeVisualization.less +23 -30
  143. package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +54 -35
  144. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  145. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  146. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +1 -0
  147. package/src/sap/ui/rta/toolbar/Adaptation.js +13 -13
  148. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  149. package/src/sap/ui/rta/toolbar/Base.js +4 -4
  150. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  151. package/src/sap/ui/rta/toolbar/Fiori.js +2 -2
  152. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  153. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -5
  154. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  155. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  156. package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +19 -10
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +115 -46
  158. package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +8 -13
  159. package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +41 -0
  160. package/src/sap/ui/rta/util/Animation.js +1 -1
  161. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  162. package/src/sap/ui/rta/util/PluginManager.js +2 -2
  163. package/src/sap/ui/rta/util/PopupManager.js +8 -13
  164. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  165. package/src/sap/ui/rta/util/StylesLoader.js +1 -1
  166. package/src/sap/ui/rta/util/UrlParser.js +1 -1
  167. package/src/sap/ui/rta/util/adaptationStarter.js +42 -4
  168. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -81
  169. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +15 -37
  170. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -3
  171. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +54 -67
  172. package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +30 -0
  173. package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +4 -3
  174. package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +30 -0
  175. package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +10 -4
  176. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  177. package/src/sap/ui/rta/util/showMessageBox.js +5 -4
  178. package/src/sap/ui/rta/util/validateFlexEnabled.js +7 -6
  179. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -26,6 +26,7 @@ sap.ui.define([
26
26
  "sap/ui/model/FilterOperator",
27
27
  "sap/ui/model/json/JSONModel",
28
28
  "sap/ui/rta/Utils",
29
+ "sap/ui/layout/form/SimpleFormLayout",
29
30
  // needs to be preloaded for the test to work
30
31
  "sap/ui/layout/form/ResponsiveGridLayout"
31
32
  ],
@@ -49,7 +50,8 @@ function(
49
50
  Filter,
50
51
  FilterOperator,
51
52
  JSONModel,
52
- RtaUtils
53
+ RtaUtils,
54
+ SimpleFormLayout
53
55
  ) {
54
56
  "use strict";
55
57
 
@@ -221,7 +223,7 @@ function(
221
223
  function _createSimpleForm() {
222
224
  oSimpleForm = new SimpleForm({
223
225
  editable: true,
224
- layout: "ResponsiveGridLayout",
226
+ layout: SimpleFormLayout.ResponsiveGridLayout,
225
227
  labelSpanXL: 4,
226
228
  labelSpanL: 4,
227
229
  labelSpanM: 4,
@@ -284,7 +286,7 @@ function(
284
286
 
285
287
  // initialize dialog and create member variables.
286
288
  this.setTitle(oResources.getText("CREATE_APP_VARIANT_DIALOG_TITLE"));
287
- this.setContentWidth("700px");
289
+ this.setContentWidth("860px");
288
290
  this.setContentHeight("250px");
289
291
 
290
292
  oCustomTileModel = new JSONModel({
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.base.ManagedObject
26
26
  * @author SAP SE
27
- * @version 1.96.2
27
+ * @version 1.98.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.53
@@ -46,10 +46,6 @@ sap.ui.define([
46
46
  }
47
47
  });
48
48
 
49
- /**
50
- * Opens the 'Save As' dialog.
51
- * @private
52
- */
53
49
  AppVariantManager.prototype._openDialog = function(fnCreate, fnCancel) {
54
50
  var oDialog = new AppVariantDialog("appVariantDialog");
55
51
 
@@ -138,6 +134,7 @@ sap.ui.define([
138
134
 
139
135
  /**
140
136
  * @param {String} sAppVariantId - Application variant ID
137
+ * @param {sap.ui.fl.Selector} vSelector - Selector
141
138
  * @returns {Promise} Resolved promise
142
139
  * @description Creates the app variant with all inline changes in backend.
143
140
  */
@@ -189,6 +186,7 @@ sap.ui.define([
189
186
 
190
187
  /**
191
188
  * Dirty changes get taken over by the app variant.
189
+ * @returns {Promise} Resolves as soon as the command stack is cleared
192
190
  * @private
193
191
  */
194
192
  AppVariantManager.prototype._clearRTACommandStack = function() {
@@ -231,7 +229,7 @@ sap.ui.define([
231
229
  /**
232
230
  *
233
231
  * @param {String} sIamId - Identity Access Management ID of SAP Fiori app
234
- * @param {String} sAppVariantId - Application variant ID
232
+ * @param {String} sAppVarId - Application variant ID
235
233
  * @param {Boolean} bCreation - Indicates that app is being created
236
234
  * @returns {Promise} Resolved promise
237
235
  * @description When the app variant creation/deletion and catalog assignment/unassignment are executed successfully, this asynchronous process gets triggered. It talks to the server every 2.5 secs.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,11 +1,9 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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
- /* global XMLHttpRequest */
8
-
9
7
  sap.ui.define([
10
8
  "sap/ui/fl/Utils",
11
9
  "sap/m/MessageBox",
@@ -16,8 +14,7 @@ sap.ui.define([
16
14
  "sap/ui/fl/write/api/PersistenceWriteAPI",
17
15
  "sap/ui/fl/write/api/AppVariantWriteAPI",
18
16
  "sap/ui/fl/write/api/ChangesWriteAPI"
19
- ],
20
- function(
17
+ ], function(
21
18
  FlexUtils,
22
19
  MessageBox,
23
20
  RtaUtils,
@@ -48,10 +45,9 @@ function(
48
45
  if (xhr.status >= 200 && xhr.status < 400) {
49
46
  resolve(xhr.response);
50
47
  } else {
51
- reject({
52
- status: xhr.status,
53
- message: xhr.statusText
54
- });
48
+ var oError = new Error(xhr.statusText);
49
+ oError.status = xhr.status;
50
+ reject(oError);
55
51
  }
56
52
  };
57
53
  });
@@ -480,9 +476,6 @@ function(
480
476
  };
481
477
  };
482
478
 
483
- /**
484
- * Builds the final success message on S/4HANA Cloud.
485
- */
486
479
  AppVariantUtils.buildFinalSuccessInfoS4HANACloud = function() {
487
480
  var sMessage = AppVariantUtils.getText("MSG_SAVE_APP_VARIANT_NEW_TILE_AVAILABLE");
488
481
  return { text: sMessage };
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -12,7 +12,8 @@ sap.ui.define([
12
12
  "sap/ui/fl/registry/Settings",
13
13
  "sap/ui/fl/write/_internal/appVariant/AppVariantFactory",
14
14
  "sap/ui/fl/write/api/FeaturesAPI",
15
- "sap/base/util/merge"
15
+ "sap/base/util/merge",
16
+ "sap/base/Log"
16
17
  ], function(
17
18
  FlexUtils,
18
19
  AppVariantUtils,
@@ -21,7 +22,8 @@ sap.ui.define([
21
22
  Settings,
22
23
  AppVariantFactory,
23
24
  FeaturesAPI,
24
- merge
25
+ merge,
26
+ Log
25
27
  ) {
26
28
  "use strict";
27
29
 
@@ -148,9 +150,8 @@ sap.ui.define([
148
150
  return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id).then(function(oResult) {
149
151
  return oResult.response;
150
152
  }).catch(function(oError) {
151
- var oErrorInfo = AppVariantUtils.buildErrorInfo("MSG_APP_VARIANT_FEATURE_FAILED", oError);
152
- oErrorInfo.overviewDialog = true;
153
- return AppVariantUtils.showRelevantDialog(oErrorInfo, false);
153
+ Log.error("Response status code is: " + oError.status, "Stacktrace: " + oError.stack);
154
+ return false;
154
155
  });
155
156
  },
156
157
  /**
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -143,7 +143,8 @@ sap.ui.define([
143
143
  /**
144
144
  * Polls the OData model to check catalog publishing status of the given IAM app ID.
145
145
  *
146
- * @param {string} sIamAppId Identity Access Management ID of SAP Fiori app
146
+ * @param {string} sIamAppId - Identity Access Management ID of SAP Fiori app
147
+ * @param {boolean} bAppVarCreation - Indicates if it's a creation scenario
147
148
  * @return {Promise<boolean>} Promise delivering a boolean value
148
149
  * @async
149
150
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.require([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
19
+ * @version 1.98.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.75
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
17
+ * @version 1.98.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.78
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
19
+ * @version 1.98.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.54
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.rta.command.FlexCommand
26
26
  * @author SAP SE
27
- * @version 1.96.2
27
+ * @version 1.98.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.76
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
24
+ * @version 1.98.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -64,8 +64,9 @@ sap.ui.define([
64
64
 
65
65
  /**
66
66
  * Prepare the app descriptor change, setting the layer.
67
- * @param {object} mFlexSettings Map of flex Settings
68
- * @param {string} mFlexSettings.layer Layer where the change is applied
67
+ * @param {object} mFlexSettings - Map of flex settings
68
+ * @param {string} mFlexSettings.layer - Layer where the change is applied
69
+ * @returns {boolean} <code>true</true>
69
70
  */
70
71
  AppDescriptorCommand.prototype.prepare = function (mFlexSettings) {
71
72
  this.setLayer(mFlexSettings.layer);
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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/base/ManagedObject"], function(ManagedObject) {
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/base/ManagedObject"], function(ManagedObject) {
13
13
  * @extends sap.ui.base.ManagedObject
14
14
  *
15
15
  * @author SAP SE
16
- * @version 1.96.2
16
+ * @version 1.98.0
17
17
  *
18
18
  * @constructor
19
19
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @class
27
27
  * @extends sap.ui.rta.command.FlexCommand
28
28
  * @author SAP SE
29
- * @version 1.96.2
29
+ * @version 1.98.0
30
30
  * @constructor
31
31
  * @private
32
32
  * @since 1.38
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
19
+ * @version 1.98.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.46
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -475,7 +475,7 @@ sap.ui.define([
475
475
  * @extends sap.ui.base.ManagedObject
476
476
  *
477
477
  * @author SAP SE
478
- * @version 1.96.2
478
+ * @version 1.98.0
479
479
  *
480
480
  * @constructor
481
481
  * @private
@@ -1,13 +1,15 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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/rta/command/BaseCommand",
8
+ "sap/ui/rta/command/FlexCommand",
8
9
  "sap/ui/fl/Utils"
9
10
  ], function(
10
11
  BaseCommand,
12
+ FlexCommand,
11
13
  FlUtils
12
14
  ) {
13
15
  "use strict";
@@ -19,7 +21,7 @@ sap.ui.define([
19
21
  * @extends sap.ui.rta.command.BaseCommand
20
22
  *
21
23
  * @author SAP SE
22
- * @version 1.96.2
24
+ * @version 1.98.0
23
25
  *
24
26
  * @constructor
25
27
  * @private
@@ -57,10 +59,8 @@ sap.ui.define([
57
59
  .catch(function(e) {
58
60
  var aCommands = this.getCommands();
59
61
  aCommands.forEach(function(oCommand) {
60
- if (oCommand instanceof sap.ui.rta.command.FlexCommand) {
61
- if (!oCommand._aRecordedUndo) {
62
- this.removeCommand(oCommand);
63
- }
62
+ if (oCommand instanceof FlexCommand) {
63
+ this.removeCommand(oCommand);
64
64
  }
65
65
  }.bind(this));
66
66
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
23
+ * @version 1.98.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.52
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
23
+ * @version 1.98.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.86
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -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.96.2
27
+ * @version 1.98.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.86
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.BaseCommand
18
18
  * @author SAP SE
19
- * @version 1.96.2
19
+ * @version 1.98.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.50
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
23
+ * @version 1.98.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.50
@@ -74,11 +74,6 @@ sap.ui.define([
74
74
  return this._updateModelVariant(sOldVariantReference, oAppComponent);
75
75
  };
76
76
 
77
- /**
78
- * Update variant for the underlying model.
79
- * @private
80
- * @returns {Promise} Returns promise resolve
81
- */
82
77
  ControlVariantSwitch.prototype._updateModelVariant = function (sVariantReference, oAppComponent) {
83
78
  if (this.getTargetVariantReference() !== this.getSourceVariantReference()) {
84
79
  return this.oModel.updateCurrentVariant({
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
15
+ * @version 1.98.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-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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.96.2
15
+ * @version 1.98.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-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.ui.rta.command.BaseCommand
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.96.2
32
+ * @version 1.98.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 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([
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @class
30
30
  * @extends sap.ui.base.ManagedObject
31
31
  * @author SAP SE
32
- * @version 1.96.2
32
+ * @version 1.98.0
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.42
@@ -154,10 +154,12 @@ sap.ui.define([
154
154
  * In case of Base Applications (no App Variants) the App Descriptor Changes and UI Changes are saved in different Flex Persistence instances,
155
155
  * so we have to call save twice. For App Variants all the changes are saved in one place.
156
156
  * @param {boolean} bSaveAsDraft - save the changes as a draft
157
+ * @param {string} [sLayer] - Layer for which the changes should be saved
158
+ * @param {boolean} [bRemoveOtherLayerChanges=false] - Whether to remove changes on other layers before saving
157
159
  * @returns {Promise} return empty promise
158
160
  * @public
159
161
  */
160
- LREPSerializer.prototype.saveCommands = function(bSaveAsDraft) {
162
+ LREPSerializer.prototype.saveCommands = function(bSaveAsDraft, sLayer, bRemoveOtherLayerChanges) {
161
163
  this._lastPromise = this._lastPromise.catch(function() {
162
164
  // _lastPromise chain must not be interrupted
163
165
  }).then(function() {
@@ -165,7 +167,13 @@ sap.ui.define([
165
167
  if (!oRootControl) {
166
168
  throw new Error("Can't save commands without root control instance!");
167
169
  }
168
- return PersistenceWriteAPI.save({selector: oRootControl, skipUpdateCache: false, draft: !!bSaveAsDraft});
170
+ return PersistenceWriteAPI.save({
171
+ selector: oRootControl,
172
+ skipUpdateCache: false,
173
+ draft: !!bSaveAsDraft,
174
+ layer: sLayer,
175
+ removeOtherLayerChanges: !!bRemoveOtherLayerChanges
176
+ });
169
177
  }.bind(this))
170
178
 
171
179
  .then(function() {