@openui5/sap.ui.rta 1.115.1 → 1.117.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 (178) hide show
  1. package/.eslintrc.json +33 -2
  2. package/.reuse/dep5 +0 -5
  3. package/THIRDPARTY.txt +1 -7
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +60 -59
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +256 -254
  8. package/src/sap/ui/rta/Utils.js +42 -42
  9. package/src/sap/ui/rta/api/startAdaptation.js +2 -2
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +100 -103
  13. package/src/sap/ui/rta/appVariant/Feature.js +75 -77
  14. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
  15. package/src/sap/ui/rta/appVariant/Utils.js +17 -17
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
  17. package/src/sap/ui/rta/command/AddIFrame.js +7 -7
  18. package/src/sap/ui/rta/command/AddProperty.js +7 -7
  19. package/src/sap/ui/rta/command/AddXML.js +1 -1
  20. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
  21. package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
  22. package/src/sap/ui/rta/command/BaseCommand.js +1 -2
  23. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  24. package/src/sap/ui/rta/command/Combine.js +1 -1
  25. package/src/sap/ui/rta/command/CommandFactory.js +11 -11
  26. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  27. package/src/sap/ui/rta/command/ControlVariantConfigure.js +28 -3
  28. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  29. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
  30. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
  31. package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
  32. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  33. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  34. package/src/sap/ui/rta/command/FlexCommand.js +30 -30
  35. package/src/sap/ui/rta/command/LREPSerializer.js +20 -10
  36. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  37. package/src/sap/ui/rta/command/Move.js +1 -1
  38. package/src/sap/ui/rta/command/Property.js +1 -1
  39. package/src/sap/ui/rta/command/Remove.js +1 -1
  40. package/src/sap/ui/rta/command/Rename.js +1 -1
  41. package/src/sap/ui/rta/command/Resize.js +1 -1
  42. package/src/sap/ui/rta/command/Reveal.js +1 -1
  43. package/src/sap/ui/rta/command/Settings.js +1 -1
  44. package/src/sap/ui/rta/command/Split.js +1 -1
  45. package/src/sap/ui/rta/command/Stack.js +4 -4
  46. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  47. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  48. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  49. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  50. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  51. package/src/sap/ui/rta/enablement/TestDelegate.js +92 -92
  52. package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
  53. package/src/sap/ui/rta/library.js +2 -2
  54. package/src/sap/ui/rta/messagebundle.properties +11 -1
  55. package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
  56. package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
  57. package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
  58. package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
  59. package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
  60. package/src/sap/ui/rta/messagebundle_da.properties +5 -0
  61. package/src/sap/ui/rta/messagebundle_de.properties +6 -1
  62. package/src/sap/ui/rta/messagebundle_el.properties +5 -0
  63. package/src/sap/ui/rta/messagebundle_en.properties +5 -0
  64. package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
  65. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
  66. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
  67. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
  68. package/src/sap/ui/rta/messagebundle_es.properties +5 -0
  69. package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
  70. package/src/sap/ui/rta/messagebundle_et.properties +5 -0
  71. package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
  72. package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
  73. package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
  74. package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
  75. package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
  76. package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
  77. package/src/sap/ui/rta/messagebundle_id.properties +5 -0
  78. package/src/sap/ui/rta/messagebundle_it.properties +5 -0
  79. package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
  80. package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
  81. package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
  82. package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
  83. package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
  84. package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
  85. package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
  86. package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
  87. package/src/sap/ui/rta/messagebundle_no.properties +5 -0
  88. package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
  89. package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
  90. package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
  91. package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
  92. package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
  93. package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
  94. package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
  95. package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
  96. package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
  97. package/src/sap/ui/rta/messagebundle_th.properties +5 -0
  98. package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
  99. package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
  100. package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
  101. package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
  102. package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
  103. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
  104. package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
  105. package/src/sap/ui/rta/plugin/Combine.js +9 -9
  106. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
  107. package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
  108. package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
  109. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  110. package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
  111. package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
  112. package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
  113. package/src/sap/ui/rta/plugin/Plugin.js +20 -20
  114. package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
  115. package/src/sap/ui/rta/plugin/Remove.js +11 -11
  116. package/src/sap/ui/rta/plugin/Rename.js +7 -7
  117. package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
  118. package/src/sap/ui/rta/plugin/Resize.js +62 -62
  119. package/src/sap/ui/rta/plugin/Selection.js +14 -14
  120. package/src/sap/ui/rta/plugin/Settings.js +20 -20
  121. package/src/sap/ui/rta/plugin/Split.js +7 -7
  122. package/src/sap/ui/rta/plugin/Stretch.js +4 -4
  123. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
  124. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
  125. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
  126. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
  128. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
  129. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
  130. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
  133. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  134. package/src/sap/ui/rta/service/Action.js +36 -37
  135. package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
  136. package/src/sap/ui/rta/service/Outline.js +59 -59
  137. package/src/sap/ui/rta/service/Property.js +125 -125
  138. package/src/sap/ui/rta/service/Receiver.js +78 -77
  139. package/src/sap/ui/rta/service/Selection.js +6 -6
  140. package/src/sap/ui/rta/service/SupportTools.js +188 -37
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
  143. package/src/sap/ui/rta/themes/base/library.source.less +2 -1
  144. package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
  145. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Base.js +17 -15
  147. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
  148. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  149. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  150. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
  151. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  152. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  153. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
  154. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  155. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
  156. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
  158. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
  159. package/src/sap/ui/rta/util/Animation.js +5 -5
  160. package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
  161. package/src/sap/ui/rta/util/PluginManager.js +25 -25
  162. package/src/sap/ui/rta/util/PopupManager.js +27 -27
  163. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  164. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  165. package/src/sap/ui/rta/util/StylesLoader.js +9 -9
  166. package/src/sap/ui/rta/util/UrlParser.js +19 -19
  167. package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
  168. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
  169. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
  170. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
  171. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
  172. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  173. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  174. package/src/sap/ui/rta/util/hasStableId.js +2 -2
  175. package/src/sap/ui/rta/util/showMessageBox.js +4 -5
  176. package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
  177. package/src/sap/ui/rta/util/validateStableIds.js +8 -8
  178. package/ui5.yaml +1 -1
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  var SINGULAR = true;
39
39
  var PLURAL = false;
