@openui5/sap.ui.rta 1.120.6 → 1.121.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 (164) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +1 -1
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +507 -759
  7. package/src/sap/ui/rta/Utils.js +1 -146
  8. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
  9. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +3 -3
  11. package/src/sap/ui/rta/appVariant/Utils.js +3 -3
  12. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +5 -3
  13. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_bg.properties +1 -1
  14. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saprigi.properties +27 -27
  15. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_et.properties +1 -1
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fi.properties +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr.properties +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_kk.properties +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_lv.properties +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_mk.properties +1 -1
  21. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ru.properties +1 -1
  22. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_th.properties +1 -1
  23. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  24. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  25. package/src/sap/ui/rta/command/AddXML.js +1 -1
  26. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +3 -3
  27. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  28. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  29. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  30. package/src/sap/ui/rta/command/Combine.js +1 -1
  31. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  32. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  33. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  34. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  35. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -5
  36. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  37. package/src/sap/ui/rta/command/ControlVariantSwitch.js +10 -4
  38. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  39. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  40. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  41. package/src/sap/ui/rta/command/LREPSerializer.js +4 -3
  42. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  43. package/src/sap/ui/rta/command/Move.js +1 -1
  44. package/src/sap/ui/rta/command/Property.js +1 -1
  45. package/src/sap/ui/rta/command/Remove.js +1 -1
  46. package/src/sap/ui/rta/command/Rename.js +1 -1
  47. package/src/sap/ui/rta/command/Resize.js +1 -1
  48. package/src/sap/ui/rta/command/Reveal.js +1 -1
  49. package/src/sap/ui/rta/command/Settings.js +1 -1
  50. package/src/sap/ui/rta/command/Split.js +1 -1
  51. package/src/sap/ui/rta/command/Stack.js +23 -1
  52. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  53. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  54. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  55. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  56. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  57. package/src/sap/ui/rta/enablement/elementActionTest.js +180 -258
  58. package/src/sap/ui/rta/library.js +3 -2
  59. package/src/sap/ui/rta/messagebundle.properties +8 -0
  60. package/src/sap/ui/rta/messagebundle_ar.properties +4 -0
  61. package/src/sap/ui/rta/messagebundle_bg.properties +5 -1
  62. package/src/sap/ui/rta/messagebundle_ca.properties +4 -0
  63. package/src/sap/ui/rta/messagebundle_cnr.properties +5 -1
  64. package/src/sap/ui/rta/messagebundle_cs.properties +4 -0
  65. package/src/sap/ui/rta/messagebundle_cy.properties +8 -4
  66. package/src/sap/ui/rta/messagebundle_da.properties +4 -0
  67. package/src/sap/ui/rta/messagebundle_de.properties +5 -1
  68. package/src/sap/ui/rta/messagebundle_el.properties +4 -0
  69. package/src/sap/ui/rta/messagebundle_en.properties +4 -0
  70. package/src/sap/ui/rta/messagebundle_en_GB.properties +4 -0
  71. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +322 -318
  72. package/src/sap/ui/rta/messagebundle_es.properties +4 -0
  73. package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -1
  74. package/src/sap/ui/rta/messagebundle_et.properties +6 -2
  75. package/src/sap/ui/rta/messagebundle_fi.properties +4 -0
  76. package/src/sap/ui/rta/messagebundle_fr.properties +5 -1
  77. package/src/sap/ui/rta/messagebundle_fr_CA.properties +4 -0
  78. package/src/sap/ui/rta/messagebundle_hi.properties +4 -0
  79. package/src/sap/ui/rta/messagebundle_hr.properties +6 -2
  80. package/src/sap/ui/rta/messagebundle_hu.properties +4 -0
  81. package/src/sap/ui/rta/messagebundle_id.properties +5 -1
  82. package/src/sap/ui/rta/messagebundle_it.properties +10 -6
  83. package/src/sap/ui/rta/messagebundle_iw.properties +9 -5
  84. package/src/sap/ui/rta/messagebundle_ja.properties +4 -0
  85. package/src/sap/ui/rta/messagebundle_kk.properties +4 -0
  86. package/src/sap/ui/rta/messagebundle_ko.properties +4 -0
  87. package/src/sap/ui/rta/messagebundle_lt.properties +5 -1
  88. package/src/sap/ui/rta/messagebundle_lv.properties +11 -7
  89. package/src/sap/ui/rta/messagebundle_mk.properties +15 -11
  90. package/src/sap/ui/rta/messagebundle_ms.properties +5 -1
  91. package/src/sap/ui/rta/messagebundle_nl.properties +4 -0
  92. package/src/sap/ui/rta/messagebundle_no.properties +4 -0
  93. package/src/sap/ui/rta/messagebundle_pl.properties +5 -1
  94. package/src/sap/ui/rta/messagebundle_pt.properties +4 -0
  95. package/src/sap/ui/rta/messagebundle_pt_PT.properties +4 -0
  96. package/src/sap/ui/rta/messagebundle_ro.properties +8 -4
  97. package/src/sap/ui/rta/messagebundle_ru.properties +5 -1
  98. package/src/sap/ui/rta/messagebundle_sh.properties +5 -1
  99. package/src/sap/ui/rta/messagebundle_sk.properties +4 -0
  100. package/src/sap/ui/rta/messagebundle_sl.properties +7 -3
  101. package/src/sap/ui/rta/messagebundle_sr.properties +6 -2
  102. package/src/sap/ui/rta/messagebundle_sv.properties +4 -0
  103. package/src/sap/ui/rta/messagebundle_th.properties +9 -5
  104. package/src/sap/ui/rta/messagebundle_tr.properties +7 -3
  105. package/src/sap/ui/rta/messagebundle_uk.properties +5 -1
  106. package/src/sap/ui/rta/messagebundle_vi.properties +4 -0
  107. package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -1
  108. package/src/sap/ui/rta/messagebundle_zh_TW.properties +6 -2
  109. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +16 -11
  110. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  111. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  112. package/src/sap/ui/rta/plugin/CompVariant.js +43 -1
  113. package/src/sap/ui/rta/plugin/ControlVariant.js +3 -2
  114. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  115. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  116. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  117. package/src/sap/ui/rta/plugin/EasyAdd.js +2 -2
  118. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  119. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  120. package/src/sap/ui/rta/plugin/Plugin.js +18 -10
  121. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  122. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  123. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  124. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -2
  125. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  126. package/src/sap/ui/rta/plugin/Selection.js +24 -9
  127. package/src/sap/ui/rta/plugin/Settings.js +17 -15
  128. package/src/sap/ui/rta/plugin/Split.js +1 -1
  129. package/src/sap/ui/rta/plugin/Stretch.js +14 -13
  130. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  131. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  132. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +134 -67
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  134. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +6 -2
  135. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  136. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +57 -47
  137. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +21 -8
  138. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +56 -41
  139. package/src/sap/ui/rta/service/Action.js +1 -1
  140. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  141. package/src/sap/ui/rta/service/Outline.js +22 -18
  142. package/src/sap/ui/rta/service/Property.js +1 -1
  143. package/src/sap/ui/rta/service/Selection.js +1 -1
  144. package/src/sap/ui/rta/service/SupportTools.js +23 -19
  145. package/src/sap/ui/rta/toolbar/Adaptation.js +16 -18
  146. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  147. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  148. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  149. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  150. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  151. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  152. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  153. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  154. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +12 -5
  155. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  156. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  157. package/src/sap/ui/rta/util/ReloadManager.js +19 -59
  158. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  159. package/src/sap/ui/rta/util/ServiceManager.js +193 -0
  160. package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
  161. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +90 -45
  162. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +32 -25
  163. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +98 -132
  164. package/LICENSES/BSD-2-Clause.txt +0 -22
