@openui5/sap.ui.rta 1.115.0 → 1.116.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 (174) 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 +253 -248
  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 +97 -97
  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 +2 -2
  28. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  29. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +22 -22
  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 +2 -2
  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 +5 -0
  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 +30 -30
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/toolbar/Adaptation.js +74 -26
  143. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  144. package/src/sap/ui/rta/toolbar/Base.js +17 -15
  145. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
  146. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  147. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  148. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
  149. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  150. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  151. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
  152. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  153. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
  154. package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
  155. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
  156. package/src/sap/ui/rta/util/Animation.js +5 -5
  157. package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
  158. package/src/sap/ui/rta/util/PluginManager.js +25 -25
  159. package/src/sap/ui/rta/util/PopupManager.js +27 -27
  160. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  161. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  162. package/src/sap/ui/rta/util/StylesLoader.js +9 -9
  163. package/src/sap/ui/rta/util/UrlParser.js +19 -19
  164. package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
  165. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -19
  166. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
  167. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +73 -60
  168. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
  169. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  170. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  171. package/src/sap/ui/rta/util/hasStableId.js +2 -2
  172. package/src/sap/ui/rta/util/showMessageBox.js +4 -5
  173. package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
  174. package/src/sap/ui/rta/util/validateStableIds.js +8 -8
