@openui5/sap.ui.rta 1.131.1 → 1.132.1

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 (200) hide show
  1. package/.eslintrc.json +1 -2
  2. package/THIRDPARTY.txt +1 -1
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +2 -2
  5. package/src/sap/ui/rta/Client.js +2 -2
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +26 -10
  7. package/src/sap/ui/rta/Utils.js +2 -2
  8. package/src/sap/ui/rta/api/startAdaptation.js +1 -1
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
  14. package/src/sap/ui/rta/appVariant/Feature.js +1 -1
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
  16. package/src/sap/ui/rta/appVariant/Utils.js +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +27 -27
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.html +3 -3
  21. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  22. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  23. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  24. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  25. package/src/sap/ui/rta/command/AddXML.js +2 -2
  26. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  27. package/src/sap/ui/rta/command/AnnotationCommand.js +79 -0
  28. package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
  29. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  30. package/src/sap/ui/rta/command/BindProperty.js +6 -8
  31. package/src/sap/ui/rta/command/Combine.js +2 -2
  32. package/src/sap/ui/rta/command/CommandFactory.js +3 -3
  33. package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantConfigure.js +9 -5
  35. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  36. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +8 -6
  37. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +14 -11
  38. package/src/sap/ui/rta/command/ControlVariantSwitch.js +6 -4
  39. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  40. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  41. package/src/sap/ui/rta/command/FlexCommand.js +2 -2
  42. package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
  43. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  44. package/src/sap/ui/rta/command/Move.js +2 -2
  45. package/src/sap/ui/rta/command/Property.js +2 -2
  46. package/src/sap/ui/rta/command/Remove.js +2 -2
  47. package/src/sap/ui/rta/command/Rename.js +2 -2
  48. package/src/sap/ui/rta/command/Resize.js +2 -2
  49. package/src/sap/ui/rta/command/Reveal.js +2 -2
  50. package/src/sap/ui/rta/command/Settings.js +2 -2
  51. package/src/sap/ui/rta/command/Split.js +2 -2
  52. package/src/sap/ui/rta/command/Stack.js +2 -2
  53. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
  54. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
  55. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  56. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  57. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +14 -2
  58. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  59. package/src/sap/ui/rta/enablement/elementActionTest.js +15 -16
  60. package/src/sap/ui/rta/library.js +3 -3
  61. package/src/sap/ui/rta/messagebundle.properties +18 -0
  62. package/src/sap/ui/rta/messagebundle_ar.properties +10 -0
  63. package/src/sap/ui/rta/messagebundle_bg.properties +13 -3
  64. package/src/sap/ui/rta/messagebundle_ca.properties +10 -0
  65. package/src/sap/ui/rta/messagebundle_cnr.properties +10 -0
  66. package/src/sap/ui/rta/messagebundle_cs.properties +10 -0
  67. package/src/sap/ui/rta/messagebundle_cy.properties +10 -0
  68. package/src/sap/ui/rta/messagebundle_da.properties +10 -0
  69. package/src/sap/ui/rta/messagebundle_de.properties +10 -0
  70. package/src/sap/ui/rta/messagebundle_el.properties +10 -0
  71. package/src/sap/ui/rta/messagebundle_en.properties +10 -0
  72. package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -0
  73. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -0
  74. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +347 -325
  75. package/src/sap/ui/rta/messagebundle_es.properties +10 -0
  76. package/src/sap/ui/rta/messagebundle_es_MX.properties +18 -8
  77. package/src/sap/ui/rta/messagebundle_et.properties +10 -0
  78. package/src/sap/ui/rta/messagebundle_fi.properties +10 -0
  79. package/src/sap/ui/rta/messagebundle_fr.properties +10 -0
  80. package/src/sap/ui/rta/messagebundle_fr_CA.properties +10 -0
  81. package/src/sap/ui/rta/messagebundle_hi.properties +10 -0
  82. package/src/sap/ui/rta/messagebundle_hr.properties +10 -0
  83. package/src/sap/ui/rta/messagebundle_hu.properties +10 -0
  84. package/src/sap/ui/rta/messagebundle_id.properties +10 -0
  85. package/src/sap/ui/rta/messagebundle_it.properties +10 -0
  86. package/src/sap/ui/rta/messagebundle_iw.properties +10 -0
  87. package/src/sap/ui/rta/messagebundle_ja.properties +10 -0
  88. package/src/sap/ui/rta/messagebundle_kk.properties +10 -0
  89. package/src/sap/ui/rta/messagebundle_ko.properties +10 -0
  90. package/src/sap/ui/rta/messagebundle_lt.properties +10 -0
  91. package/src/sap/ui/rta/messagebundle_lv.properties +10 -0
  92. package/src/sap/ui/rta/messagebundle_mk.properties +10 -0
  93. package/src/sap/ui/rta/messagebundle_ms.properties +14 -4
  94. package/src/sap/ui/rta/messagebundle_nl.properties +10 -0
  95. package/src/sap/ui/rta/messagebundle_no.properties +10 -0
  96. package/src/sap/ui/rta/messagebundle_pl.properties +10 -0
  97. package/src/sap/ui/rta/messagebundle_pt.properties +10 -0
  98. package/src/sap/ui/rta/messagebundle_pt_PT.properties +10 -0
  99. package/src/sap/ui/rta/messagebundle_ro.properties +10 -0
  100. package/src/sap/ui/rta/messagebundle_ru.properties +10 -0
  101. package/src/sap/ui/rta/messagebundle_sh.properties +10 -0
  102. package/src/sap/ui/rta/messagebundle_sk.properties +10 -0
  103. package/src/sap/ui/rta/messagebundle_sl.properties +10 -0
  104. package/src/sap/ui/rta/messagebundle_sr.properties +10 -0
  105. package/src/sap/ui/rta/messagebundle_sv.properties +10 -0
  106. package/src/sap/ui/rta/messagebundle_th.properties +10 -0
  107. package/src/sap/ui/rta/messagebundle_tr.properties +10 -0
  108. package/src/sap/ui/rta/messagebundle_uk.properties +11 -1
  109. package/src/sap/ui/rta/messagebundle_vi.properties +10 -0
  110. package/src/sap/ui/rta/messagebundle_zh_CN.properties +10 -0
  111. package/src/sap/ui/rta/messagebundle_zh_TW.properties +10 -0
  112. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  113. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
  114. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  115. package/src/sap/ui/rta/plugin/CompVariant.js +4 -2
  116. package/src/sap/ui/rta/plugin/ControlVariant.js +5 -23
  117. package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
  118. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  119. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  120. package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
  121. package/src/sap/ui/rta/plugin/Plugin.js +15 -13
  122. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  123. package/src/sap/ui/rta/plugin/Remove.js +2 -2
  124. package/src/sap/ui/rta/plugin/Rename.js +3 -3
  125. package/src/sap/ui/rta/plugin/RenameHandler.js +5 -9
  126. package/src/sap/ui/rta/plugin/Resize.js +3 -3
  127. package/src/sap/ui/rta/plugin/Selection.js +2 -2
  128. package/src/sap/ui/rta/plugin/Settings.js +2 -21
  129. package/src/sap/ui/rta/plugin/Split.js +2 -2
  130. package/src/sap/ui/rta/plugin/Stretch.js +7 -5
  131. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -126
  132. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +28 -31
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +141 -172
  134. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +108 -137
  135. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
  136. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +96 -141
  137. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +112 -0
  138. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +183 -0
  139. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +109 -0
  140. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +239 -0
  141. package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +15 -0
  142. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  143. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +3 -3
  144. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
  145. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  146. package/src/sap/ui/rta/service/Action.js +2 -2
  147. package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
  148. package/src/sap/ui/rta/service/Outline.js +2 -2
  149. package/src/sap/ui/rta/service/Property.js +2 -2
  150. package/src/sap/ui/rta/service/Receiver.js +1 -1
  151. package/src/sap/ui/rta/service/Selection.js +2 -2
  152. package/src/sap/ui/rta/service/SupportTools.js +2 -2
  153. package/src/sap/ui/rta/service/index.js +1 -1
  154. package/src/sap/ui/rta/themes/base/WhatsNew.less +5 -0
  155. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  156. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  157. package/src/sap/ui/rta/toolbar/Adaptation.js +2 -2
  158. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  159. package/src/sap/ui/rta/toolbar/Base.js +2 -2
  160. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  161. package/src/sap/ui/rta/toolbar/Fiori.js +3 -4
  162. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  163. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
  164. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  165. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +1 -1
  166. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -2
  167. package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
  168. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
  169. package/src/sap/ui/rta/util/Animation.js +1 -1
  170. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  171. package/src/sap/ui/rta/util/PluginManager.js +16 -10
  172. package/src/sap/ui/rta/util/PopupManager.js +3 -3
  173. package/src/sap/ui/rta/util/ReloadManager.js +9 -9
  174. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  175. package/src/sap/ui/rta/util/ServiceManager.js +2 -2
  176. package/src/sap/ui/rta/util/adaptationStarter.js +17 -2
  177. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
  178. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -2
  179. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
  180. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
  181. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +5 -3
  182. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  183. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  184. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  185. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
  186. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
  187. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  188. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
  189. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  190. package/src/sap/ui/rta/util/showMessageBox.js +1 -1
  191. package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
  192. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  193. package/src/sap/ui/rta/util/validateText.js +1 -1
  194. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +2 -2
  195. package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +5 -4
  196. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
  197. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +8 -2
  198. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
  199. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +1 -1
  200. package/src/sap/ui/rta/command/Annotation.js +0 -45
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * Utility function to check if the OData service is updated in the meantime
54
54
  *
