@openui5/sap.ui.rta 1.134.0 → 1.135.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/THIRDPARTY.txt +2 -2
  2. package/package.json +6 -6
  3. package/src/sap/ui/rta/.library +1 -1
  4. package/src/sap/ui/rta/Client.js +1 -1
  5. package/src/sap/ui/rta/RuntimeAuthoring.js +34 -11
  6. package/src/sap/ui/rta/Utils.js +1 -1
  7. package/src/sap/ui/rta/appVariant/AppVariantManager.js +25 -25
  8. package/src/sap/ui/rta/appVariant/Feature.js +71 -71
  9. package/src/sap/ui/rta/appVariant/Utils.js +21 -23
  10. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +30 -30
  11. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +2 -2
  12. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  13. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  14. package/src/sap/ui/rta/command/AddXML.js +1 -1
  15. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  16. package/src/sap/ui/rta/command/AnnotationCommand.js +65 -5
  17. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  18. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  19. package/src/sap/ui/rta/command/Combine.js +1 -1
  20. package/src/sap/ui/rta/command/CommandFactory.js +71 -47
  21. package/src/sap/ui/rta/command/CompositeCommand.js +12 -12
  22. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  23. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  24. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  25. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  26. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  27. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  28. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  29. package/src/sap/ui/rta/command/ExtendControllerCommand.js +92 -0
  30. package/src/sap/ui/rta/command/FlexCommand.js +54 -43
  31. package/src/sap/ui/rta/command/LREPSerializer.js +23 -23
  32. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  33. package/src/sap/ui/rta/command/ManifestCommand.js +112 -0
  34. package/src/sap/ui/rta/command/Move.js +1 -1
  35. package/src/sap/ui/rta/command/Property.js +1 -1
  36. package/src/sap/ui/rta/command/Remove.js +1 -1
  37. package/src/sap/ui/rta/command/Rename.js +1 -1
  38. package/src/sap/ui/rta/command/Resize.js +1 -1
  39. package/src/sap/ui/rta/command/Reveal.js +1 -1
  40. package/src/sap/ui/rta/command/Settings.js +1 -1
  41. package/src/sap/ui/rta/command/Split.js +1 -1
  42. package/src/sap/ui/rta/command/Stack.js +1 -1
  43. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  44. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  46. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  47. package/src/sap/ui/rta/command/{appDescriptor → manifest}/AddLibrary.js +10 -10
  48. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  49. package/src/sap/ui/rta/library.js +2 -2
  50. package/src/sap/ui/rta/messagebundle.properties +16 -3
  51. package/src/sap/ui/rta/messagebundle_ar.properties +1 -0
  52. package/src/sap/ui/rta/messagebundle_bg.properties +1 -0
  53. package/src/sap/ui/rta/messagebundle_ca.properties +1 -0
  54. package/src/sap/ui/rta/messagebundle_cnr.properties +1 -0
  55. package/src/sap/ui/rta/messagebundle_cs.properties +1 -0
  56. package/src/sap/ui/rta/messagebundle_cy.properties +1 -0
  57. package/src/sap/ui/rta/messagebundle_da.properties +1 -0
  58. package/src/sap/ui/rta/messagebundle_de.properties +1 -0
  59. package/src/sap/ui/rta/messagebundle_el.properties +1 -0
  60. package/src/sap/ui/rta/messagebundle_en.properties +1 -0
  61. package/src/sap/ui/rta/messagebundle_en_GB.properties +1 -0
  62. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -1
  63. package/src/sap/ui/rta/messagebundle_es.properties +1 -0
  64. package/src/sap/ui/rta/messagebundle_es_MX.properties +1 -0
  65. package/src/sap/ui/rta/messagebundle_et.properties +1 -0
  66. package/src/sap/ui/rta/messagebundle_fi.properties +2 -1
  67. package/src/sap/ui/rta/messagebundle_fr.properties +10 -9
  68. package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -4
  69. package/src/sap/ui/rta/messagebundle_hi.properties +1 -0
  70. package/src/sap/ui/rta/messagebundle_hr.properties +32 -31
  71. package/src/sap/ui/rta/messagebundle_hu.properties +1 -0
  72. package/src/sap/ui/rta/messagebundle_id.properties +1 -0
  73. package/src/sap/ui/rta/messagebundle_it.properties +46 -45
  74. package/src/sap/ui/rta/messagebundle_iw.properties +1 -0
  75. package/src/sap/ui/rta/messagebundle_ja.properties +1 -0
  76. package/src/sap/ui/rta/messagebundle_kk.properties +1 -0
  77. package/src/sap/ui/rta/messagebundle_ko.properties +1 -0
  78. package/src/sap/ui/rta/messagebundle_lt.properties +1 -0
  79. package/src/sap/ui/rta/messagebundle_lv.properties +1 -0
  80. package/src/sap/ui/rta/messagebundle_mk.properties +1 -0
  81. package/src/sap/ui/rta/messagebundle_ms.properties +1 -0
  82. package/src/sap/ui/rta/messagebundle_nl.properties +1 -0
  83. package/src/sap/ui/rta/messagebundle_no.properties +1 -0
  84. package/src/sap/ui/rta/messagebundle_pl.properties +1 -0
  85. package/src/sap/ui/rta/messagebundle_pt.properties +1 -0
  86. package/src/sap/ui/rta/messagebundle_pt_PT.properties +1 -0
  87. package/src/sap/ui/rta/messagebundle_ro.properties +1 -0
  88. package/src/sap/ui/rta/messagebundle_ru.properties +1 -0
  89. package/src/sap/ui/rta/messagebundle_sh.properties +1 -0
  90. package/src/sap/ui/rta/messagebundle_sk.properties +1 -0
  91. package/src/sap/ui/rta/messagebundle_sl.properties +1 -0
  92. package/src/sap/ui/rta/messagebundle_sr.properties +1 -0
  93. package/src/sap/ui/rta/messagebundle_sv.properties +1 -0
  94. package/src/sap/ui/rta/messagebundle_th.properties +1 -0
  95. package/src/sap/ui/rta/messagebundle_tr.properties +1 -0
  96. package/src/sap/ui/rta/messagebundle_uk.properties +1 -0
  97. package/src/sap/ui/rta/messagebundle_vi.properties +1 -0
  98. package/src/sap/ui/rta/messagebundle_zh_CN.properties +1 -0
  99. package/src/sap/ui/rta/messagebundle_zh_TW.properties +1 -0
  100. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +33 -33
  101. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +1 -1
  102. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  103. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  104. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  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/ExtendControllerPlugin.js +161 -0
  109. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  110. package/src/sap/ui/rta/plugin/Plugin.js +3 -1
  111. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  112. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  113. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  114. package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
  115. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  116. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  117. package/src/sap/ui/rta/plugin/Settings.js +71 -61
  118. package/src/sap/ui/rta/plugin/Split.js +1 -1
  119. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  120. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  121. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  122. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  123. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  124. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  125. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +9 -5
  126. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +58 -9
  127. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +11 -4
  128. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +54 -17
  129. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  130. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  131. package/src/sap/ui/rta/service/Action.js +1 -1
  132. package/src/sap/ui/rta/service/ControllerExtension.js +10 -4
  133. package/src/sap/ui/rta/service/Outline.js +1 -1
  134. package/src/sap/ui/rta/service/Property.js +1 -1
  135. package/src/sap/ui/rta/service/Selection.js +1 -1
  136. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  137. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +5 -0
  138. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +21 -3
  139. package/src/sap/ui/rta/toolbar/Adaptation.js +33 -7
  140. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  141. package/src/sap/ui/rta/toolbar/Fiori.js +4 -3
  142. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  143. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  144. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  145. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  146. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  147. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  148. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  149. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  150. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  151. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  152. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  153. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  154. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  155. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +2 -2
  156. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
  157. package/src/sap/ui/rta/command/AppDescriptorCommand.js +0 -114
