@openui5/sap.ui.rta 1.103.0 → 1.105.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 (157) hide show
  1. package/.reuse/dep5 +18 -1
  2. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
  3. package/THIRDPARTY.txt +36 -3
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +1 -1
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +83 -406
  8. package/src/sap/ui/rta/Utils.js +2 -2
  9. package/src/sap/ui/rta/api/startAdaptation.js +2 -2
  10. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +2 -2
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +6 -22
  13. package/src/sap/ui/rta/appVariant/Feature.js +4 -12
  14. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +5 -3
  15. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  16. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  17. package/src/sap/ui/rta/command/AddXML.js +1 -1
  18. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  19. package/src/sap/ui/rta/command/AppDescriptorCommand.js +8 -3
  20. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  21. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  22. package/src/sap/ui/rta/command/Combine.js +1 -1
  23. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  24. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  25. package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -2
  26. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  27. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +5 -3
  28. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +5 -4
  29. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  30. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  31. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  32. package/src/sap/ui/rta/command/FlexCommand.js +4 -2
  33. package/src/sap/ui/rta/command/LREPSerializer.js +11 -8
  34. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  35. package/src/sap/ui/rta/command/Move.js +1 -1
  36. package/src/sap/ui/rta/command/Property.js +1 -1
  37. package/src/sap/ui/rta/command/Remove.js +1 -1
  38. package/src/sap/ui/rta/command/Rename.js +1 -1
  39. package/src/sap/ui/rta/command/Resize.js +1 -1
  40. package/src/sap/ui/rta/command/Reveal.js +1 -1
  41. package/src/sap/ui/rta/command/Settings.js +1 -1
  42. package/src/sap/ui/rta/command/Split.js +1 -1
  43. package/src/sap/ui/rta/command/Stack.js +3 -3
  44. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  46. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +6 -4
  47. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  48. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +6 -4
  49. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  50. package/src/sap/ui/rta/library.js +2 -2
  51. package/src/sap/ui/rta/messagebundle.properties +15 -11
  52. package/src/sap/ui/rta/messagebundle_ar.properties +23 -9
  53. package/src/sap/ui/rta/messagebundle_bg.properties +24 -10
  54. package/src/sap/ui/rta/messagebundle_ca.properties +24 -10
  55. package/src/sap/ui/rta/messagebundle_cs.properties +23 -9
  56. package/src/sap/ui/rta/messagebundle_cy.properties +21 -7
  57. package/src/sap/ui/rta/messagebundle_da.properties +25 -11
  58. package/src/sap/ui/rta/messagebundle_de.properties +25 -11
  59. package/src/sap/ui/rta/messagebundle_el.properties +24 -10
  60. package/src/sap/ui/rta/messagebundle_en.properties +25 -11
  61. package/src/sap/ui/rta/messagebundle_en_GB.properties +25 -11
  62. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +18 -11
  63. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -2
  64. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +26 -12
  65. package/src/sap/ui/rta/messagebundle_es.properties +21 -7
  66. package/src/sap/ui/rta/messagebundle_es_MX.properties +19 -5
  67. package/src/sap/ui/rta/messagebundle_et.properties +21 -7
  68. package/src/sap/ui/rta/messagebundle_fi.properties +25 -11
  69. package/src/sap/ui/rta/messagebundle_fr.properties +22 -8
  70. package/src/sap/ui/rta/messagebundle_fr_CA.properties +24 -10
  71. package/src/sap/ui/rta/messagebundle_hi.properties +24 -10
  72. package/src/sap/ui/rta/messagebundle_hr.properties +23 -9
  73. package/src/sap/ui/rta/messagebundle_hu.properties +17 -3
  74. package/src/sap/ui/rta/messagebundle_id.properties +23 -9
  75. package/src/sap/ui/rta/messagebundle_it.properties +24 -10
  76. package/src/sap/ui/rta/messagebundle_iw.properties +24 -10
  77. package/src/sap/ui/rta/messagebundle_ja.properties +24 -10
  78. package/src/sap/ui/rta/messagebundle_kk.properties +24 -10
  79. package/src/sap/ui/rta/messagebundle_ko.properties +24 -10
  80. package/src/sap/ui/rta/messagebundle_lt.properties +23 -9
  81. package/src/sap/ui/rta/messagebundle_lv.properties +21 -7
  82. package/src/sap/ui/rta/messagebundle_ms.properties +25 -11
  83. package/src/sap/ui/rta/messagebundle_nl.properties +25 -11
  84. package/src/sap/ui/rta/messagebundle_no.properties +24 -10
  85. package/src/sap/ui/rta/messagebundle_pl.properties +23 -9
  86. package/src/sap/ui/rta/messagebundle_pt.properties +24 -10
  87. package/src/sap/ui/rta/messagebundle_pt_PT.properties +23 -9
  88. package/src/sap/ui/rta/messagebundle_ro.properties +23 -9
  89. package/src/sap/ui/rta/messagebundle_ru.properties +24 -10
  90. package/src/sap/ui/rta/messagebundle_sh.properties +25 -11
  91. package/src/sap/ui/rta/messagebundle_sk.properties +23 -9
  92. package/src/sap/ui/rta/messagebundle_sl.properties +21 -7
  93. package/src/sap/ui/rta/messagebundle_sv.properties +25 -11
  94. package/src/sap/ui/rta/messagebundle_th.properties +27 -13
  95. package/src/sap/ui/rta/messagebundle_tr.properties +24 -10
  96. package/src/sap/ui/rta/messagebundle_uk.properties +25 -11
  97. package/src/sap/ui/rta/messagebundle_vi.properties +24 -10
  98. package/src/sap/ui/rta/messagebundle_zh_CN.properties +24 -10
  99. package/src/sap/ui/rta/messagebundle_zh_TW.properties +23 -9
  100. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  101. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  102. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  103. package/src/sap/ui/rta/plugin/CompVariant.js +2 -2
  104. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -15
  105. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  106. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  107. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  108. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  109. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  110. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  111. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  112. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  113. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  114. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  115. package/src/sap/ui/rta/plugin/RenameHandler.js +23 -5
  116. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  117. package/src/sap/ui/rta/plugin/Selection.js +12 -1
  118. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  119. package/src/sap/ui/rta/plugin/Split.js +1 -1
  120. package/src/sap/ui/rta/plugin/Stretch.js +5 -3
  121. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  122. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  123. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +5 -5
  124. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  125. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  126. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  127. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  128. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  129. package/src/sap/ui/rta/service/Action.js +1 -1
  130. package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
  131. package/src/sap/ui/rta/service/Outline.js +1 -1
  132. package/src/sap/ui/rta/service/Property.js +1 -1
  133. package/src/sap/ui/rta/service/Selection.js +1 -1
  134. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +19 -4
  135. package/src/sap/ui/rta/toolbar/Adaptation.js +6 -4
  136. package/src/sap/ui/rta/toolbar/Base.js +8 -4
  137. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  138. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  139. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  140. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  141. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  142. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  143. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  144. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  145. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  146. package/src/sap/ui/rta/util/ReloadManager.js +331 -0
  147. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  148. package/src/sap/ui/rta/util/adaptationStarter.js +14 -8
  149. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +100 -51
  150. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +100 -55
  151. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +41 -106
  152. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +2 -2
  153. package/src/sap/ui/rta/util/changeVisualization/categories/CombineVisualization.js +87 -0
  154. package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +4 -4
  155. package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +2 -2
  156. package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +6 -4
  157. package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +11 -3