40
40
 
41
- function isThereAnAggregationActionForSameAggregation (mActions, mParents) {
41
+ function isThereAnAggregationActionForSameAggregation(mActions, mParents) {
42
42
  var sResponsibleElementsParentAggregation = mParents.responsibleElementOverlay.getParentAggregationOverlay().getAggregationName();
43
43
  return Object.keys(mActions).some(function(sAggregationName) {
44
44
  return sAggregationName === sResponsibleElementsParentAggregation;
@@ -75,7 +75,7 @@ sap.ui.define([
75
75
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
76
76
  * @extends sap.ui.rta.plugin.Plugin
77
77
  * @author SAP SE
78
- * @version 1.115.1
78
+ * @version 1.117.0
79
79
  * @constructor
80
80
  * @private
81
81
  * @since 1.44
@@ -104,7 +104,7 @@ sap.ui.define([
104
104
 
105
105
  // For add elements plugin, include other aggregations which are potentially valid targets for hidden elements
106
106
  _getRelevantOverlays: function(oOverlay) {
107
- var aRelevantOverlays = OverlayUtil.findAllOverlaysInContainer(oOverlay, /*bIncludeOtherAggregations=*/true);
107
+ var aRelevantOverlays = OverlayUtil.findAllOverlaysInContainer(oOverlay, /* bIncludeOtherAggregations= */true);
108
108
 
109
109
  oOverlay.setRelevantOverlays(aRelevantOverlays);
110
110
  return aRelevantOverlays;
@@ -145,7 +145,7 @@ sap.ui.define([
145
145
  },
146
146
 
147
147
  isAvailable: function(aElementOverlays, bOverlayIsSibling) {
148
- return aElementOverlays.every(function (oElementOverlay) {
148
+ return aElementOverlays.every(function(oElementOverlay) {
149
149
  return this._isEditableByPlugin(oElementOverlay, bOverlayIsSibling);
150
150
  }, this);
151
151
  },
@@ -235,72 +235,72 @@ sap.ui.define([
235
235
  var aAllElements = [];
236
236
 
237
237
  return ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this, undefined, this.getDesignTime())
238
- .then(function(mRetrievedActions) {
239
- if (sAggregationName === "$$OnlyChildCustomField$$") {
240
- return [];
241
- }
242
- mActions = mRetrievedActions[sAggregationName];
243
- return this.getAllElements(bOverlayIsSibling, [mParents.responsibleElementOverlay], sControlName, sDisplayText);
244
- }.bind(this))
238
+ .then(function(mRetrievedActions) {
239
+ if (sAggregationName === "$$OnlyChildCustomField$$") {
240
+ return [];
241
+ }
242
+ mActions = mRetrievedActions[sAggregationName];
243
+ return this.getAllElements(bOverlayIsSibling, [mParents.responsibleElementOverlay], sControlName, sDisplayText);
244
+ }.bind(this))
245
+
246
+ .then(function(aCollectedElements) {
247
+ aAllElements = aCollectedElements;
248
+ // getAllElements() also sets the extensibility info
249
+ var oExtensibilityInfo = this.getExtensibilityInfo(bOverlayIsSibling);
250
+ this.getDialog().setCustomFieldEnabled(!!oExtensibilityInfo);
251
+ if (oExtensibilityInfo) {
252
+ this.getDialog().detachEvent("openCustomField", this._onOpenCustomField, this);
253
+ this.getDialog().attachEvent("openCustomField", bOverlayIsSibling, this._onOpenCustomField, this);
254
+ this.getDialog().setCustomFieldButtonVisible(true);
255
+ return this.getDialog().addExtensionData(oExtensibilityInfo.extensionData);
256
+ }
257
+ return this.getDialog().setCustomFieldButtonVisible(false);
258
+ }.bind(this))
259
+
260
+ .then(function() {
261
+ var oAggregationWithElements = aAllElements.filter(function(mElementsPerAggregation) {
262
+ return mElementsPerAggregation.aggregation === sAggregationName;
263
+ })[0];
264
+ var aElementsPerAggregation = oAggregationWithElements ? oAggregationWithElements.elements : [];
265
+
266
+ this.getDialog().setElements(aElementsPerAggregation);
267
+ if (sDisplayText) {
268
+ // Aggregation is part of title
269
+ var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
270
+ var sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", sDisplayText);
271
+ this.getDialog().setTitle(sDialogTitle);
272
+ } else if (sAggregationName || sControlName) {
273
+ // Only one aggregation, no aggregation in title
274
+ this._setDialogTitle(mActions || {}, mParents.parent, sControlName);
275
+ }
245
276
 
246
- .then(function(aCollectedElements) {
247
- aAllElements = aCollectedElements;
248
- // getAllElements() also sets the extensibility info
249
- var oExtensibilityInfo = this.getExtensibilityInfo(bOverlayIsSibling);
250
- this.getDialog().setCustomFieldEnabled(!!oExtensibilityInfo);
251
- if (oExtensibilityInfo) {
252
- this.getDialog().detachEvent("openCustomField", this._onOpenCustomField, this);
253
- this.getDialog().attachEvent("openCustomField", bOverlayIsSibling, this._onOpenCustomField, this);
254
- this.getDialog().setCustomFieldButtonVisible(true);
255
- return this.getDialog().addExtensionData(oExtensibilityInfo.extensionData);
256
- }
257
- return this.getDialog().setCustomFieldButtonVisible(false);
258
- }.bind(this))
277
+ return this.getDialog().open()
259
278
 
260
279
  .then(function() {
261
- var oAggregationWithElements = aAllElements.filter(function(mElementsPerAggregation) {
262
- return mElementsPerAggregation.aggregation === sAggregationName;
263
- })[0];
264
- var aElementsPerAggregation = oAggregationWithElements ? oAggregationWithElements.elements : [];
265
-
266
- this.getDialog().setElements(aElementsPerAggregation);
267
- if (sDisplayText) {
268
- //Aggregation is part of title
269
- var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
270
- var sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", sDisplayText);
271
- this.getDialog().setTitle(sDialogTitle);
272
- } else if (sAggregationName || sControlName) {
273
- //Only one aggregation, no aggregation in title
274
- this._setDialogTitle(mActions || {}, mParents.parent, sControlName);
275
- }
276
-
277
- return this.getDialog().open()
278
-
279
- .then(function() {
280
- var aSelectedElements = this.getDialog().getSelectedElements();
281
- return CommandBuilder.createCommands(mParents, vSiblingElement, mActions, iIndex, aSelectedElements, sAggregationName, this);
282
- }.bind(this))
283
-
284
- .then(function() {
285
- var oOverlayToFocus = OverlayRegistry.getOverlay(vSiblingElement) || oResponsibleElementOverlay;
286
- oOverlayToFocus.focus();
287
- })
288
-
289
- .catch(function(oError) {
290
- //no error means canceled dialog
291
- if (oError instanceof Error) {
292
- throw oError;
293
- }
294
- });
280
+ var aSelectedElements = this.getDialog().getSelectedElements();
281
+ return CommandBuilder.createCommands(mParents, vSiblingElement, mActions, iIndex, aSelectedElements, sAggregationName, this);
295
282
  }.bind(this))
296
283
 
284
+ .then(function() {
285
+ var oOverlayToFocus = OverlayRegistry.getOverlay(vSiblingElement) || oResponsibleElementOverlay;
286
+ oOverlayToFocus.focus();
287
+ })
288
+
297
289
  .catch(function(oError) {
290
+ // no error means canceled dialog
298
291
  if (oError instanceof Error) {
299
292
  throw oError;
300
- } else {
301
- Log.info("Service not up to date, skipping add dialog", "sap.ui.rta");
302
293
  }
303
294
  });
295
+ }.bind(this))
296
+
297
+ .catch(function(oError) {
298
+ if (oError instanceof Error) {
299
+ throw oError;
300
+ } else {
301
+ Log.info("Service not up to date, skipping add dialog", "sap.ui.rta");
302
+ }
303
+ });
304
304
  },
305
305
 
306
306
  _setDialogTitle: function(mActions, oParentElement, sControlName) {
@@ -308,8 +308,8 @@ sap.ui.define([
308
308
  this.getDialog().setTitle(sDialogTitle);
309
309
  },
310
310
 
311
- //Function called when custom field button was pressed
312
- _onOpenCustomField: function (oEvent, bOverlayIsSibling) {
311
+ // Function called when custom field button was pressed
312
+ _onOpenCustomField: function(oEvent, bOverlayIsSibling) {
313
313
  var sRtaStyleClassName = Utils.getRtaStyleClassName();
314
314
  return FieldExtensibility.onTriggerCreateExtensionData(this.getExtensibilityInfo(bOverlayIsSibling), sRtaStyleClassName);
315
315
  },
@@ -323,57 +323,57 @@ sap.ui.define([
323
323
  */
324
324
  _isEditable: function(oOverlay, mPropertyBag) {
325
325
  return Promise.all([this._isEditableCheck(mPropertyBag.sourceElementOverlay, true), this._isEditableCheck(mPropertyBag.sourceElementOverlay, false)])
326
- .then(function(aPromiseValues) {
327
- return {
328
- asSibling: aPromiseValues[0],
329
- asChild: aPromiseValues[1]
330
- };
331
- })
332
- .catch(function (vError) {
333
- Log.error(vError);
334
- });
326
+ .then(function(aPromiseValues) {
327
+ return {
328
+ asSibling: aPromiseValues[0],
329
+ asChild: aPromiseValues[1]
330
+ };
331
+ })
332
+ .catch(function(vError) {
333
+ Log.error(vError);
334
+ });
335
335
  },
336
336
 
337
337
  _isEditableCheck: function(oOverlay, bOverlayIsSibling) {
338
338
  return Promise.resolve()
339
- .then(function() {
340
- var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
339
+ .then(function() {
340
+ var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
341
341
 
342
- if (!mParents.relevantContainerOverlay) {
343
- return false;
344
- }
342
+ if (!mParents.relevantContainerOverlay) {
343
+ return false;
344
+ }
345
345
 
346
- return ActionExtractor.getActions(bOverlayIsSibling, oOverlay, this, true, this.getDesignTime())
347
- .then(function (mActions) {
348
- this.clearCachedElements();
349
- return Utils.doIfAllControlsAreAvailable([oOverlay, mParents.parentOverlay], function () {
350
- var bEditable = false;
351
- // For the sibling case, check if anything is available for the same aggregation
352
- if (bOverlayIsSibling) {
353
- bEditable = isThereAnAggregationActionForSameAggregation(mActions, mParents);
354
- } else {
355
- bEditable = Object.keys(mActions).some(function(sAggregationName) {
356
- if (mActions[sAggregationName].addViaDelegate) {
357
- bEditable = this.checkAggregationsOnSelf(mParents.parentOverlay, "add", undefined, "delegate");
358
- }
359
- if (!bEditable && mActions[sAggregationName].reveal) {
360
- return true;
361
- }
362
- return bEditable;
363
- }.bind(this));
346
+ return ActionExtractor.getActions(bOverlayIsSibling, oOverlay, this, true, this.getDesignTime())
347
+ .then(function(mActions) {
348
+ this.clearCachedElements();
349
+ return Utils.doIfAllControlsAreAvailable([oOverlay, mParents.parentOverlay], function() {
350
+ var bEditable = false;
351
+ // For the sibling case, check if anything is available for the same aggregation
352
+ if (bOverlayIsSibling) {
353
+ bEditable = isThereAnAggregationActionForSameAggregation(mActions, mParents);
354
+ } else {
355
+ bEditable = Object.keys(mActions).some(function(sAggregationName) {
356
+ if (mActions[sAggregationName].addViaDelegate) {
357
+ bEditable = this.checkAggregationsOnSelf(mParents.parentOverlay, "add", undefined, "delegate");
358
+ }
359
+ if (!bEditable && mActions[sAggregationName].reveal) {
360
+ return true;
364
361
  }
365
362
  return bEditable;
366
363
  }.bind(this));
367
- }.bind(this))
368
- .then(function (bEditable) {
369
- if (bEditable) {
370
- bEditable =
371
- this.hasStableId(oOverlay) //don't confuse the user/Web IDE by an editable overlay without stable ID
364
+ }
365
+ return bEditable;
366
+ }.bind(this));
367
+ }.bind(this))
368
+ .then(function(bEditable) {
369
+ if (bEditable) {
370
+ bEditable =
371
+ this.hasStableId(oOverlay) // don't confuse the user/Web IDE by an editable overlay without stable ID
372
372
  && this.hasStableId(mParents.parentOverlay);
373
- }
374
- return bEditable;
375
- }.bind(this));
373
+ }
374
+ return bEditable;
376
375
  }.bind(this));
376
+ }.bind(this));
377
377
  },
378
378
 
379
379
  /**
@@ -398,41 +398,41 @@ sap.ui.define([
398
398
  this.clearExtensibilityInfo(bOverlayIsSibling);
399
399
 
400
400
  return ActionExtractor.getActions(bOverlayIsSibling, oElementOverlay, this, undefined, this.getDesignTime())
401
- .then(function(mAllActions) {
402
- each(mAllActions, function(sAggregationName) {
403
- mActions = mAllActions[sAggregationName];
404
- mActions.aggregation = sAggregationName;
405
- if (mActions.addViaDelegate) {
406
- bCheckExtensibility = true;
407
- }
408
- aPromises.push({
409
- aggregation: sAggregationName,
410
- elementPromises: [
411
- mActions.reveal ? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions) : Promise.resolve([]),
412
- mActions.addViaDelegate ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate) : Promise.resolve([])
413
- ]
414
- });
415
- });
416
- if (bCheckExtensibility) {
417
- return handleExtensibility(mParents.parent);
401
+ .then(function(mAllActions) {
402
+ each(mAllActions, function(sAggregationName) {
403
+ mActions = mAllActions[sAggregationName];
404
+ mActions.aggregation = sAggregationName;
405
+ if (mActions.addViaDelegate) {
406
+ bCheckExtensibility = true;
418
407
  }
419
- return undefined;
420
- })
408
+ aPromises.push({
409
+ aggregation: sAggregationName,
410
+ elementPromises: [
411
+ mActions.reveal ? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions) : Promise.resolve([]),
412
+ mActions.addViaDelegate ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate) : Promise.resolve([])
413
+ ]
414
+ });
415
+ });
416
+ if (bCheckExtensibility) {
417
+ return handleExtensibility(mParents.parent);
418
+ }
419
+ return undefined;
420
+ })
421
421
 
422
- .then(function(oExtensibilityInfo) {
423
- this.setExtensibilityInfo(bOverlayIsSibling, oExtensibilityInfo);
424
- }.bind(this))
422
+ .then(function(oExtensibilityInfo) {
423
+ this.setExtensibilityInfo(bOverlayIsSibling, oExtensibilityInfo);
424
+ }.bind(this))
425
425
 
426
- .then(this._combineAnalyzerResults.bind(this, aPromises))
426
+ .then(this._combineAnalyzerResults.bind(this, aPromises))
427
427
 
428
- .then(function(aAllElements) {
429
- this.setCachedElements(aAllElements, bOverlayIsSibling);
430
- return aAllElements;
431
- }.bind(this))
428
+ .then(function(aAllElements) {
429
+ this.setCachedElements(aAllElements, bOverlayIsSibling);
430
+ return aAllElements;
431
+ }.bind(this))
432
432
 
433
- .catch(function(oError) {
434
- throw oError;
435
- });
433
+ .catch(function(oError) {
434
+ throw oError;
435
+ });
436
436
  },
437
437
 
438
438
  /**
@@ -442,7 +442,7 @@ sap.ui.define([
442
442
  * @param {sap.ui.dt.ElementOverlay} aElementOverlays - List of overlays for which the context menu was opened
443
443
  * @return {object[]} Array containing the items with required data
444
444
  */
445
- getMenuItems: function (aElementOverlays) {
445
+ getMenuItems: function(aElementOverlays) {
446
446
  var aMenuItems = [];
447
447
  var oMenuItem;
448
448
  this.clearCachedElements();
@@ -499,7 +499,7 @@ sap.ui.define([
499
499
  aSubMenuItems = aSubMenuItems.concat(this._buildSubmenuItems(true, aElementOverlays, aElementsWithAggregations[1]));
500
500
  }
501
501
  } else {
502
- vHandler = function (bOverlayIsSibling, aElementOverlays) {
502
+ vHandler = function(bOverlayIsSibling, aElementOverlays) {
503
503
  return this.showAvailableElements(bOverlayIsSibling, sAggregationName, aElementOverlays);
504
504
  }.bind(this, bOverlayIsSibling);
505
505
  }
@@ -542,12 +542,12 @@ sap.ui.define([
542
542
  var sAggregationName = mElementsWithAggregation.aggregation;
543
543
  var sDisplayText = getMenuItemText(bOverlayIsSibling, sAggregationName, aElementOverlays);
544
544
  var oItem = {
545
- id: sPluginId + '_' + iPosition,
545
+ id: sPluginId + "_" + iPosition,
546
546
  text: sDisplayText,
547
547
  enabled: function(aElementOverlays) {
548
548
  return this.isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName);
549
549
  }.bind(this),
550
- handler: function (bOverlayIsSibling, aElementOverlays) {
550
+ handler: function(bOverlayIsSibling, aElementOverlays) {
551
551
  // showAvailableElements has optional parameters
552
552
  return this.showAvailableElements(bOverlayIsSibling, sAggregationName, aElementOverlays, undefined, undefined, sDisplayText);
553
553
  }.bind(this, bOverlayIsSibling),
@@ -607,25 +607,25 @@ sap.ui.define([
607
607
  });
608
608
 
609
609
  return Promise.all(aCollectedPromises)
610
- .then(function(aElementsPerAggregation) {
611
- // Filter out results without elements
612
- return aElementsPerAggregation.filter(function(oElementsPerAggregation) {
613
- var aElements = oElementsPerAggregation && oElementsPerAggregation.elements;
614
- return aElements.length > 0;
615
- });
610
+ .then(function(aElementsPerAggregation) {
611
+ // Filter out results without elements
612
+ return aElementsPerAggregation.filter(function(oElementsPerAggregation) {
613
+ var aElements = oElementsPerAggregation && oElementsPerAggregation.elements;
614
+ return aElements.length > 0;
616
615
  });
616
+ });
617
617
  },
618
618
 
619
619
  clearCachedElements: function() {
620
620
  this._oCachedElements = undefined;
621
621
  },
622
622
 
623
- setCachedElements: function (aElements, bOverlayIsSibling) {
623
+ setCachedElements: function(aElements, bOverlayIsSibling) {
624
624
  this._oCachedElements = this._oCachedElements || {};
625
625
  this._oCachedElements[bOverlayIsSibling ? "asSibling" : "asChild"] = aElements;
626
626
  },
627
627
 
628
- getCachedElements: function (bOverlayIsSibling) {
628
+ getCachedElements: function(bOverlayIsSibling) {
629
629
  if (this._oCachedElements) {
630
630
  return this._oCachedElements[bOverlayIsSibling ? "asSibling" : "asChild"];
631
631
  }
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * Helper object containing methods for the AdditionalElements plugin
16
16
  *
17
17
  * @author SAP SE
18
- * @version 1.115.1
18
+ * @version 1.117.0
19
19
  * @private
20
20
  * @since 1.94
21
21
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @returns {sap.ui.dt.ElementDesignTimeMetadata} Design time metadata
29
29
  */
30
30
  function getDTMetadataFromActions(mActions) {
31
- return mActions["addViaDelegate"] && mActions["addViaDelegate"].designTimeMetadata;
31
+ return mActions.addViaDelegate && mActions.addViaDelegate.designTimeMetadata;
32
32
  }
33
33
 
34
34
  /**
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  relevantContainerOverlay: oRelevantContainerOverlay,
60
60
  parentOverlay: oParentOverlay,
61
61
  relevantContainer: oRelevantContainer,
62
- parent: oParentOverlay && oParentOverlay.getElement() //root overlay has no parent
62
+ parent: oParentOverlay && oParentOverlay.getElement() // root overlay has no parent
63
63
  };
64
64
  };
65
65
 
@@ -99,7 +99,6 @@ sap.ui.define([
99
99
  return _aNames;
100
100
  }, []);
101
101
 
102
-
103
102
  var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
104
103
 
105
104
  if (aNonDuplicateNames.length === 1) {
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * Helper object to build the RTA commands resulting from the AdditionalElements Plugin
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.115.1
28
+ * @version 1.117.0
29
29
  * @private
30
30
  * @since 1.94
31
31
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -55,20 +55,20 @@ sap.ui.define([
55
55
  var sTargetAggregation = mPropertyBag.targetAggregation;
56
56
  var oPlugin = mPropertyBag.plugin;
57
57
  return createRevealCommandForInvisible(oSelectedElement, mActions, mParents, oPlugin)
58
- .then(function(oRevealCommandForInvisible) {
59
- oCompositeCommand.addCommand(oRevealCommandForInvisible);
60
- return createMoveCommandForInvisible(oSelectedElement, mParents, oSiblingElement, iIndex, sTargetAggregation, oPlugin);
61
- })
62
- .then(function(oMoveCommandForInvisible) {
63
- if (oMoveCommandForInvisible) {
64
- oCompositeCommand.addCommand(oMoveCommandForInvisible);
65
- } else {
66
- Log.warning("No move action configured for "
58
+ .then(function(oRevealCommandForInvisible) {
59
+ oCompositeCommand.addCommand(oRevealCommandForInvisible);
60
+ return createMoveCommandForInvisible(oSelectedElement, mParents, oSiblingElement, iIndex, sTargetAggregation, oPlugin);
61
+ })
62
+ .then(function(oMoveCommandForInvisible) {
63
+ if (oMoveCommandForInvisible) {
64
+ oCompositeCommand.addCommand(oMoveCommandForInvisible);
65
+ } else {
66
+ Log.warning("No move action configured for "
67
67
  + mParents.parent.getMetadata().getName()
68
68
  + ", aggregation: " + oSelectedElement.aggregation, "sap.ui.rta");
69
- }
70
- return oCompositeCommand;
71
- });
69
+ }
70
+ return oCompositeCommand;
71
+ });
72
72
  }
73
73
 
74
74
  function createRevealCommandForInvisible(mSelectedElement, mActions, mParents, oPlugin) {
@@ -102,7 +102,7 @@ sap.ui.define([
102
102
  function createMoveCommandForInvisible(oSelectedElement, mParents, oSiblingElement, iIndex, sTargetAggregationName, oPlugin) {
103
103
  var oRevealedElement = ElementUtil.getElementInstance(oSelectedElement.elementId);
104
104
  var oRevealedElementOverlay = OverlayRegistry.getOverlay(oRevealedElement);
105
- //Elements can also be moved between aggregations inside the parent
105
+ // Elements can also be moved between aggregations inside the parent
106
106
  var sSourceAggregationName = oSelectedElement.sourceAggregation;
107
107
  var oSourceParent = oRevealedElementOverlay.getParentElementOverlay().getElement() || mParents.parent;
108
108
  var oTargetParent = mParents.parent;
@@ -171,18 +171,18 @@ sap.ui.define([
171
171
  var oParentAggregationOverlay = mPropertyBag.parents.parentOverlay.getAggregationOverlay(mPropertyBag.actions.aggregation);
172
172
  var oParentAggregationDTMetadata = oParentAggregationOverlay.getDesignTimeMetadata();
173
173
  return createCommandForAddLibrary(mPropertyBag.parents, mRequiredLibraries, oParentAggregationDTMetadata, mPropertyBag.plugin)
174
- .then(function(oCommandForAddLibrary) {
175
- if (oCommandForAddLibrary) {
176
- oCompositeCommand.addCommand(oCommandForAddLibrary);
177
- }
178
- return createAddViaDelegateCommand(mPropertyBag, oParentAggregationDTMetadata);
179
- })
180
- .then(function(oAddViaDelegateCommand) {
181
- if (oAddViaDelegateCommand) {
182
- oCompositeCommand.addCommand(oAddViaDelegateCommand);
183
- }
184
- return oCompositeCommand;
185
- });
174
+ .then(function(oCommandForAddLibrary) {
175
+ if (oCommandForAddLibrary) {
176
+ oCompositeCommand.addCommand(oCommandForAddLibrary);
177
+ }
178
+ return createAddViaDelegateCommand(mPropertyBag, oParentAggregationDTMetadata);
179
+ })
180
+ .then(function(oAddViaDelegateCommand) {
181
+ if (oAddViaDelegateCommand) {
182
+ oCompositeCommand.addCommand(oAddViaDelegateCommand);
183
+ }
184
+ return oCompositeCommand;
185
+ });
186
186
  }
187
187
 
188
188
  function getODataServiceUriFromManifest(oManifest) {
@@ -256,49 +256,49 @@ sap.ui.define([
256
256
  if (aSelectedElements.length > 0) {
257
257
  return oPlugin.getCommandFactory().getCommandFor(mParents.parent, "composite")
258
258
 
259
- .then(function(oCompositeCommand) {
260
- var oPromise = Promise.resolve();
261
- aSelectedElements.forEach(function(oSelectedElement) {
262
- var mPropertyBag = {
263
- compositeCommand: oCompositeCommand,
264
- selectedElement: oSelectedElement,
265
- parents: mParents,
266
- siblingElement: oSiblingElement,
267
- actions: mActions,
268
- index: iIndex,
269
- targetAggregation: sTargetAggregation,
270
- plugin: oPlugin
271
- };
272
- switch (oSelectedElement.type) {
273
- case "invisible":
274
- oPromise = oPromise.then(
275
- createCommandsForInvisibleElement.bind(this, mPropertyBag));
276
- break;
277
- case "delegate":
278
- oPromise = oPromise.then(
279
- createCommandsForAddViaDelegate.bind(this, mPropertyBag));
280
- break;
281
- default:
282
- Log.error("Can't create command for untreated element.type " + oSelectedElement.type);
283
- }
284
- }, this);
285
- return oPromise.then(function() { return oCompositeCommand; });
286
- }.bind(this))
259
+ .then(function(oCompositeCommand) {
260
+ var oPromise = Promise.resolve();
261
+ aSelectedElements.forEach(function(oSelectedElement) {
262
+ var mPropertyBag = {
263
+ compositeCommand: oCompositeCommand,
264
+ selectedElement: oSelectedElement,
265
+ parents: mParents,
266
+ siblingElement: oSiblingElement,
267
+ actions: mActions,
268
+ index: iIndex,
269
+ targetAggregation: sTargetAggregation,
270
+ plugin: oPlugin
271
+ };
272
+ switch (oSelectedElement.type) {
273
+ case "invisible":
274
+ oPromise = oPromise.then(
275
+ createCommandsForInvisibleElement.bind(this, mPropertyBag));
276
+ break;
277
+ case "delegate":
278
+ oPromise = oPromise.then(
279
+ createCommandsForAddViaDelegate.bind(this, mPropertyBag));
280
+ break;
281
+ default:
282
+ Log.error("Can't create command for untreated element.type " + oSelectedElement.type);
283
+ }
284
+ }, this);
285
+ return oPromise.then(function() { return oCompositeCommand; });
286
+ }.bind(this))
287
287
 
288
- .then(function(oCompositeCommand) {
289
- oPlugin.fireElementModified({
290
- command: oCompositeCommand
291
- });
292
- })
288
+ .then(function(oCompositeCommand) {
289
+ oPlugin.fireElementModified({
290
+ command: oCompositeCommand
291
+ });
292
+ })
293
293
 
294
- .catch(function(vMessage) {
295
- throw DtUtils.propagateError(
296
- vMessage,
297
- "AdditionalElementsPlugin#_createCommands",
298
- "Error occurred during _createCommands execution",
299
- "sap.ui.rta.plugin"
300
- );
301
- });
294
+ .catch(function(vMessage) {
295
+ throw DtUtils.propagateError(
296
+ vMessage,
297
+ "AdditionalElementsPlugin#_createCommands",
298
+ "Error occurred during _createCommands execution",
299
+ "sap.ui.rta.plugin"
300
+ );
301
+ });
302
302
  }
303
303
  return Promise.resolve();
304
304
  };