@@ -7,33 +7,35 @@
7
7
  sap.ui.define([
8
8
  "sap/base/util/each",
9
9
  "sap/base/Log",
10
+ "sap/ui/core/EventBus",
10
11
  "sap/ui/core/IconPool",
11
12
  "sap/ui/core/Lib",
12
13
  "sap/ui/dt/OverlayRegistry",
13
14
  "sap/ui/dt/OverlayUtil",
14
15
  "sap/ui/fl/write/api/FieldExtensibility",
16
+ "sap/ui/rta/plugin/additionalElements/ActionExtractor",
15
17
  "sap/ui/rta/plugin/additionalElements/AddElementsDialog",
16
18
  "sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer",
17
- "sap/ui/rta/plugin/Plugin",
18
- "sap/ui/rta/Utils",
19
19
  "sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils",
20
20
  "sap/ui/rta/plugin/additionalElements/CommandBuilder",
21
- "sap/ui/rta/plugin/additionalElements/ActionExtractor"
21
+ "sap/ui/rta/plugin/Plugin",
22
+ "sap/ui/rta/Utils"
22
23
  ], function(
23
24
  each,
24
25
  Log,
26
+ EventBus,
25
27
  IconPool,
26
28
  Lib,
27
29
  OverlayRegistry,
28
30
  OverlayUtil,
29
31
  FieldExtensibility,
32
+ ActionExtractor,
30
33
  AddElementsDialog,
31
34
  AdditionalElementsAnalyzer,
32
- Plugin,
33
- Utils,
34
35
  AdditionalElementsUtils,
35
36
  CommandBuilder,
36
- ActionExtractor
37
+ Plugin,
38
+ Utils
37
39
  ) {
38
40
  "use strict";
39
41
 
@@ -47,23 +49,33 @@ sap.ui.define([
47
49
  });
48
50
  }
49
51
 
50
- function handleExtensibility(oControl) {
51
- return FieldExtensibility.onControlSelected(oControl)
52
-
53
- .then(function() {
54
- return Promise.all([
55
- Utils.isServiceUpToDate(oControl),
56
- FieldExtensibility.isExtensibilityEnabled(oControl)
57
- ]);
58
- })
59
-
60
- .then(function(aResult) {
61
- var bExtensibilityEnabled = !!aResult[1];
62
- if (bExtensibilityEnabled) {
63
- return FieldExtensibility.getExtensionData(oControl);
52
+ /**
53
+ * Utility function to check if the OData service is updated in the meantime
54
+ *
55
+ * @param {sap.ui.core.Control} oControl - Control to be checked
56
+ * @returns {Promise} resolves if service is up to date, rejects otherwise
57
+ */
58
+ async function isServiceUpToDate(oControl) {
59
+ const oModel = oControl.getModel();
60
+ if (oModel && oModel.sServiceUrl) {
61
+ const bServiceOutdated = await FieldExtensibility.isServiceOutdated(oModel.sServiceUrl);
62
+ if (bServiceOutdated) {
63
+ FieldExtensibility.setServiceValid(oModel.sServiceUrl);
64
+ // needs FLP to trigger UI restart popup
65
+ EventBus.getInstance().publish("sap.ui.core.UnrecoverableClientStateCorruption", "RequestReload", {});
64
66
  }
65
- return undefined;
66
- });
67
+ }
68
+ }
69
+
70
+ async function handleExtensibility(oControl) {
71
+ await FieldExtensibility.onControlSelected(oControl);
72
+ const bExtensibilityEnabled = await FieldExtensibility.isExtensibilityEnabled(oControl);
73
+
74
+ if (bExtensibilityEnabled) {
75
+ await isServiceUpToDate(oControl);
76
+ return FieldExtensibility.getExtensionData(oControl);
77
+ }
78
+ return undefined;
67
79
  }
68
80
 
69
81
  /**
@@ -77,7 +89,7 @@ sap.ui.define([
77
89
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
78
90
  * @extends sap.ui.rta.plugin.Plugin
79
91
  * @author SAP SE
80
- * @version 1.120.6
92
+ * @version 1.121.0
81
93
  * @constructor
82
94
  * @private
83
95
  * @since 1.44
@@ -86,6 +98,7 @@ sap.ui.define([
86
98
  var AdditionalElementsPlugin = Plugin.extend("sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin", {
87
99
  // eslint-disable-next-line object-shorthand
88
100
  constructor: function(...aArgs) {
101
+ this._getMenuItemsPromise = Promise.resolve();
89
102
  const [oPropertyBag] = aArgs;
90
103
  oPropertyBag.dialog = new AddElementsDialog();
91
104
  Plugin.apply(this, aArgs);
@@ -280,7 +293,14 @@ sap.ui.define([
280
293
 
281
294
  .then(function() {
282
295
  var aSelectedElements = this.getDialog().getSelectedElements();
283
- return CommandBuilder.createCommands(mParents, vSiblingElement, mActions, iIndex, aSelectedElements, sAggregationName, this);
296
+ return CommandBuilder.createCommands(mParents,
297
+ vSiblingElement,
298
+ mActions,
299
+ iIndex,
300
+ aSelectedElements,
301
+ sAggregationName,
302
+ this
303
+ );
284
304
  }.bind(this))
285
305
 
286
306
  .then(function() {
@@ -306,7 +326,13 @@ sap.ui.define([
306
326
  },
307
327
 
308
328
  _setDialogTitle(mActions, oParentElement, sControlName) {
309
- var sDialogTitle = AdditionalElementsUtils.getText("HEADER_ADDITIONAL_ELEMENTS", mActions, oParentElement, PLURAL, sControlName);
329
+ var sDialogTitle = AdditionalElementsUtils.getText(
330
+ "HEADER_ADDITIONAL_ELEMENTS",
331
+ mActions,
332
+ oParentElement,
333
+ PLURAL,
334
+ sControlName
335
+ );
310
336
  this.getDialog().setTitle(sDialogTitle);
311
337
  },
312
338
 
@@ -324,7 +350,10 @@ sap.ui.define([
324
350
  * @protected
325
351
  */
326
352
  _isEditable(oOverlay, mPropertyBag) {
327
- return Promise.all([this._isEditableCheck(mPropertyBag.sourceElementOverlay, true), this._isEditableCheck(mPropertyBag.sourceElementOverlay, false)])
353
+ return Promise.all([
354
+ this._isEditableCheck(mPropertyBag.sourceElementOverlay, true),
355
+ this._isEditableCheck(mPropertyBag.sourceElementOverlay, false)
356
+ ])
328
357
  .then(function(aPromiseValues) {
329
358
  return {
330
359
  asSibling: aPromiseValues[0],
@@ -336,43 +365,36 @@ sap.ui.define([
336
365
  });
337
366
  },
338
367
 
339
- _isEditableCheck(oOverlay, bOverlayIsSibling) {
340
- return Promise.resolve()
341
- .then(function() {
342
- var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
368
+ async _isEditableCheck(oOverlay, bOverlayIsSibling) {
369
+ var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
343
370
 
344
- if (!mParents.relevantContainerOverlay) {
345
- return false;
346
- }
371
+ if (!mParents.relevantContainerOverlay) {
372
+ return false;
373
+ }
347
374
 
348
- return ActionExtractor.getActions(bOverlayIsSibling, oOverlay, this, true, this.getDesignTime())
349
- .then(function(mActions) {
350
- this.clearCachedElements();
351
- return Utils.doIfAllControlsAreAvailable([oOverlay, mParents.parentOverlay], function() {
352
- var bEditable = false;
353
- // For the sibling case, check if anything is available for the same aggregation
354
- if (bOverlayIsSibling) {
355
- bEditable = isThereAnAggregationActionForSameAggregation(mActions, mParents);
356
- } else {
357
- bEditable = Object.keys(mActions).some(function(sAggregationName) {
358
- if (mActions[sAggregationName].addViaDelegate) {
359
- bEditable = this.checkAggregationsOnSelf(mParents.parentOverlay, "add", undefined, "delegate");
360
- }
361
- if (!bEditable && mActions[sAggregationName].reveal) {
362
- return true;
363
- }
364
- return bEditable;
365
- }.bind(this));
375
+ const mActions = await ActionExtractor.getActions(bOverlayIsSibling, oOverlay, this, true, this.getDesignTime());
376
+ // Prevents clear cached elements during the getMenuItems promise is pending
377
+ await this._getMenuItemsPromise;
378
+ this.clearCachedElements();
379
+ return Utils.doIfAllControlsAreAvailable([oOverlay, mParents.parentOverlay], function() {
380
+ var bEditable = false;
381
+ // For the sibling case, check if anything is available for the same aggregation
382
+ if (bOverlayIsSibling) {
383
+ bEditable = isThereAnAggregationActionForSameAggregation(mActions, mParents);
384
+ } else {
385
+ bEditable = Object.keys(mActions).some(function(sAggregationName) {
386
+ if (mActions[sAggregationName].addViaDelegate) {
387
+ bEditable = this.checkAggregationsOnSelf(mParents.parentOverlay, "add", undefined, "delegate");
388
+ }
389
+ if (!bEditable && mActions[sAggregationName].reveal) {
390
+ return true;
366
391
  }
367
392
  return bEditable;
368
393
  }.bind(this));
369
- }.bind(this))
370
- .then(function(bEditable) {
371
- bEditable &&=
372
- this.hasStableId(oOverlay) // don't confuse the user/Web IDE by an editable overlay without stable ID
373
- && this.hasStableId(mParents.parentOverlay);
374
- return bEditable;
375
- }.bind(this));
394
+ }
395
+
396
+ bEditable &&= this.hasStableId(oOverlay) && this.hasStableId(mParents.parentOverlay);
397
+ return bEditable;
376
398
  }.bind(this));
377
399
  },
378
400
 
@@ -408,8 +430,12 @@ sap.ui.define([
408
430
  aPromises.push({
409
431
  aggregation: sAggregationName,
410
432
  elementPromises: [
411
- mActions.reveal ? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions) : Promise.resolve([]),
412
- mActions.addViaDelegate ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate) : Promise.resolve([])
433
+ mActions.reveal
434
+ ? AdditionalElementsAnalyzer.enhanceInvisibleElements(mParents.parent, mActions)
435
+ : Promise.resolve([]),
436
+ mActions.addViaDelegate
437
+ ? AdditionalElementsAnalyzer.getUnrepresentedDelegateProperties(mParents.parent, mActions.addViaDelegate)
438
+ : Promise.resolve([])
413
439
  ]
414
440
  });
415
441
  });
@@ -446,8 +472,13 @@ sap.ui.define([
446
472
  var aMenuItems = [];
447
473
  var oMenuItem;
448
474
  this.clearCachedElements();
475
+ // Prevents clearing of cached elements before menu items are build. This happens when evaluate editable is running in parallel
476
+ this._getMenuItemsPromise =
449
477
  // getAllElements() is called to set cached elements for the overlay -> which will result in menu item being enabled
450
- return Promise.all([this.getAllElements(false, aElementOverlays), this.getAllElements(true, aElementOverlays)])
478
+ Promise.all([
479
+ this.getAllElements(false, aElementOverlays),
480
+ this.getAllElements(true, aElementOverlays)
481
+ ])
451
482
  .then(function(aElementsWithAggregations) {
452
483
  var bHasChildren = aElementsWithAggregations[0].length > 0;
453
484
  var bHasMultipleAggregations = aElementsWithAggregations[0].length > 1;
@@ -456,22 +487,51 @@ sap.ui.define([
456
487
  var bIsAvailableForSibling = this.isAvailable(aElementOverlays, true);
457
488
  if (bIsAvailableForSibling && (!bIsAvailableForChildren || !bHasChildren)) {
458
489
  // Case 1: Only siblings -> No submenu required
459
- oMenuItem = this._buildMenuItem("CTX_ADD_ELEMENTS_AS_SIBLING", true, aElementOverlays, aElementsWithAggregations, false);
490
+ oMenuItem = this._buildMenuItem(
491
+ "CTX_ADD_ELEMENTS_AS_SIBLING",
492
+ true,
493
+ aElementOverlays,
494
+ aElementsWithAggregations,
495
+ false
496
+ );
460
497
  } else if (!bIsAvailableForSibling && bIsAvailableForChildren && !bHasMultipleAggregations) {
461
498
  // Case 2: Only children, one aggregation -> No submenu required
462
- oMenuItem = this._buildMenuItem("CTX_ADD_ELEMENTS_AS_CHILD", false, aElementOverlays, aElementsWithAggregations, false);
499
+ oMenuItem = this._buildMenuItem(
500
+ "CTX_ADD_ELEMENTS_AS_CHILD",
501
+ false,
502
+ aElementOverlays,
503
+ aElementsWithAggregations,
504
+ false
505
+ );
463
506
  } else if (!bIsAvailableForSibling && bIsAvailableForChildren && bHasMultipleAggregations) {
464
507
  // Case 3: Only children, multiple aggregations -> Submenu required
465
- oMenuItem = this._buildMenuItem("CTX_ADD_ELEMENTS_AS_CHILD", false, aElementOverlays, aElementsWithAggregations, true);
508
+ oMenuItem = this._buildMenuItem(
509
+ "CTX_ADD_ELEMENTS_AS_CHILD",
510
+ false,
511
+ aElementOverlays,
512
+ aElementsWithAggregations,
513
+ true
514
+ );
466
515
  } else if (bIsAvailableForChildren && bIsAvailableForSibling && bHasChildren && bHasSiblings) {
467
516
  // Case 4: Children and siblings -> Submenu required
468
- oMenuItem = this._buildMenuItem("CTX_ADD_ELEMENTS_CHILD_AND_SIBLING", false, aElementOverlays, aElementsWithAggregations, true);
517
+ oMenuItem = this._buildMenuItem(
518
+ "CTX_ADD_ELEMENTS_CHILD_AND_SIBLING",
519
+ false,
520
+ aElementOverlays,
521
+ aElementsWithAggregations,
522
+ true
523
+ );
469
524
  }
470
525
  if (oMenuItem) {
471
- aMenuItems.push(this.enhanceItemWithResponsibleElement(oMenuItem, aElementOverlays, ["addViaDelegate", "reveal", "custom"]));
526
+ aMenuItems.push(this.enhanceItemWithResponsibleElement(
527
+ oMenuItem,
528
+ aElementOverlays,
529
+ ["addViaDelegate", "reveal", "custom"]
530
+ ));
472
531
  }
473
532
  return aMenuItems;
474
533
  }.bind(this));
534
+ return this._getMenuItemsPromise;
475
535
  },
476
536
 
477
537
  _buildMenuItem(sPluginId, bOverlayIsSibling, aElementOverlays, aElementsWithAggregations, bHasSubMenu) {
@@ -549,7 +609,14 @@ sap.ui.define([
549
609
  }.bind(this),
550
610
  handler: function(bOverlayIsSibling, aElementOverlays) {
551
611
  // showAvailableElements has optional parameters
552
- return this.showAvailableElements(bOverlayIsSibling, sAggregationName, aElementOverlays, undefined, undefined, sDisplayText);
612
+ return this.showAvailableElements(
613
+ bOverlayIsSibling,
614
+ sAggregationName,
615
+ aElementOverlays,
616
+ undefined,
617
+ undefined,
618
+ sDisplayText
619
+ );
553
620
  }.bind(this, bOverlayIsSibling),
554
621
  icon: bOverlayIsSibling ? "sap-icon://BusinessSuiteInAppSymbols/icon-add-outside" : "sap-icon://add"
555
622
  };
@@ -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.120.6
20
+ * @version 1.121.0
21
21
  * @private
22
22
  * @since 1.94
23
23
  */
@@ -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.120.6
28
+ * @version 1.121.0
29
29
  * @private
30
30
  * @since 1.94
31
31
  */
@@ -199,6 +199,10 @@ sap.ui.define([
199
199
  return sUri;
200
200
  }
201
201
 
202
+ function createFieldLabelId(oParentControl, sEntityType, sBindingPath) {
203
+ return (`${oParentControl.getId()}_${sEntityType}_${sBindingPath}`).replace("/", "_");
204
+ }
205
+
202
206
  function createAddViaDelegateCommand(mPropertyBag, oParentAggregationDTMetadata) {
203
207
  var oSelectedElement = mPropertyBag.selectedElement;
204
208
  var mParents = mPropertyBag.parents;
@@ -216,7 +220,7 @@ sap.ui.define([
216
220
  var sServiceUri = getODataServiceUriFromManifest(oManifest);
217
221
 
218
222
  return oPlugin.getCommandFactory().getCommandFor(mParents.parent, sCommandName, {
219
- newControlId: Utils.createFieldLabelId(oParent, oSelectedElement.entityType, oSelectedElement.bindingPath),
223
+ newControlId: createFieldLabelId(oParent, oSelectedElement.entityType, oSelectedElement.bindingPath),
220
224
  index: iIndex !== undefined ? iIndex : iAddTargetIndex,
221
225
  bindingString: oSelectedElement.bindingPath,
222
226
  entityType: oSelectedElement.entityType, // needed for custom field support tool
@@ -85,7 +85,7 @@ sap.ui.define([
85
85
  parameters: mURLParameters,
86
86
  asContainer: bAsContainer
87
87
  };
88
- return oAddIFrameDialog.open(mAddIFrameDialogSettings);
88
+ return oAddIFrameDialog.open(mAddIFrameDialogSettings, oParent);
89
89
  })
90
90
  .then(function(mSettings) {
91
91
  if (!mSettings) {
@@ -119,7 +119,7 @@ sap.ui.define([
119
119
  * @class The AddIFrame allows trigger AddIFrame operations on the overlay.
120
120
  * @extends sap.ui.rta.plugin.BaseCreate
121
121
  * @author SAP SE
122
- * @version 1.120.6
122
+ * @version 1.121.0
123
123
  * @constructor
124
124
  * @private
125
125
  * @since 1.75