@@ -45,7 +45,7 @@ function(
45
45
  *
46
46
  * @namespace
47
47
  * @author SAP SE
48
- * @version 1.103.0
48
+ * @version 1.105.0
49
49
  *
50
50
  * @private
51
51
  * @since 1.30
@@ -221,7 +221,7 @@ function(
221
221
  Utils.getFocusedOverlay = function() {
222
222
  if (document.activeElement) {
223
223
  var oElement = sap.ui.getCore().byId(document.activeElement.id);
224
- if (oElement instanceof sap.ui.dt.ElementOverlay) {
224
+ if (oElement && oElement.isA("sap.ui.dt.ElementOverlay")) {
225
225
  return oElement;
226
226
  }
227
227
  }
@@ -1,5 +1,5 @@
1
- /*
2
- * ! OpenUI5
1
+ /*!
2
+ * OpenUI5
3
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
  */
@@ -1,5 +1,5 @@
1
- /*
2
- * ! OpenUI5
1
+ /*!
2
+ * OpenUI5
3
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
  */
@@ -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.103.0
27
+ * @version 1.105.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.53
@@ -13,7 +13,8 @@ sap.ui.define([
13
13
  "sap/base/Log",
14
14
  "sap/ui/fl/write/api/PersistenceWriteAPI",
15
15
  "sap/ui/fl/write/api/AppVariantWriteAPI",
16
- "sap/ui/fl/write/api/ChangesWriteAPI"
16
+ "sap/ui/fl/write/api/ChangesWriteAPI",
17
+ "sap/ui/fl/write/_internal/connectors/LrepConnector"
17
18
  ], function(
18
19
  FlexUtils,
19
20
  MessageBox,
@@ -23,7 +24,8 @@ sap.ui.define([
23
24
  Log,
24
25
  PersistenceWriteAPI,
25
26
  AppVariantWriteAPI,
26
- ChangesWriteAPI
27
+ ChangesWriteAPI,
28
+ LrepConnector
27
29
  ) {
28
30
  "use strict";
29
31
  var AppVariantUtils = {};
@@ -34,23 +36,7 @@ sap.ui.define([
34
36
  AppVariantUtils._newAppVariantId = null;
35
37
 
36
38
  AppVariantUtils.getManifirstSupport = function(sRunningAppId) {
37
- var sManifirstUrl = '/sap/bc/ui2/app_index/ui5_app_mani_first_supported/?id=' + sRunningAppId;
38
-
39
- return new Promise(function (resolve, reject) {
40
- var xhr = new XMLHttpRequest();
41
- xhr.open("GET", sManifirstUrl);
42
- xhr.send();
43
-
44
- xhr.onload = function() {
45
- if (xhr.status >= 200 && xhr.status < 400) {
46
- resolve(xhr.response);
47
- } else {
48
- var oError = new Error(xhr.statusText);
49
- oError.status = xhr.status;
50
- reject(oError);
51
- }
52
- };
53
- });
39
+ return LrepConnector.appVariant.getManifirstSupport({appId: sRunningAppId});
54
40
  };
55
41
 
56
42
  AppVariantUtils.getNewAppVariantId = function() {
@@ -593,9 +579,7 @@ sap.ui.define([
593
579
  };
594
580
 
595
581
  AppVariantUtils.handleBeforeUnloadEvent = function () {
596
- // oEvent.preventDefault();
597
- var sMessage = AppVariantUtils.getText("MSG_DO_NOT_CLOSE_BROWSER");
598
- return sMessage;
582
+ return AppVariantUtils.getText("MSG_DO_NOT_CLOSE_BROWSER");
599
583
  };
600
584
 
601
585
  AppVariantUtils.showMessage = function(sMessageKey) {
@@ -12,8 +12,7 @@ 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",
16
- "sap/base/Log"
15
+ "sap/base/util/merge"
17
16
  ], function(
18
17
  FlexUtils,
19
18
  AppVariantUtils,
@@ -22,8 +21,7 @@ sap.ui.define([
22
21
  Settings,
23
22
  AppVariantFactory,
24
23
  FeaturesAPI,
25
- merge,
26
- Log
24
+ merge
27
25
  ) {
28
26
  "use strict";
29
27
 
@@ -109,7 +107,7 @@ sap.ui.define([
109
107
  AppVariantUtils.closeOverviewDialog();
110
108
  };
111
109
 
112
- var oUriParameters = new UriParameters(window.location.href);
110
+ var oUriParameters = UriParameters.fromQuery(window.location.search);
113
111
  var sAppContextsEnabled = oUriParameters.get("sap-ui-xx-rta-adaptations");
114
112
 
115
113
  var sOverviewPath = "sap/ui/rta/appVariant/AppVariantOverviewDialog";
@@ -156,13 +154,7 @@ sap.ui.define([
156
154
  },
157
155
  isManifestSupported: function() {
158
156
  var oDescriptor = fnGetDescriptor();
159
-
160
- return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id).then(function(oResult) {
161
- return oResult.response;
162
- }).catch(function(oError) {
163
- Log.error("Response status code is: " + oError.status, "Stacktrace: " + oError.stack);
164
- return false;
165
- });
157
+ return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id);
166
158
  },
167
159
  /**
168
160
  * @param {object} oRootControl - Root control of an app (variant)
@@ -16,7 +16,8 @@ sap.ui.define([
16
16
  "sap/ui/rta/RuntimeAuthoring",
17
17
  "sap/ui/core/BusyIndicator",
18
18
  "sap/base/i18n/ResourceBundle",
19
- "sap/m/MessageToast"
19
+ "sap/m/MessageToast",
20
+ "sap/m/MenuItem"
20
21
  ], function(
21
22
  Controller,
22
23
  Layer,
@@ -30,7 +31,8 @@ sap.ui.define([
30
31
  RuntimeAuthoring,
31
32
  BusyIndicator,
32
33
  ResourceBundle,
33
- MessageToast
34
+ MessageToast,
35
+ MenuItem
34
36
  ) {
35
37
  "use strict";
36
38
 
@@ -212,7 +214,7 @@ sap.ui.define([
212
214
  var oItem = oEvent.getParameter("item");
213
215
  var sItemPath = "";
214
216
 
215
- while (oItem instanceof sap.m.MenuItem) {
217
+ while (oItem instanceof MenuItem) {
216
218
  sItemPath = oItem.getText() + " > " + sItemPath;
217
219
  oItem = oItem.getParent();
218
220
  }
@@ -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.103.0
19
+ * @version 1.105.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.75
@@ -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.103.0
17
+ * @version 1.105.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.78
@@ -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.103.0
19
+ * @version 1.105.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.54
@@ -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.103.0
27
+ * @version 1.105.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.76
@@ -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.103.0
24
+ * @version 1.105.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -99,8 +99,13 @@ sap.ui.define([
99
99
  }
100
100
  })
101
101
  .then(function(oAppDescriptorChangeContent) {
102
- return new DescriptorChangeFactory().createNew(this.getReference(),
103
- oAppDescriptorChangeContent, this.getLayer(), this.getAppComponent());
102
+ return new DescriptorChangeFactory().createNew(
103
+ this.getReference(),
104
+ oAppDescriptorChangeContent,
105
+ this.getLayer(),
106
+ this.getAppComponent(),
107
+ "sap.ui.rta.AppDescriptorCommand"
108
+ );
104
109
  }.bind(this))
105
110
  .then(function(oAppDescriptorChange) {
106
111
  var oChange = oAppDescriptorChange.store();
@@ -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.103.0
16
+ * @version 1.105.0
17
17
  *
18
18
  * @constructor
19
19
  * @private
@@ -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.103.0
29
+ * @version 1.105.0
30
30
  * @constructor
31
31
  * @private
32
32
  * @since 1.38
@@ -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.103.0
19
+ * @version 1.105.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.46
@@ -485,7 +485,7 @@ sap.ui.define([
485
485
  * @extends sap.ui.base.ManagedObject
486
486
  *
487
487
  * @author SAP SE
488
- * @version 1.103.0
488
+ * @version 1.105.0
489
489
  *
490
490
  * @constructor
491
491
  * @private
@@ -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.103.0
24
+ * @version 1.105.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -5,10 +5,12 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ui/rta/command/BaseCommand",
8
+ "sap/ui/rta/library",
8
9
  "sap/ui/core/util/reflection/JsControlTreeModifier",
9
10
  "sap/ui/fl/Utils"
10
11
  ], function(
11
12
  BaseCommand,
13
+ rtaLibrary,
12
14
  JsControlTreeModifier,
13
15
  flUtils
14
16
  ) {
@@ -20,7 +22,7 @@ sap.ui.define([
20
22
  * @class
21
23
  * @extends sap.ui.rta.command.BaseCommand
22
24
  * @author SAP SE
23
- * @version 1.103.0
25
+ * @version 1.105.0
24
26
  * @constructor
25
27
  * @private
26
28
  * @since 1.52
@@ -71,7 +73,7 @@ sap.ui.define([
71
73
  this._aPreparedChanges = [];
72
74
  this.getChanges().forEach(function(mChangeProperties) {
73
75
  mChangeProperties.appComponent = this.oAppComponent;
74
- mChangeProperties.generator = sap.ui.rta.GENERATOR_NAME;
76
+ mChangeProperties.generator = rtaLibrary.GENERATOR_NAME;
75
77
  this._aPreparedChanges.push(this.oModel.addVariantChange(this.sVariantManagementReference, mChangeProperties));
76
78
  }.bind(this));
77
79
 
@@ -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.103.0
23
+ * @version 1.105.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.86
@@ -5,12 +5,14 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ui/rta/command/BaseCommand",
8
+ "sap/ui/rta/library",
8
9
  "sap/ui/core/util/reflection/JsControlTreeModifier",
9
10
  "sap/ui/rta/Utils",
10
11
  "sap/ui/fl/Utils",
11
12
  "sap/ui/fl/write/api/ContextSharingAPI"
12
13
  ], function(
13
14
  BaseCommand,
15
+ rtaLibrary,
14
16
  JsControlTreeModifier,
15
17
  rtaUtils,
16
18
  flUtils,
@@ -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.103.0
29
+ * @version 1.105.0
28
30
  * @constructor
29
31
  * @private
30
32
  * @since 1.86
@@ -105,12 +107,12 @@ sap.ui.define([
105
107
  var mParams = this.getNewVariantParameters();
106
108
  mParams.layer = this.sLayer;
107
109
  mParams.newVariantReference = this.sNewVariantReference;
108
- mParams.generator = sap.ui.rta.GENERATOR_NAME;
110
+ mParams.generator = rtaLibrary.GENERATOR_NAME;
109
111
  return this.oModel._handleSave(this.oVariantManagementControl, mParams)
110
112
  .then(function(aDirtyChanges) {
111
113
  this._aPreparedChanges = aDirtyChanges;
112
114
  this._oVariantChange = aDirtyChanges[0];
113
- this.sNewVariantReference = this._oVariantChange.getDefinition().fileName;
115
+ this.sNewVariantReference = this._oVariantChange.getId();
114
116
  this._aPreparedChanges.forEach(function(oChange) {
115
117
  if (oChange.getFileType() === "change") {
116
118
  oChange.assignedToVariant = true;
@@ -5,9 +5,10 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ui/rta/command/BaseCommand",
8
+ "sap/ui/rta/library",
8
9
  "sap/ui/core/util/reflection/JsControlTreeModifier",
9
10
  "sap/ui/fl/Utils"
10
- ], function(BaseCommand, JsControlTreeModifier, flUtils) {
11
+ ], function(BaseCommand, rtaLibrary, JsControlTreeModifier, flUtils) {
11
12
  "use strict";
12
13
 
13
14
  /**
@@ -16,7 +17,7 @@ sap.ui.define([
16
17
  * @class
17
18
  * @extends sap.ui.rta.command.BaseCommand
18
19
  * @author SAP SE
19
- * @version 1.103.0
20
+ * @version 1.105.0
20
21
  * @constructor
21
22
  * @private
22
23
  * @since 1.50
@@ -68,7 +69,7 @@ sap.ui.define([
68
69
  this.sVariantManagementReference = JsControlTreeModifier.getSelector(oVariantManagementControl, this.oAppComponent).id;
69
70
  this.sCurrentVariant = this.oModel.getCurrentVariantReference(this.sVariantManagementReference);
70
71
 
71
- var sCurrentTitle = this.oModel.getVariantProperty(this.sCurrentVariant, "title");
72
+ var sCurrentTitle = this.oModel.getVariantTitle(this.sCurrentVariant, this.sVariantManagementReference);
72
73
  this.setOldText(sCurrentTitle);
73
74
 
74
75
  var mPropertyBag = {
@@ -77,7 +78,7 @@ sap.ui.define([
77
78
  changeType: "setTitle",
78
79
  title: this.getNewText(),
79
80
  layer: this.sLayer,
80
- generator: sap.ui.rta.GENERATOR_NAME
81
+ generator: rtaLibrary.GENERATOR_NAME
81
82
  };
82
83
 
83
84
  return Promise.resolve(this.oModel.addVariantChange(this.sVariantManagementReference, mPropertyBag))
@@ -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.103.0
23
+ * @version 1.105.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.50
@@ -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.103.0
15
+ * @version 1.105.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.103.0
15
+ * @version 1.105.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.62
@@ -5,6 +5,7 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ui/rta/command/BaseCommand",
8
+ "sap/ui/rta/library",
8
9
  "sap/ui/core/util/reflection/JsControlTreeModifier",
9
10
  "sap/ui/fl/Utils",
10
11
  "sap/base/Log",
@@ -13,6 +14,7 @@ sap.ui.define([
13
14
  "sap/base/util/values"
14
15
  ], function(
15
16
  BaseCommand,
17
+ rtaLibrary,
16
18
  JsControlTreeModifier,
17
19
  FlUtils,
18
20
  Log,
@@ -29,7 +31,7 @@ sap.ui.define([
29
31
  * @extends sap.ui.rta.command.BaseCommand
30
32
  *
31
33
  * @author SAP SE
32
- * @version 1.103.0
34
+ * @version 1.105.0
33
35
  *
34
36
  * @constructor
35
37
  * @private
@@ -206,7 +208,7 @@ sap.ui.define([
206
208
  mChangeSpecificData = Object.assign({}, mChangeSpecificData, mVariantObj);
207
209
  }
208
210
  mChangeSpecificData.command = sCommand;
209
- mChangeSpecificData.generator = sap.ui.rta.GENERATOR_NAME;
211
+ mChangeSpecificData.generator = rtaLibrary.GENERATOR_NAME;
210
212
  return ChangesWriteAPI.create({changeSpecificData: mChangeSpecificData, selector: this._validateControlForChange(mFlexSettings)})
211
213
  .then(function(oChange) {
212
214
  // originalSelector is only present when making a change on/inside a template; the selector does not work with the JS propagation hook (the template has no parent),
@@ -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.103.0
32
+ * @version 1.105.0
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.42
@@ -153,13 +153,15 @@ sap.ui.define([
153
153
  * Serializes and saves all changes to LREP
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
- * @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
156
+ * @param {object} mPropertyBag - Property bag
157
+ * @param {boolean} mPropertyBag.saveAsDraft - save the changes as a draft
158
+ * @param {string} [mPropertyBag.layer] - Layer for which the changes should be saved
159
+ * @param {boolean} [mPropertyBag.removeOtherLayerChanges=false] - Whether to remove changes on other layers before saving
160
+ * @param {string} [mPropertyBag.version] - Layer for which the changes should be saved
159
161
  * @returns {Promise} return empty promise
160
162
  * @public
161
163
  */
162
- LREPSerializer.prototype.saveCommands = function(bSaveAsDraft, sLayer, bRemoveOtherLayerChanges) {
164
+ LREPSerializer.prototype.saveCommands = function(mPropertyBag) {
163
165
  this._lastPromise = this._lastPromise.catch(function(oError) {
164
166
  Log.error(oError);
165
167
  // _lastPromise chain must not be interrupted
@@ -171,9 +173,10 @@ sap.ui.define([
171
173
  return PersistenceWriteAPI.save({
172
174
  selector: oRootControl,
173
175
  skipUpdateCache: false,
174
- draft: !!bSaveAsDraft,
175
- layer: sLayer,
176
- removeOtherLayerChanges: !!bRemoveOtherLayerChanges
176
+ draft: !!mPropertyBag.saveAsDraft,
177
+ layer: mPropertyBag.layer,
178
+ removeOtherLayerChanges: !!mPropertyBag.removeOtherLayerChanges,
179
+ version: mPropertyBag.version
177
180
  });
178
181
  }.bind(this))
179
182
  .then(function() {
@@ -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.103.0
23
+ * @version 1.105.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.103.0
20
+ * @version 1.105.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.103.0
19
+ * @version 1.105.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.103.0
15
+ * @version 1.105.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.103.0
15
+ * @version 1.105.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.103.0
19
+ * @version 1.105.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.103.0
15
+ * @version 1.105.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.103.0
15
+ * @version 1.105.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.103.0
17
+ * @version 1.105.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.46
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  }
30
30
 
31
31
  function pushToStack(oComponent, mComposite, oStack, oChange) {
32
- var oSelector = oChange.getSelector();
32
+ var oSelector = oChange.getSelector && oChange.getSelector();
33
33
  var oCommand = new Settings({
34
34
  selector: oSelector,
35
35
  changeType: oChange.getDefinition().changeType,
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  * @class
56
56
  * @extends sap.ui.base.ManagedObject
57
57
  * @author SAP SE
58
- * @version 1.103.0
58
+ * @version 1.105.0
59
59
  * @constructor
60
60
  * @private
61
61
  * @since 1.34
@@ -107,7 +107,7 @@ sap.ui.define([
107
107
  var mComposite = {};
108
108
  var mChanges = {};
109
109
  aChanges.forEach(function(oChange) {
110
- mChanges[oChange.getDefinition().fileName] = oChange;
110
+ mChanges[oChange.getId()] = oChange;
111
111
  });
112
112
  aFileNames
113
113
  .reduce(toAvailableChanges.bind(null, mChanges), [])
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @extends sap.ui.rta.command.AppDescriptorCommand
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.103.0
20
+ * @version 1.105.0
21
21
  *
22
22
  * @constructor
23
23
  * @private
@@ -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.103.0
19
+ * @version 1.105.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.102