@@ -20,15 +20,15 @@ sap.ui.define([
20
20
  ) {
21
21
  "use strict";
22
22
 
23
- var Utils = {};
23
+ const Utils = {};
24
24
 
25
- var sModulePath = `${sap.ui.require.toUrl("sap/ui/rta/appVariant/manageApps/")}webapp`;
26
- var oI18n = ResourceBundle.create({
25
+ const sModulePath = `${sap.ui.require.toUrl("sap/ui/rta/appVariant/manageApps/")}webapp`;
26
+ const oI18n = ResourceBundle.create({
27
27
  url: `${sModulePath}/i18n/i18n.properties`
28
28
  });
29
29
 
30
30
  Utils._checkNavigationSupported = function(oNavigationParams) {
31
- var oUShellContainer = FlUtils.getUshellContainer();
31
+ const oUShellContainer = FlUtils.getUshellContainer();
32
32
  return oUShellContainer.getServiceAsync("Navigation")
33
33
  .then(function(oNavigationService) {
34
34
  return oNavigationService.getLinks([oNavigationParams]);
@@ -52,7 +52,7 @@ sap.ui.define([
52
52
 
53
53
  Utils._calculateCurrentStatus = function(sAppVariantInfoId, sAppVarStatus) {
54
54
  // Get the id of a new created app variant
55
- var sNewAppVariantId = AppVariantUtils.getNewAppVariantId();
55
+ const sNewAppVariantId = AppVariantUtils.getNewAppVariantId();
56
56
 
57
57
  if (sAppVarStatus === "R") {
58
58
  return oI18n.getText("MAA_OPERATION_IN_PROGRESS");
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  };
66
66
 
67
67
  Utils._checkMenuItemOptions = function(oPreparedObject, bAdaptUIButtonEnabled) {
68
- var oAppVarObject = {};
68
+ const oAppVarObject = {};
69
69
 
70
70
  if (oPreparedObject.isKeyUser) {
71
71
  if (oPreparedObject.isOriginal) {
@@ -112,21 +112,19 @@ sap.ui.define([
112
112
  };
113
113
 
114
114
  Utils._getNavigationInfo = function(oPreparedObject) {
115
- var oNavigationObject = {};
115
+ let oNavigationObject = {};
116
116
 
117
- var sSemanticObject = oPreparedObject.startWith.semanticObject;
118
- var sAction = oPreparedObject.startWith.action;
119
- var oParams = oPreparedObject.startWith.parameters;
117
+ const sSemanticObject = oPreparedObject.startWith.semanticObject;
118
+ const sAction = oPreparedObject.startWith.action;
119
+ const oParams = oPreparedObject.startWith.parameters;
120
120
 
121
- var oNavigationParams = {
121
+ const oNavigationParams = {
122
122
  semanticObject: sSemanticObject,
123
123
  action: sAction,
124
124
  params: oParams
125
125
  };
126
126
 
127
127
  return this._checkNavigationSupported(oNavigationParams).then(function(aResult) {
128
- var oDeleteButtonProperties;
129
-
130
128
  if (aResult[0].length && oPreparedObject.isKeyUser) {
131
129
  oNavigationObject.adaptUIButtonEnabled = true;
132
130
 
@@ -138,7 +136,7 @@ sap.ui.define([
138
136
  oNavigationObject.adaptUIButtonEnabled = false;
139
137
  }
140
138
 
141
- oDeleteButtonProperties = this._checkMenuItemOptions(oPreparedObject, oNavigationObject.adaptUIButtonEnabled);
139
+ const oDeleteButtonProperties = this._checkMenuItemOptions(oPreparedObject, oNavigationObject.adaptUIButtonEnabled);
142
140
 
143
141
  oNavigationObject.semanticObject = sSemanticObject;
144
142
  oNavigationObject.action = sAction;
@@ -174,9 +172,9 @@ sap.ui.define([
174
172
  };
175
173
 
176
174
  Utils.getAppVariantOverviewAttributes = function(oAppVariantInfo, bKeyUser) {
177
- var oAppVariantAttributes;
175
+ let oAppVariantAttributes;
178
176
  // Adding the tooltip to every icon which is shown on the App Variant Overview Dialog
179
- var sIconUrl = oAppVariantInfo.iconUrl;
177
+ const sIconUrl = oAppVariantInfo.iconUrl;
180
178
  if (sIconUrl && IconPool.isIconURI(sIconUrl)) {
181
179
  // eslint-disable-next-line prefer-destructuring
182
180
  oAppVariantInfo.iconText = sIconUrl.split("//")[1];
@@ -197,7 +195,7 @@ sap.ui.define([
197
195
  // Populate the app variant attributes with the cloud system information
198
196
  oAppVariantAttributes.isS4HanaCloud = bIsS4HanaCloud;
199
197
 
200
- var oPreparedObject = {
198
+ const oPreparedObject = {
201
199
  isKeyUser: bKeyUser,
202
200
  isOriginal: oAppVariantInfo.isOriginal,
203
201
  isS4HanaCloud: bIsS4HanaCloud,
@@ -213,16 +211,16 @@ sap.ui.define([
213
211
  }
214
212
 
215
213
  oAppVariantAttributes.adaptUIButtonEnabled = false;
216
- var oDeleteButtonProperties = this._checkMenuItemOptions(oPreparedObject, false);
214
+ const oDeleteButtonProperties = this._checkMenuItemOptions(oPreparedObject, false);
217
215
  oAppVariantAttributes = { ...oAppVariantAttributes, ...oDeleteButtonProperties };
218
216
  return Promise.resolve(oAppVariantAttributes);
219
217
  };
220
218
 
221
219
  Utils.getAppVariantOverview = function(sReferenceAppId, bKeyUser) {
222
220
  // Customer* means the layer can be either CUSTOMER or CUSTOMER_BASE. This layer determination takes place in backend.
223
- var sLayer = bKeyUser ? "CUSTOMER*" : "VENDOR";
221
+ const sLayer = bKeyUser ? "CUSTOMER*" : "VENDOR";
224
222
 
225
- var mPropertyBag = {
223
+ const mPropertyBag = {
226
224
  selector: {
227
225
  appId: sReferenceAppId
228
226
  },
@@ -230,8 +228,8 @@ sap.ui.define([
230
228
  };
231
229
 
232
230
  return AppVariantWriteAPI.listAllAppVariants(mPropertyBag).then(function(oResult) {
233
- var aAppVariantOverviewInfo = [];
234
- var aAppVariantInfo;
231
+ const aAppVariantOverviewInfo = [];
232
+ let aAppVariantInfo;
235
233
  if (oResult.response && oResult.response.items) {
236
234
  aAppVariantInfo = oResult.response.items;
237
235
  } else {
@@ -250,7 +248,7 @@ sap.ui.define([
250
248
  }.bind(this));
251
249
  };
252
250
 
253
- Utils.getDescriptor = function(mPropertyBag) {
251
+ Utils.getManifest = function(mPropertyBag) {
254
252
  return AppVariantWriteAPI.getManifest(mPropertyBag).then(function(oResult) {
255
253
  return oResult.response;
256
254
  });
@@ -36,19 +36,19 @@ sap.ui.define([
36
36
  ) {
37
37
  "use strict";
38
38
 
39
- var _sIdRunningApp;
40
- var _bKeyUser;
41
- var _sLayer;
42
- var _oCrossAppNavService;
43
- var sModulePath;
44
- var oI18n;
39
+ let _sIdRunningApp;
40
+ let _bKeyUser;
41
+ let _sLayer;
42
+ let _oCrossAppNavService;
43
+ let sModulePath;
44
+ let oI18n;
45
45
 
46
46
  return Controller.extend("sap.ui.rta.appVariant.manageApps.webapp.controller.ManageApps", {
47
47
  onInit() {
48
48
  _sIdRunningApp = this.getOwnerComponent().getIdRunningApp();
49
49
  _bKeyUser = this.getOwnerComponent().getIsOverviewForKeyUser();
50
50
  _sLayer = this.getOwnerComponent().getLayer();
51
- var oUShellContainer = FlUtils.getUshellContainer();
51
+ const oUShellContainer = FlUtils.getUshellContainer();
52
52
 
53
53
  if (!oI18n) {
54
54
  this._createResourceBundle();
@@ -79,7 +79,7 @@ sap.ui.define([
79
79
  }.bind(this))
80
80
  .catch(function(oError) {
81
81
  AppVariantUtils.closeOverviewDialog();
82
- var oErrorInfo = AppVariantUtils.buildErrorInfo("MSG_MANAGE_APPS_FAILED", oError);
82
+ const oErrorInfo = AppVariantUtils.buildErrorInfo("MSG_MANAGE_APPS_FAILED", oError);
83
83
  oErrorInfo.overviewDialog = true;
84
84
  BusyIndicator.hide();
85
85
  return AppVariantUtils.showRelevantDialog(oErrorInfo, false);
@@ -100,15 +100,15 @@ sap.ui.define([
100
100
  },
101
101
 
102
102
  _highlightNewCreatedAppVariant(aAppVariantOverviewAttributes) {
103
- var oTable = this.byId("Table1");
103
+ const oTable = this.byId("Table1");
104
104
  if (!oTable) {
105
105
  return Promise.resolve();
106
106
  }
107
107
  oTable.focus();
108
108
 
109
- aAppVariantOverviewAttributes.forEach(function(oAppVariantDescriptor, index) {
110
- if (oAppVariantDescriptor.currentStatus === oI18n.getText("MAA_NEW_APP_VARIANT")
111
- || oAppVariantDescriptor.currentStatus === oI18n.getText("MAA_OPERATION_IN_PROGRESS")
109
+ aAppVariantOverviewAttributes.forEach(function(oAppVariantManifest, index) {
110
+ if (oAppVariantManifest.currentStatus === oI18n.getText("MAA_NEW_APP_VARIANT")
111
+ || oAppVariantManifest.currentStatus === oI18n.getText("MAA_OPERATION_IN_PROGRESS")
112
112
  ) {
113
113
  if (oTable.getItems().length >= index) {
114
114
  oTable.getItems()[index].focus();
@@ -120,11 +120,11 @@ sap.ui.define([
120
120
  },
121
121
 
122
122
  _arrangeOverviewDataAndBindToModel(aAppVariantOverviewAttributes) {
123
- var aAdaptingAppAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
123
+ const aAdaptingAppAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
124
124
  return oAppVariantProperty.appId === _sIdRunningApp;
125
125
  });
126
126
 
127
- var oAdaptingAppAttributes = aAdaptingAppAttributes[0];
127
+ const oAdaptingAppAttributes = aAdaptingAppAttributes[0];
128
128
  if (oAdaptingAppAttributes && oAdaptingAppAttributes.appVarStatus !== "R") {
129
129
  oAdaptingAppAttributes.currentStatus = oI18n.getText("MAA_CURRENTLY_ADAPTING");
130
130
  }
@@ -135,11 +135,11 @@ sap.ui.define([
135
135
 
136
136
  aAppVariantOverviewAttributes.unshift(oAdaptingAppAttributes);
137
137
 
138
- var aReferenceAppAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
138
+ const aReferenceAppAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
139
139
  return oAppVariantProperty.isOriginal;
140
140
  });
141
141
 
142
- var oReferenceAppAttributes = aReferenceAppAttributes[0];
142
+ const oReferenceAppAttributes = aReferenceAppAttributes[0];
143
143
 
144
144
  aAppVariantOverviewAttributes = aAppVariantOverviewAttributes.filter(function(oAppVariantProperty) {
145
145
  return !oAppVariantProperty.isOriginal;
@@ -149,11 +149,11 @@ sap.ui.define([
149
149
 
150
150
  // Bind the app variant overview to JSON model
151
151
 
152
- var oModelData = {
152
+ const oModelData = {
153
153
  appVariants: aAppVariantOverviewAttributes
154
154
  };
155
155
 
156
- var oModel = Model.createModel(oModelData);
156
+ const oModel = Model.createModel(oModelData);
157
157
  this.getView().setModel(oModel);
158
158
 
159
159
  return Promise.resolve(aAppVariantOverviewAttributes);
@@ -216,8 +216,8 @@ sap.ui.define([
216
216
  },
217
217
 
218
218
  onMenuAction(oEvent) {
219
- var oItem = oEvent.getParameter("item");
220
- var sItemPath = "";
219
+ let oItem = oEvent.getParameter("item");
220
+ let sItemPath = "";
221
221
 
222
222
  while (oItem instanceof MenuItem) {
223
223
  sItemPath = `${oItem.getText()} > ${sItemPath}`;
@@ -242,11 +242,11 @@ sap.ui.define([
242
242
  },
243
243
 
244
244
  handleUiAdaptation(oEvent) {
245
- var sSemanticObject = this.getModelProperty("semanticObject", oEvent.getSource().getBindingContext());
246
- var sAction = this.getModelProperty("action", oEvent.getSource().getBindingContext());
247
- var oParams = this.getModelProperty("params", oEvent.getSource().getBindingContext());
245
+ const sSemanticObject = this.getModelProperty("semanticObject", oEvent.getSource().getBindingContext());
246
+ const sAction = this.getModelProperty("action", oEvent.getSource().getBindingContext());
247
+ const oParams = this.getModelProperty("params", oEvent.getSource().getBindingContext());
248
248
 
249
- var oNavigationParams;
249
+ let oNavigationParams;
250
250
  if (sSemanticObject && sAction && oParams) {
251
251
  oNavigationParams = {
252
252
  target: {
@@ -271,23 +271,23 @@ sap.ui.define([
271
271
  },
272
272
 
273
273
  copyId(oEvent) {
274
- var sCopiedId = this.getModelProperty("appId", oEvent.getSource().getBindingContext());
274
+ const sCopiedId = this.getModelProperty("appId", oEvent.getSource().getBindingContext());
275
275
  AppVariantUtils.copyId(sCopiedId);
276
276
  MessageToast.show(oI18n.getText("MAA_COPY_ID_SUCCESS"));
277
277
  },
278
278
 
279
279
  deleteAppVariant(oEvent) {
280
- var oInfo = {};
280
+ const oInfo = {};
281
281
  if (!oI18n) {
282
282
  this._createResourceBundle();
283
283
  }
284
- var sMessage = oI18n.getText("MSG_APP_VARIANT_DELETE_CONFIRMATION");
284
+ const sMessage = oI18n.getText("MSG_APP_VARIANT_DELETE_CONFIRMATION");
285
285
  oInfo.text = sMessage;
286
286
  oInfo.deleteAppVariant = true;
287
287
 
288
- var sAppVarId = this.getModelProperty("appId", oEvent.getSource().getBindingContext());
289
- var sCurrentStatus = this.getModelProperty("currentStatus", oEvent.getSource().getBindingContext());
290
- var bCurrentlyAdapting = sCurrentStatus === oI18n.getText("MAA_CURRENTLY_ADAPTING");
288
+ const sAppVarId = this.getModelProperty("appId", oEvent.getSource().getBindingContext());
289
+ const sCurrentStatus = this.getModelProperty("currentStatus", oEvent.getSource().getBindingContext());
290
+ const bCurrentlyAdapting = sCurrentStatus === oI18n.getText("MAA_CURRENTLY_ADAPTING");
291
291
 
292
292
  return AppVariantUtils.showRelevantDialog(oInfo)
293
293
  .then(function() {
@@ -1,9 +1,9 @@
1
1
 
2
2
  MAA_DIALOG_ICON=Ic\u00F4ne
3
3
  MAA_DIALOG_DESCRIPTION=Description
4
- MAA_DIALOG_COPY_ID_ACTION=Copier l'action d'ID
4
+ MAA_DIALOG_COPY_ID_ACTION=Action Copier l'ID
5
5
  MAA_DIALOG_ADAPT_UI_ACTION=Adapter l'action d'IU
6
- MAA_DIALOG_SAVE_AS_ACTION=Enregistrer en tant qu'action
6
+ MAA_DIALOG_SAVE_AS_ACTION=Action Enregistrer sous
7
7
  MAA_DIALOG_ACTIONS=Actions
8
8
  MAA_DIALOG_DELETE_APPVAR=Supprimer la variante d'application
9
9
  MAA_DIALOG_ADAPT_UI=Adapter l'IU
@@ -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.134.0
19
+ * @version 1.135.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.134.0
17
+ * @version 1.135.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.134.0
19
+ * @version 1.135.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.134.0
27
+ * @version 1.135.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.76
@@ -5,10 +5,18 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ui/fl/write/api/ChangesWriteAPI",
8
+ "sap/ui/fl/write/api/FeaturesAPI",
9
+ "sap/ui/fl/write/api/LocalResetAPI",
10
+ "sap/ui/fl/write/api/PersistenceWriteAPI",
11
+ "sap/ui/fl/LayerUtils",
8
12
  "sap/ui/rta/command/FlexCommand",
9
13
  "sap/ui/rta/library"
10
14
  ], function(
11
15
  ChangesWriteAPI,
16
+ FeaturesAPI,
17
+ LocalResetAPI,
18
+ PersistenceWriteAPI,
19
+ LayerUtils,
12
20
  FlexCommand,
13
21
  rtaLibrary
14
22
  ) {
@@ -21,7 +29,7 @@ sap.ui.define([
21
29
  * @extends sap.ui.rta.command.FlexCommand
22
30
  *
23
31
  * @author SAP SE
24
- * @version 1.134.0
32
+ * @version 1.135.0
25
33
  *
26
34
  * @constructor
27
35
  * @private
@@ -40,6 +48,10 @@ sap.ui.define([
40
48
  },
41
49
  content: {
42
50
  type: "any"
51
+ },
52
+ changesToDelete: {
53
+ type: "object[]",
54
+ defaultValue: []
43
55
  }
44
56
  },
45
57
  events: {}
@@ -47,6 +59,7 @@ sap.ui.define([
47
59
  });
48
60
 
49
61
  AnnotationCommand.prototype._createChange = function(mFlexSettings, sVariantManagementReference, sCommand) {
62
+ this._aToBeResetChanges = [];
50
63
  const mChangeSpecificData = {
51
64
  ...this._getChangeSpecificData(),
52
65
  ...mFlexSettings,
@@ -55,6 +68,36 @@ sap.ui.define([
55
68
  jsOnly: this.getJsOnly(),
56
69
  generator: mFlexSettings.generator || rtaLibrary.GENERATOR_NAME
57
70
  };
71
+
72
+ if (this.getChangesToDelete().length) {
73
+ // If available, all changes of the current layer must be deleted via the LocalResetAPI
74
+ // Changes in a lower layer can't be deleted via the LocalResetAPI and must be deleted via the deactivate change
75
+ const aToBeDeactivatedChanges = [];
76
+ if (FeaturesAPI.isLocalResetEnabled()) {
77
+ this.getChangesToDelete().forEach((oFlexObject) => {
78
+ if (LayerUtils.compareAgainstCurrentLayer(oFlexObject.getLayer(), mFlexSettings.layer) === -1) {
79
+ aToBeDeactivatedChanges.push(oFlexObject);
80
+ } else {
81
+ this._aToBeResetChanges.push(oFlexObject);
82
+ }
83
+ });
84
+ } else {
85
+ aToBeDeactivatedChanges.push(...this.getChangesToDelete());
86
+ }
87
+
88
+ if (aToBeDeactivatedChanges.length) {
89
+ this._oDeactivateChange = ChangesWriteAPI.create({
90
+ changeSpecificData: {
91
+ changeType: "deactivateChanges",
92
+ content: { changeIds: aToBeDeactivatedChanges.map((oFlexObject) => oFlexObject.getId()) },
93
+ generator: mFlexSettings.generator || rtaLibrary.GENERATOR_NAME,
94
+ layer: mFlexSettings.layer
95
+ },
96
+ selector: this.getAppComponent()
97
+ });
98
+ }
99
+ }
100
+
58
101
  return ChangesWriteAPI.create({
59
102
  changeSpecificData: mChangeSpecificData,
60
103
  annotationChange: true,
@@ -62,12 +105,29 @@ sap.ui.define([
62
105
  });
63
106
  };
64
107
 
65
- AnnotationCommand.prototype.execute = function() {
66
- return Promise.resolve();
108
+ AnnotationCommand.prototype.execute = async function() {
109
+ // Annotation changes can only be applied during app start, so execute and undo only have to take care of reset / deactivate changes
110
+ if (this._aToBeResetChanges.length) {
111
+ await LocalResetAPI.resetChanges(this._aToBeResetChanges, this.getAppComponent(), true);
112
+ }
113
+ if (this._oDeactivateChange) {
114
+ PersistenceWriteAPI.add({
115
+ selector: this.getAppComponent(),
116
+ flexObjects: [this._oDeactivateChange]
117
+ });
118
+ }
67
119
  };
68
120
 
69
- AnnotationCommand.prototype.undo = function() {
70
- return Promise.resolve();
121
+ AnnotationCommand.prototype.undo = async function() {
122
+ if (this._aToBeResetChanges.length) {
123
+ await LocalResetAPI.restoreChanges(this._aToBeResetChanges, this.getAppComponent(), true);
124
+ }
125
+ if (this._oDeactivateChange) {
126
+ PersistenceWriteAPI.remove({
127
+ selector: this.getAppComponent(),
128
+ flexObjects: [this._oDeactivateChange]
129
+ });
130
+ }
71
131
  };
72
132
 
73
133
  /**
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @extends sap.ui.base.ManagedObject
17
17
  *
18
18
  * @author SAP SE
19
- * @version 1.134.0
19
+ * @version 1.135.0
20
20
  *
21
21
  * @constructor
22
22
  * @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.134.0
29
+ * @version 1.135.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.134.0
19
+ * @version 1.135.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.46