55
55
  * @param {sap.ui.core.Control} oControl - Control to be checked
56
- * @returns {Promise} resolves if service is up to date, rejects otherwise
56
+ * @returns {Promise} Resolves if service is up to date, rejects otherwise
57
57
  */
58
58
  async function isServiceUpToDate(oControl) {
59
59
  const oModel = oControl.getModel();
@@ -114,12 +114,12 @@ sap.ui.define([
114
114
  * The AdditionalElementsPlugin should handle the orchestration
115
115
  * of the AdditionalElementsAnalyzer, the dialog and the command creation
116
116
  *
117
- * @param {string} [sId] id for the new object, generated automatically if no id is given
118
- * @param {object} [mSettings] initial settings for the new object
117
+ * @param {string} [sId] - Id for the new object, generated automatically if no id is given
118
+ * @param {object} [mSettings] - Initial settings for the new object
119
119
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
120
120
  * @extends sap.ui.rta.plugin.Plugin
121
121
  * @author SAP SE
122
- * @version 1.131.1
122
+ * @version 1.132.1
123
123
  * @constructor
124
124
  * @private
125
125
  * @since 1.44
@@ -234,18 +234,17 @@ sap.ui.define([
234
234
  * If the MetaModel was not loaded yet when evaluating addViaDelegate, the
235
235
  * plugin returns editable = false. Therefore we must make an extra check after
236
236
  * the MetaModel is loaded.
237
- * @param {sap.ui.dt.Overlay} oOverlay Overlay object
237
+ * @param {sap.ui.dt.Overlay} oOverlay - Overlay object
238
238
  * @override
239
239
  */
240
- registerElementOverlay(...aArgs) {
240
+ async registerElementOverlay(...aArgs) {
241
241
  const [oOverlay] = aArgs;
242
242
  const oModel = oOverlay.getElement().getModel();
243
243
  if (oModel) {
244
244
  const oMetaModel = oModel.getMetaModel();
245
245
  if (oMetaModel && oMetaModel.loaded) {
246
- oMetaModel.loaded().then(function() {
247
- this.evaluateEditable([oOverlay], {onRegistration: true});
248
- }.bind(this));
246
+ await oMetaModel.loaded();
247
+ this.evaluateEditable([oOverlay], {onRegistration: true});
249
248
  }
250
249
  }
251
250
  Plugin.prototype.registerElementOverlay.apply(this, aArgs);
@@ -262,85 +261,74 @@ sap.ui.define([
262
261
 
263
262
  /**
264
263
  * Opens a dialog containing all the elements that can be added for a control and aggregation
265
- * @param {boolean} bOverlayIsSibling Indicates if the elements should be added as sibling (true) or child (false) to the overlay
266
- * @param {string} sAggregationName The name of the aggregation to where the elements can be added
267
- * @param {Array<sap.ui.dt.ElementOverlay>} aResponsibleElementOverlays Array containing the overlay of the control
268
- * @param {number} [iIndex] The position where the element will be added
269
- * @param {string} [sControlName] The name of the control
270
- * @param {sDisplayText} [sDisplayText] The display text of the control for the dialog
264
+ * @param {boolean} bOverlayIsSibling - Indicates if the elements should be added as sibling (true) or child (false) to the overlay
265
+ * @param {string} sAggregationName - The name of the aggregation to where the elements can be added
266
+ * @param {Array<sap.ui.dt.ElementOverlay>} aResponsibleElementOverlays - Array containing the overlay of the control
267
+ * @param {number} [iIndex] - The position where the element will be added
268
+ * @param {string} [sControlName] - The name of the control
269
+ * @param {sDisplayText} [sDisplayText] - The display text of the control for the dialog
271
270
  *
272
- * @return {Promise} Returns a promise that resolves when the dialog closes
273
- * @private
271
+ * @returns {Promise} Resolves when the dialog closes
274
272
  */
275
- showAvailableElements(bOverlayIsSibling, sAggregationName, aResponsibleElementOverlays, iIndex, sControlName, sDisplayText) {
273
+ async showAvailableElements(bOverlayIsSibling, sAggregationName, aResponsibleElementOverlays, iIndex, sControlName, sDisplayText) {
276
274
  const oResponsibleElementOverlay = aResponsibleElementOverlays[0];
277
275
  const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oResponsibleElementOverlay, this);
278
276
  const vSiblingElement = bOverlayIsSibling && oResponsibleElementOverlay.getElement();
279
- let mActions;
280
- let aAllElements = [];
281
-
282
- return ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this, undefined, this.getDesignTime())
283
- .then(function(mRetrievedActions) {
284
- if (sAggregationName === "$$OnlyChildCustomField$$") {
285
- return [];
286
- }
287
- mActions = mRetrievedActions[sAggregationName];
288
- return this.getAllElements(bOverlayIsSibling, [mParents.responsibleElementOverlay], sControlName, sDisplayText);
289
- }.bind(this))
290
-
291
- .then(function(aCollectedElements) {
292
- aAllElements = aCollectedElements;
293
- configureExtensibility.call(this, bOverlayIsSibling);
294
- const oAggregationWithElements = aAllElements.filter(function(mElementsPerAggregation) {
295
- return mElementsPerAggregation.aggregation === sAggregationName;
296
- })[0];
297
- const aElementsPerAggregation = oAggregationWithElements ? oAggregationWithElements.elements : [];
298
-
299
- this.getDialog().setElements(aElementsPerAggregation);
300
- if (sDisplayText) {
301
- // Aggregation is part of title
302
- const oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
303
- const sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", [sDisplayText]);
304
- this.getDialog().setTitle(sDialogTitle);
305
- } else if (sAggregationName || sControlName) {
306
- // Only one aggregation, no aggregation in title
307
- this._setDialogTitle(mActions || {}, mParents.parent, sControlName);
308
- }
309
-
310
- return this.getDialog().open()
311
-
312
- .then(function() {
313
- const aSelectedElements = this.getDialog().getSelectedElements();
314
- return CommandBuilder.createCommands(mParents,
315
- vSiblingElement,
316
- mActions,
317
- iIndex,
318
- aSelectedElements,
319
- sAggregationName,
320
- this
321
- );
322
- }.bind(this))
323
-
324
- .then(function() {
325
- const oOverlayToFocus = OverlayRegistry.getOverlay(vSiblingElement) || oResponsibleElementOverlay;
326
- oOverlayToFocus.focus();
327
- })
328
277
 
329
- .catch(function(oError) {
330
- // no error means canceled dialog
278
+ const mRetrievedActions = await ActionExtractor.getActions(bOverlayIsSibling, oResponsibleElementOverlay, this, undefined, this.getDesignTime());
279
+ let aCollectedElements = [];
280
+ const mActions = mRetrievedActions[sAggregationName];
281
+ if (sAggregationName !== "$$OnlyChildCustomField$$") {
282
+ try {
283
+ aCollectedElements = await this.getAllElements(bOverlayIsSibling, [mParents.responsibleElementOverlay], sControlName, sDisplayText);
284
+ } catch (oError) {
331
285
  if (oError instanceof Error) {
332
286
  throw oError;
287
+ } else {
288
+ Log.info("Service not up to date, skipping add dialog", "sap.ui.rta");
289
+ return;
333
290
  }
334
- });
335
- }.bind(this))
291
+ }
292
+ }
293
+
294
+ configureExtensibility.call(this, bOverlayIsSibling);
295
+ const oAggregationWithElements = aCollectedElements.filter(function(mElementsPerAggregation) {
296
+ return mElementsPerAggregation.aggregation === sAggregationName;
297
+ })[0];
298
+ const aElementsPerAggregation = oAggregationWithElements ? oAggregationWithElements.elements : [];
299
+
300
+ this.getDialog().setElements(aElementsPerAggregation);
301
+ if (sDisplayText) {
302
+ // Aggregation is part of title
303
+ const oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
304
+ const sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", [sDisplayText]);
305
+ this.getDialog().setTitle(sDialogTitle);
306
+ } else if (sAggregationName || sControlName) {
307
+ // Only one aggregation, no aggregation in title
308
+ this._setDialogTitle(mActions || {}, mParents.parent, sControlName);
309
+ }
310
+
311
+ try {
312
+ await this.getDialog().open();
313
+
314
+ const aSelectedElements = this.getDialog().getSelectedElements();
315
+ await CommandBuilder.createCommands(mParents,
316
+ vSiblingElement,
317
+ mActions,
318
+ iIndex,
319
+ aSelectedElements,
320
+ sAggregationName,
321
+ this
322
+ );
336
323
 
337
- .catch(function(oError) {
324
+ const oOverlayToFocus = OverlayRegistry.getOverlay(vSiblingElement) || oResponsibleElementOverlay;
325
+ oOverlayToFocus.focus();
326
+ } catch (oError) {
327
+ // no error means canceled dialog
338
328
  if (oError instanceof Error) {
339
329
  throw oError;
340
- } else {
341
- Log.info("Service not up to date, skipping add dialog", "sap.ui.rta");
342
330
  }
343
- });
331
+ }
344
332
  },
345
333
 
346
334
  _setDialogTitle(mActions, oParentElement, sControlName) {
@@ -370,22 +358,21 @@ sap.ui.define([
370
358
  * @param {sap.ui.dt.Overlay} oOverlay - Overlay to be checked
371
359
  * @param {object} mPropertyBag - Additional data for the check
372
360
  * @returns {object} Returns object with editable boolean values for "asChild" and "asSibling"
373
- * @protected
361
+ * @override
374
362
  */
375
- _isEditable(oOverlay, mPropertyBag) {
376
- return Promise.all([
377
- this._isEditableCheck(mPropertyBag.sourceElementOverlay, true),
378
- this._isEditableCheck(mPropertyBag.sourceElementOverlay, false)
379
- ])
380
- .then(function(aPromiseValues) {
363
+ async _isEditable(oOverlay, mPropertyBag) {
364
+ try {
365
+ const [bAsSibling, bAsChild] = await Promise.all([
366
+ this._isEditableCheck(mPropertyBag.sourceElementOverlay, true),
367
+ this._isEditableCheck(mPropertyBag.sourceElementOverlay, false)
368
+ ]);
381
369
  return {
382
- asSibling: aPromiseValues[0],
383
- asChild: aPromiseValues[1]
370
+ asSibling: bAsSibling,
371
+ asChild: bAsChild
384
372
  };
385
- })
386
- .catch(function(vError) {
387
- Log.error(vError);
388
- });
373
+ } catch (oError) {
374
+ Log.error(oError);
375
+ }
389
376
  },
390
377
 
391
378
  async _isEditableCheck(oOverlay, bOverlayIsSibling) {
@@ -428,7 +415,7 @@ sap.ui.define([
428
415
  * @returns {Array} An array with all elements
429
416
  * @protected
430
417
  */
431
- getAllElements(bOverlayIsSibling, aElementOverlays) {
418
+ async getAllElements(bOverlayIsSibling, aElementOverlays) {
432
419
  const oElementOverlay = aElementOverlays[0];
433
420
  const mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oElementOverlay, this);
434
421
  let mActions;
@@ -442,54 +429,40 @@ sap.ui.define([
442
429
 
443
430
  this.clearExtensibilityInfo(bOverlayIsSibling);
444
431
 
445
- return ActionExtractor.getActions(bOverlayIsSibling, oElementOverlay, this, undefined, this.getDesignTime())
446
- .then(function(mAllActions) {
447
- each(mAllActions, function(sAggregationName) {
448
- mActions = mAllActions[sAggregationName];
449
- mActions.aggregation = sAggregationName;
450
- if (mActions.addViaDelegate) {
451
- bCheckExtensibility = true;
452
- }
453
- aPromises.push({
454
- aggregation: sAggregationName,
455
- elementPromises: [
456
- mActions.reveal
457
- ? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions)
458
- : Promise.resolve([]),
459
- mActions.addViaDelegate
460
- ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate)
461
- : Promise.resolve([])
462
- ]
463
- });
464
- });
465
- if (bCheckExtensibility) {
466
- return loadExtensibilityInfo(mParents.parent);
432
+ const mAllActions = await ActionExtractor.getActions(bOverlayIsSibling, oElementOverlay, this, undefined, this.getDesignTime());
433
+ each(mAllActions, function(sAggregationName) {
434
+ mActions = mAllActions[sAggregationName];
435
+ mActions.aggregation = sAggregationName;
436
+ if (mActions.addViaDelegate) {
437
+ bCheckExtensibility = true;
467
438
  }
468
- return undefined;
469
- })
470
-
471
- .then(function(oExtensibilityInfo) {
472
- this.setExtensibilityInfo(bOverlayIsSibling, oExtensibilityInfo);
473
- }.bind(this))
474
-
475
- .then(this._combineAnalyzerResults.bind(this, aPromises))
439
+ aPromises.push({
440
+ aggregation: sAggregationName,
441
+ elementPromises: [
442
+ mActions.reveal
443
+ ? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions)
444
+ : Promise.resolve([]),
445
+ mActions.addViaDelegate
446
+ ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate)
447
+ : Promise.resolve([])
448
+ ]
449
+ });
450
+ });
451
+ const oExtensibilityInfo = bCheckExtensibility && await loadExtensibilityInfo(mParents.parent);
476
452
 
477
- .then(function(aAllElements) {
478
- this.setCachedElements(aAllElements, bOverlayIsSibling);
479
- return aAllElements;
480
- }.bind(this))
453
+ this.setExtensibilityInfo(bOverlayIsSibling, oExtensibilityInfo);
454
+ const aAllElements = await this._combineAnalyzerResults(aPromises);
481
455
 
482
- .catch(function(oError) {
483
- throw oError;
484
- });
456
+ this.setCachedElements(aAllElements, bOverlayIsSibling);
457
+ return aAllElements;
485
458
  },
486
459
 
487
460
  /**
488
461
  * Retrieves the context menu item for the actions
489
462
  * Two items are returned here: one for when the overlay is sibling and one for when it is child. In case of multiple
490
463
  * aggregations for child elements, a submenu is built containing all aggregations and the sibling.
491
- * @param {sap.ui.dt.ElementOverlay} aElementOverlays - List of overlays for which the context menu was opened
492
- * @return {object[]} Array containing the items with required data
464
+ * @param {sap.ui.dt.ElementOverlay} aElementOverlays - List of overlays for which the context menu was opened
465
+ * @returns {object[]} Array containing the items with required data
493
466
  */
494
467
  getMenuItems(aElementOverlays) {
495
468
  const aMenuItems = [];
@@ -696,7 +669,7 @@ sap.ui.define([
696
669
  // elements: [...]
697
670
  // }
698
671
  // ]
699
- _combineAnalyzerResults(aAllPromises) {
672
+ async _combineAnalyzerResults(aAllPromises) {
700
673
  const aCollectedPromises = [];
701
674
 
702
675
  aAllPromises.forEach(function(aPromisesByAggregation) {
@@ -713,13 +686,11 @@ sap.ui.define([
713
686
  );
714
687
  });
715
688
 
716
- return Promise.all(aCollectedPromises)
717
- .then(function(aElementsPerAggregation) {
718
- // Filter out results without elements
719
- return aElementsPerAggregation.filter(function(oElementsPerAggregation) {
720
- const aElements = oElementsPerAggregation && oElementsPerAggregation.elements;
721
- return aElements.length > 0;
722
- });
689
+ const aElementsPerAggregation = await Promise.all(aCollectedPromises);
690
+ // Filter out results without elements
691
+ return aElementsPerAggregation.filter(function(oElementsPerAggregation) {
692
+ const aElements = oElementsPerAggregation && oElementsPerAggregation.elements;
693
+ return aElements.length > 0;
723
694
  });
724
695
  },
725
696
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * Helper object containing methods for the AdditionalElements plugin
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.131.1
20
+ * @version 1.132.1
21
21
  * @private
22
22
  * @since 1.94
23
23
  */