@@ -77,38 +77,37 @@ sap.ui.define([
77
77
  var oAddIFrameDialog = new AddIFrameDialog();
78
78
  var sNewContainerTitle;
79
79
  AddIFrameDialog.buildUrlBuilderParametersFor(oParent)
80
- .then(function(mURLParameters) {
81
- var mAddIFrameDialogSettings = {
82
- parameters: mURLParameters,
83
- asContainer: bAsContainer
84
- };
85
- return oAddIFrameDialog.open(mAddIFrameDialogSettings);
86
- })
87
- .then(function(mSettings) {
88
- if (!mSettings) {
89
- return Promise.reject(); // Cancel
90
- }
91
- mSettings.index = iIndex;
92
- mSettings.aggregation = oAction.aggregation;
93
- sNewContainerTitle = mSettings.title;
94
- return getAddIFrameCommand.call(this, oParent, mSettings, oDesignTimeMetadata, sVariantManagementReference);
95
- }.bind(this))
96
- .then(function(oCommand) {
97
- this.fireElementModified({
98
- command: oCommand,
99
- newControlId: oCommand.getBaseId(),
100
- action: bAsContainer ? oAction : undefined,
101
- title: sNewContainerTitle
102
- });
103
- }.bind(this))
104
- .catch(function(vError) {
105
- if (vError) {
106
- throw DtUtil.createError("AddIFrame#handler", vError, "sap.ui.rta");
107
- }
80
+ .then(function(mURLParameters) {
81
+ var mAddIFrameDialogSettings = {
82
+ parameters: mURLParameters,
83
+ asContainer: bAsContainer
84
+ };
85
+ return oAddIFrameDialog.open(mAddIFrameDialogSettings);
86
+ })
87
+ .then(function(mSettings) {
88
+ if (!mSettings) {
89
+ return Promise.reject(); // Cancel
90
+ }
91
+ mSettings.index = iIndex;
92
+ mSettings.aggregation = oAction.aggregation;
93
+ sNewContainerTitle = mSettings.title;
94
+ return getAddIFrameCommand.call(this, oParent, mSettings, oDesignTimeMetadata, sVariantManagementReference);
95
+ }.bind(this))
96
+ .then(function(oCommand) {
97
+ this.fireElementModified({
98
+ command: oCommand,
99
+ newControlId: oCommand.getBaseId(),
100
+ action: bAsContainer ? oAction : undefined,
101
+ title: sNewContainerTitle
108
102
  });
103
+ }.bind(this))
104
+ .catch(function(vError) {
105
+ if (vError) {
106
+ throw DtUtil.createError("AddIFrame#handler", vError, "sap.ui.rta");
107
+ }
108
+ });
109
109
  }
110
110
 
111
-
112
111
  /**
113
112
  * Constructor for a new AddIFrame plugin.
114
113
  *
@@ -117,7 +116,7 @@ sap.ui.define([
117
116
  * @class The AddIFrame allows trigger AddIFrame operations on the overlay.
118
117
  * @extends sap.ui.rta.plugin.BaseCreate
119
118
  * @author SAP SE
120
- * @version 1.115.0
119
+ * @version 1.116.0
121
120
  * @constructor
122
121
  * @private
123
122
  * @since 1.75
@@ -196,15 +195,15 @@ sap.ui.define([
196
195
  bIsSibling = false;
197
196
  if (this.isAvailable(aElementOverlays, bIsSibling)) {
198
197
  aMenuItems = aMenuItems.concat(this.getCreateActions(bIsSibling, aElementOverlays[0])
199
- .map(function(oAction, iIndex) {
200
- var oParentMenuItem = Object.assign({
201
- action: oAction,
202
- id: "CTX_CREATE_CHILD_IFRAME_" + oAction.aggregation.toUpperCase(),
203
- rank: iBaseRank + 10 * iIndex
204
- }, getCommonProperties.call(this, oAction.aggregation));
205
-
206
- return this.enhanceItemWithResponsibleElement(oParentMenuItem, aElementOverlays);
207
- }, this)
198
+ .map(function(oAction, iIndex) {
199
+ var oParentMenuItem = Object.assign({
200
+ action: oAction,
201
+ id: "CTX_CREATE_CHILD_IFRAME_" + oAction.aggregation.toUpperCase(),
202
+ rank: iBaseRank + 10 * iIndex
203
+ }, getCommonProperties.call(this, oAction.aggregation));
204
+
205
+ return this.enhanceItemWithResponsibleElement(oParentMenuItem, aElementOverlays);
206
+ }, this)
208
207
  );
209
208
  }
210
209
  return aMenuItems;
@@ -229,6 +229,7 @@
229
229
  text="{/text/previewUrlMessage}" textAlign="Center" visible="{= !${/previewUrl/value} }" />
230
230
  <util:IFrame
231
231
  id="sapUiRtaAddIFrameDialog_PreviewFrame"
232
+ height="100%"
232
233
  title="{/text/previewFrameLabel}"
233
234
  class="sapUiRtaAddIFrameDialogPreviewFrame"
234
235
  visible="{= !!${/previewUrl/value} }"/>
@@ -133,7 +133,7 @@ sap.ui.define([
133
133
  * @class Context - Dialog for IFrame settings in Runtime Authoring
134
134
  * @extends sap.ui.base.ManagedObject
135
135
  * @author SAP SE
136
- * @version 1.115.0
136
+ * @version 1.116.0
137
137
  * @constructor
138
138
  * @private
139
139
  * @since 1.78
@@ -241,35 +241,35 @@ sap.ui.define([
241
241
  */
242
242
  AddIFrameDialog.buildUrlBuilderParametersFor = function(oObject) {
243
243
  return getContainerUserInfo()
244
- .then(function(oUserInfo) {
245
- var oUserParameters = Object.keys(oUserInfo)
246
- .map(function(sUserSetting) {
247
- return {
248
- label: sUserSetting,
249
- key: "{$user>/" + sUserSetting + "}",
250
- value: oUserInfo[sUserSetting]
251
- };
252
- });
253
- var oBindingContext = oObject.getBindingContext();
254
- var oDefaultBoundObjectParameters;
255
- if (oBindingContext) {
256
- var oDefaultBoundObject = oBindingContext.getObject();
257
- oDefaultBoundObjectParameters = Object.keys(oDefaultBoundObject)
258
- .filter(function(sProperty) {
259
- return typeof oDefaultBoundObject[sProperty] !== "object";
260
- })
261
- .map(function(sProperty) {
262
- return {
263
- label: sProperty,
264
- key: "{" + sProperty + "}",
265
- value: oDefaultBoundObject[sProperty]
266
- };
267
- });
268
- } else {
269
- oDefaultBoundObjectParameters = [];
270
- }
271
- return oUserParameters.concat(oDefaultBoundObjectParameters);
244
+ .then(function(oUserInfo) {
245
+ var oUserParameters = Object.keys(oUserInfo)
246
+ .map(function(sUserSetting) {
247
+ return {
248
+ label: sUserSetting,
249
+ key: "{$user>/" + sUserSetting + "}",
250
+ value: oUserInfo[sUserSetting]
251
+ };
272
252
  });
253
+ var oBindingContext = oObject.getBindingContext();
254
+ var oDefaultBoundObjectParameters;
255
+ if (oBindingContext) {
256
+ var oDefaultBoundObject = oBindingContext.getObject();
257
+ oDefaultBoundObjectParameters = Object.keys(oDefaultBoundObject)
258
+ .filter(function(sProperty) {
259
+ return typeof oDefaultBoundObject[sProperty] !== "object";
260
+ })
261
+ .map(function(sProperty) {
262
+ return {
263
+ label: sProperty,
264
+ key: "{" + sProperty + "}",
265
+ value: oDefaultBoundObject[sProperty]
266
+ };
267
+ });
268
+ } else {
269
+ oDefaultBoundObjectParameters = [];
270
+ }
271
+ return oUserParameters.concat(oDefaultBoundObjectParameters);
272
+ });
273
273
  };
274
274
 
275
275
  return AddIFrameDialog;
@@ -87,7 +87,7 @@ sap.ui.define([
87
87
  }
88
88
  var oIFrame = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_PreviewFrame");
89
89
  oIFrame.setUrl(""); // Resets the preview first
90
- //enable/disable expanding the Panel
90
+ // enable/disable expanding the Panel
91
91
  var oPanel = sap.ui.getCore().byId("sapUiRtaAddIFrameDialog_PreviewLinkPanel");
92
92
  var oPanelButton = oPanel.getDependents()[0];
93
93
  if (sURL) {
@@ -238,8 +238,8 @@ sap.ui.define([
238
238
 
239
239
  _areAllValueStateNones: function() {
240
240
  var oData = this._oJSONModel.getData();
241
- return _aTextInputFields.concat(_aNumericInputFields).every(function (sFieldName) {
242
- return oData[sFieldName]["valueState"] === ValueState.None;
241
+ return _aTextInputFields.concat(_aNumericInputFields).every(function(sFieldName) {
242
+ return oData[sFieldName].valueState === ValueState.None;
243
243
  }, this);
244
244
  },
245
245
 
@@ -318,8 +318,8 @@ sap.ui.define([
318
318
  _setFocusOnInvalidInput: function() {
319
319
  var oData = this._oJSONModel.getData();
320
320
  _aNumericInputFields.some(function(sFieldName) {
321
- if (oData[sFieldName]["valueState"] === ValueState.Error) {
322
- var oElement = sap.ui.getCore().byId(oData[sFieldName]["id"]);
321
+ if (oData[sFieldName].valueState === ValueState.Error) {
322
+ var oElement = sap.ui.getCore().byId(oData[sFieldName].id);
323
323
  oElement.focus();
324
324
  return true;
325
325
  }
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @returns {string} Cleaned URL
17
17
  * @private
18
18
  */
19
- return function (sURL) {
19
+ return function(sURL) {
20
20
  return sURL.replace(/\t|\r|\n/g, "");
21
21
  };
22
22
  });
@@ -9,7 +9,7 @@ sap.ui.define([
9
9
  "sap/ui/dt/Util",
10
10
  "sap/base/util/restricted/_castArray",
11
11
  "sap/base/util/restricted/_pick"
12
- ], function (
12
+ ], function(
13
13
  OverlayRegistry,
14
14
  DtUtil,
15
15
  _castArray,
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @author SAP SE
26
26
  * @experimental Since 1.58
27
27
  * @since 1.58
28
- * @version 1.115.0
28
+ * @version 1.116.0
29
29
  * @private
30
30
  * @ui5-restricted
31
31
  *
@@ -58,39 +58,38 @@ sap.ui.define([
58
58
  * @property {string} text - Action name
59
59
  */
60
60
 
61
-
62
- return function (oRta) {
61
+ return function(oRta) {
63
62
  function invoke(vValue, oOverlay) {
64
- return typeof vValue === 'function'
63
+ return typeof vValue === "function"
65
64
  ? vValue(oOverlay)
66
65
  : vValue;
67
66
  }
68
67
 
69
68
  function getActions(aElementOverlays) {
70
69
  var aMenuItemPromises = oRta._oDesignTime.getPlugins()
71
- .map(function (oPlugin) {
72
- return oPlugin.getMenuItems(aElementOverlays);
73
- });
70
+ .map(function(oPlugin) {
71
+ return oPlugin.getMenuItems(aElementOverlays);
72
+ });
74
73
  return Promise.all(aMenuItemPromises)
75
- .then(function(aMenuItems) {
74
+ .then(function(aMenuItems) {
75
+ return aMenuItems
76
+ .reduce(function(aResult, aMenuItems) {
76
77
  return aMenuItems
77
- .reduce(function (aResult, aMenuItems) {
78
- return aMenuItems
79
- ? aResult.concat(aMenuItems)
80
- : aResult;
81
- }, [])
82
- .map(function (mMenuItem) {
83
- return Object.assign({}, mMenuItem, {
84
- enabled: invoke(mMenuItem.enabled, aElementOverlays),
85
- text: invoke(mMenuItem.text, aElementOverlays[0])
86
- });
87
- });
78
+ ? aResult.concat(aMenuItems)
79
+ : aResult;
80
+ }, [])
81
+ .map(function(mMenuItem) {
82
+ return Object.assign({}, mMenuItem, {
83
+ enabled: invoke(mMenuItem.enabled, aElementOverlays),
84
+ text: invoke(mMenuItem.text, aElementOverlays[0])
85
+ });
88
86
  });
87
+ });
89
88
  }
90
89
 
91
90
  function get(vControlIds) {
92
91
  var aControlIds = _castArray(vControlIds);
93
- var aElementOverlays = aControlIds.map(function (sControlId) {
92
+ var aElementOverlays = aControlIds.map(function(sControlId) {
94
93
  var oElementOverlay = OverlayRegistry.getOverlay(sControlId);
95
94
 
96
95
  if (!oElementOverlay) {
@@ -101,16 +100,16 @@ sap.ui.define([
101
100
  });
102
101
 
103
102
  return getActions(aElementOverlays)
104
- .then(function(aMenuItems) {
105
- return aMenuItems.map(function (mMenuItem) {
106
- return _pick(mMenuItem, ['id', 'icon', 'rank', 'group', 'enabled', 'text']);
107
- });
103
+ .then(function(aMenuItems) {
104
+ return aMenuItems.map(function(mMenuItem) {
105
+ return _pick(mMenuItem, ["id", "icon", "rank", "group", "enabled", "text"]);
108
106
  });
107
+ });
109
108
  }
110
109
 
111
110
  function execute(vControlIds, sActionId) {
112
111
  var aControlIds = _castArray(vControlIds);
113
- var aElementOverlays = aControlIds.map(function (sControlId) {
112
+ var aElementOverlays = aControlIds.map(function(sControlId) {
114
113
  var oElementOverlay = OverlayRegistry.getOverlay(sControlId);
115
114
 
116
115
  if (!oElementOverlay) {
@@ -121,17 +120,17 @@ sap.ui.define([
121
120
  });
122
121
 
123
122
  return getActions(aElementOverlays)
124
- .then(function(aActions) {
125
- var mAction = aActions.filter(function (mAction) {
126
- return mAction.id === sActionId;
127
- }).pop();
128
-
129
- if (!mAction) {
130
- throw new Error('No action found by specified ID');
131
- } else {
132
- return mAction.handler(aElementOverlays, {});
133
- }
134
- });
123
+ .then(function(aActions) {
124
+ var mAction = aActions.filter(function(mAction) {
125
+ return mAction.id === sActionId;
126
+ }).pop();
127
+
128
+ if (!mAction) {
129
+ throw new Error("No action found by specified ID");
130
+ } else {
131
+ return mAction.handler(aElementOverlays, {});
132
+ }
133
+ });
135
134
  }
136
135
 
137
136
  return {
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
  "sap/ui/fl/write/api/ChangesWriteAPI",
13
13
  "sap/ui/fl/write/api/PersistenceWriteAPI",
14
14
  "sap/ui/thirdparty/jquery"
15
- ], function (
15
+ ], function(
16
16
  DtUtil,
17
17
  OverlayRegistry,
18
18
  FlexUtils,
@@ -31,12 +31,12 @@ sap.ui.define([
31
31
  * @author SAP SE
32
32
  * @experimental Since 1.58
33
33
  * @since 1.58
34
- * @version 1.115.0
34
+ * @version 1.116.0
35
35
  * @private
36
36
  * @ui5-restricted
37
37
  */
38
38
 
39
- return function (oRta) {
39
+ return function(oRta) {
40
40
  function makeAjaxCall(sPath) {
41
41
  return new Promise(function(resolve, reject) {
42
42
  var sUrl;
@@ -90,7 +90,7 @@ sap.ui.define([
90
90
  var oView = sap.ui.getCore().byId(sViewId);
91
91
  var oAppComponent = FlexUtils.getAppComponentForControl(oView);
92
92
  var sControllerName = oView.getControllerName && oView.getControllerName() || oView.getController() && oView.getController().getMetadata().getName();
93
- //Calculate moduleName for code extension
93
+ // Calculate moduleName for code extension
94
94
  var sReference = FlexRuntimeInfoAPI.getFlexReference({element: oAppComponent});
95
95
  var sModuleName = sReference.replace(/\.Component/g, "").replace(/\./g, "/");
96
96
  sModuleName += "/changes/";
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @author SAP SE
45
45
  * @experimental Since 1.56
46
46
  * @since 1.56
47
- * @version 1.115.0
47
+ * @version 1.116.0
48
48
  * @private
49
49
  * @ui5-restricted
50
50
  */
@@ -104,10 +104,10 @@ sap.ui.define([
104
104
 
105
105
  oOutline._aConsideredExtensionPoints = [];
106
106
 
107
- oOutline._attachNotConsideredExtensionPoints = function (oOverlay, oData) {
107
+ oOutline._attachNotConsideredExtensionPoints = function(oOverlay, oData) {
108
108
  var sViewId = FlUtils.getViewForControl(oOverlay.getElement()).getId();
109
109
  var mExtensionPointInfos = getExtensionPointsForView(sViewId, this._aConsideredExtensionPoints);
110
- Object.keys(mExtensionPointInfos).forEach(function (sExtensionPointName, iIndex) {
110
+ Object.keys(mExtensionPointInfos).forEach(function(sExtensionPointName, iIndex) {
111
111
  var mExtensionPointInfo = mExtensionPointInfos[sExtensionPointName];
112
112
  var mExtensionPointData = this._getExtensionPointData(mExtensionPointInfo);
113
113
  mExtensionPointData.id = sViewId;
@@ -125,11 +125,11 @@ sap.ui.define([
125
125
  * @param {int} [iDepth] - Depth of <code>childNode</code> levels that should be returned based on the given control
126
126
  * @returns {OutlineObject[]} Array containing outline data for each root control
127
127
  */
128
- oOutline._getOutline = function (sId, iDepth) {
128
+ oOutline._getOutline = function(sId, iDepth) {
129
129
  var oResponse;
130
130
  // Fix parameters if provided in different order
131
131
  if (!iDepth && DtUtil.isInteger(sId)) {
132
- //only depth, shift and start with the root
132
+ // only depth, shift and start with the root
133
133
  iDepth = sId;
134
134
  sId = undefined;
135
135
  }
@@ -137,9 +137,9 @@ sap.ui.define([
137
137
  var aInitialOverlays = [];
138
138
  if (!sId) {
139
139
  aInitialOverlays = oRta._oDesignTime.getRootElements()
140
- .map(function (sRootElementId) {
141
- return OverlayRegistry.getOverlay(sRootElementId);
142
- });
140
+ .map(function(sRootElementId) {
141
+ return OverlayRegistry.getOverlay(sRootElementId);
142
+ });
143
143
  } else {
144
144
  var oPassedOverlay = OverlayRegistry.getOverlay(sId);
145
145
  if (!oPassedOverlay) {
@@ -151,7 +151,7 @@ sap.ui.define([
151
151
  aInitialOverlays.push(oPassedOverlay);
152
152
  }
153
153
 
154
- oResponse = aInitialOverlays.map(function (oInitialOverlay) {
154
+ oResponse = aInitialOverlays.map(function(oInitialOverlay) {
155
155
  return this._getChildrenNodes(oInitialOverlay, iDepth);
156
156
  }, this);
157
157
 
@@ -159,16 +159,16 @@ sap.ui.define([
159
159
  return oResponse;
160
160
  };
161
161
 
162
- oOutline._getExtensionPoints = function (oData) {
162
+ oOutline._getExtensionPoints = function(oData) {
163
163
  var sParentId = oData.id;
164
164
  var sAggregationName = oData.technicalName;
165
165
  return ExtensionPointRegistryAPI.getExtensionPointInfoByParentId({parentId: sParentId})
166
- .filter(function (mExtenstionPoint) {
167
- return mExtenstionPoint.aggregationName === sAggregationName;
168
- });
166
+ .filter(function(mExtenstionPoint) {
167
+ return mExtenstionPoint.aggregationName === sAggregationName;
168
+ });
169
169
  };
170
170
 
171
- oOutline._getExtensionPointData = function (mExtensionPoint) {
171
+ oOutline._getExtensionPointData = function(mExtensionPoint) {
172
172
  return {
173
173
  id: mExtensionPoint.targetControl.getId(),
174
174
  name: mExtensionPoint.name,
@@ -176,24 +176,24 @@ sap.ui.define([
176
176
  type: "extensionPoint",
177
177
  icon: this.mExtensionPointMetadata.palette.icons.svg,
178
178
  extensionPointInfo: {
179
- defaultContent: mExtensionPoint.defaultContent.map(function (oControl) {
179
+ defaultContent: mExtensionPoint.defaultContent.map(function(oControl) {
180
180
  return oControl.getId();
181
181
  })
182
182
  }
183
183
  };
184
184
  };
185
185
 
186
- oOutline._enrichExtensionPointData = function (oData, oOverlay) {
186
+ oOutline._enrichExtensionPointData = function(oData, oOverlay) {
187
187
  var bIsDesignMode = Configuration.getDesignMode();
188
188
  if (!bIsDesignMode) {
189
189
  return undefined;
190
190
  }
191
191
  if (oData.type === "aggregation") {
192
192
  var aExtensionPoints = this._getExtensionPoints(oData)
193
- .sort(function (mExtensionPointA, mExtensionPointB) {
194
- return mExtensionPointB.index - mExtensionPointA.index;
195
- });
196
- aExtensionPoints.forEach(function (mExtensionPoint) {
193
+ .sort(function(mExtensionPointA, mExtensionPointB) {
194
+ return mExtensionPointB.index - mExtensionPointA.index;
195
+ });
196
+ aExtensionPoints.forEach(function(mExtensionPoint) {
197
197
  var mExtensionPointData = this._getExtensionPointData(mExtensionPoint);
198
198
  oData.elements.splice(mExtensionPoint.index, 0, mExtensionPointData);
199
199
  this._aConsideredExtensionPoints.push(mExtensionPointData.name);
@@ -214,28 +214,28 @@ sap.ui.define([
214
214
  }, mInnerTemplateData[sAggregationName]);
215
215
  }
216
216
  return ((mTemplateData && mTemplateData.elements) || [])
217
- .map(function(oElement) {
218
- // Template
219
- if (
220
- oElement.type === "aggregationBindingTemplate"
217
+ .map(function(oElement) {
218
+ // Template
219
+ if (
220
+ oElement.type === "aggregationBindingTemplate"
221
221
  || oElement.parentAggregationName === sAggregationName
222
- ) {
223
- return Object.assign({
224
- templateFor: sAggregationOverlayId
225
- }, oElement);
226
- }
227
- // Regular aggregation
228
- return oElement.technicalName === sAggregationName && oElement;
229
- })
230
- .filter(Boolean)[0];
222
+ ) {
223
+ return Object.assign({
224
+ templateFor: sAggregationOverlayId
225
+ }, oElement);
226
+ }
227
+ // Regular aggregation
228
+ return oElement.technicalName === sAggregationName && oElement;
229
+ })
230
+ .filter(Boolean)[0];
231
231
  }
232
232
  // Template root element
233
233
  var aAggregationTemplateOverlays = (
234
234
  oChildOverlay.getParentElementOverlay().getAggregationBindingTemplateOverlays
235
235
  && oChildOverlay.getParentElementOverlay().getAggregationBindingTemplateOverlays()
236
- .reduce(function (aAllRootElementOverlaysInsideTemplates, oAggregationOverlay) {
237
- return aAllRootElementOverlaysInsideTemplates.concat(oAggregationOverlay.getChildren());
238
- }, [])
236
+ .reduce(function(aAllRootElementOverlaysInsideTemplates, oAggregationOverlay) {
237
+ return aAllRootElementOverlaysInsideTemplates.concat(oAggregationOverlay.getChildren());
238
+ }, [])
239
239
  ) || [];
240
240
  if (aAggregationTemplateOverlays.includes(oChildOverlay)) {
241
241
  return undefined;
@@ -263,7 +263,7 @@ sap.ui.define([
263
263
  * @param {object} [mTemplateData] - Propagates template data to the aggregation template clones
264
264
  * @returns {OutlineObject} Outline model data
265
265
  */
266
- oOutline._getChildrenNodes = function (oOverlay, iDepth, oParentOverlay, mTemplateData) {
266
+ oOutline._getChildrenNodes = function(oOverlay, iDepth, oParentOverlay, mTemplateData) {
267
267
  var bValidDepth = DtUtil.isInteger(iDepth);
268
268
  var mAggregationTemplates = {};
269
269
 
@@ -271,11 +271,11 @@ sap.ui.define([
271
271
  return {};
272
272
  }
273
273
 
274
- //get necessary properties from overlay
274
+ // get necessary properties from overlay
275
275
  var oData = this._getNodeProperties(oOverlay, oParentOverlay, mTemplateData) || {};
276
276
 
277
277
  var aChildren = oOverlay.getChildren();
278
- //find aggregation binding template overlays
278
+ // find aggregation binding template overlays
279
279
  var aAggregationTemplateOverlays = (
280
280
  oOverlay.getAggregationBindingTemplateOverlays
281
281
  && oOverlay.getAggregationBindingTemplateOverlays()
@@ -289,30 +289,30 @@ sap.ui.define([
289
289
  }, aChildren);
290
290
  }
291
291
 
292
- //check if the tree should be traversed deeper and children overlays are present
292
+ // check if the tree should be traversed deeper and children overlays are present
293
293
  if ((!bValidDepth || (bValidDepth && iDepth > 0))
294
294
  && aChildren.length > 0
295
295
  && !isEmptyObject(oData)
296
296
  ) {
297
- //decrement depth for children nodes
297
+ // decrement depth for children nodes
298
298
  iDepth = bValidDepth ? iDepth - 1 : iDepth;
299
299
 
300
300
  var mInnerTemplateData = {};
301
301
  oData.elements = aChildren
302
- .map(function (oChildOverlay) {
303
- var mNextTemplateData = getTemplateData(oChildOverlay, mTemplateData, mInnerTemplateData);
304
- var oNextData = this._getChildrenNodes(oChildOverlay, iDepth, oChildOverlay.getParent(), mNextTemplateData);
305
- if (oNextData.type === "aggregationBindingTemplate") {
306
- var sAggregationName = mAggregationTemplates[oChildOverlay.getId()];
307
- mInnerTemplateData[sAggregationName] = merge({}, oNextData);
308
- }
309
- return oNextData;
310
- }, this)
311
- .filter(function (oChildNode) {
312
- return !isEmptyObject(oChildNode);
313
- });
314
-
315
- //get extension point information if available
302
+ .map(function(oChildOverlay) {
303
+ var mNextTemplateData = getTemplateData(oChildOverlay, mTemplateData, mInnerTemplateData);
304
+ var oNextData = this._getChildrenNodes(oChildOverlay, iDepth, oChildOverlay.getParent(), mNextTemplateData);
305
+ if (oNextData.type === "aggregationBindingTemplate") {
306
+ var sAggregationName = mAggregationTemplates[oChildOverlay.getId()];
307
+ mInnerTemplateData[sAggregationName] = merge({}, oNextData);
308
+ }
309
+ return oNextData;
310
+ }, this)
311
+ .filter(function(oChildNode) {
312
+ return !isEmptyObject(oChildNode);
313
+ });
314
+
315
+ // get extension point information if available
316
316
  this._enrichExtensionPointData(oData, oOverlay);
317
317
  }
318
318
 
@@ -414,7 +414,7 @@ sap.ui.define([
414
414
  * @param {object} [mTemplateData] - Template data
415
415
  * @returns {object} Data containing applicable properties
416
416
  */
417
- oOutline._getNodeProperties = function (oOverlay, oParentOverlay, mTemplateData) {
417
+ oOutline._getNodeProperties = function(oOverlay, oParentOverlay, mTemplateData) {
418
418
  var oElement = oOverlay.getElement();
419
419
  var oDtMetadata = oOverlay.getDesignTimeMetadata();
420
420
  var oData = getDefaultData(oElement, oDtMetadata, mTemplateData);
@@ -525,13 +525,13 @@ sap.ui.define([
525
525
  // Remove unwanted properties
526
526
  oResponse = _omit(oResponse, ["elementOverlay", "editable", "target", "id", "elementId"]);
527
527
 
528
- //Check if the new update already exists - if present remove the previous occurrence
528
+ // Check if the new update already exists - if present remove the previous occurrence
529
529
  this.aUpdates = oOutline._removeDuplicate(this.aUpdates, oResponse);
530
530
 
531
531
  this.aUpdates.push(oResponse);
532
532
 
533
533
  if (this.sStatus === "initial") {
534
- setTimeout(function () {
534
+ setTimeout(function() {
535
535
  // need to check this.aUpdates still exists as destroy() can be called when setTimeout is still waiting
536
536
  if (Array.isArray(this.aUpdates) && this.aUpdates.length > 0) {
537
537
  this.sStatus = "initial";
@@ -546,7 +546,7 @@ sap.ui.define([
546
546
  /**
547
547
  * Detaches all event listeners that were attached from the outline service and performs a clean up.
548
548
  */
549
- oOutline.destroy = function () {
549
+ oOutline.destroy = function() {
550
550
  oRta._oDesignTime.detachEvent("elementOverlayCreated", this._updatesHandler, this);
551
551
  oRta._oDesignTime.detachEvent("elementOverlayAdded", this._updatesHandler, this);
552
552
  oRta._oDesignTime.detachEvent("elementOverlayMoved", this._updatesHandler, this);