@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
@@ -41,6 +41,10 @@ sap.ui.define([
41
41
  }
42
42
  });
43
43
 
44
+ function isCompVariant(oElement) {
45
+ return oElement.getMetadata().getName() === "sap.ui.comp.smartvariants.SmartVariantManagement";
46
+ }
47
+
44
48
  function createCommandAndFireEvent(oOverlay, aCommandNames, mProperties, oElement) {
45
49
  var oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
46
50
  var oTargetElement = oElement || oOverlay.getElement();
@@ -89,6 +93,43 @@ sap.ui.define([
89
93
  this.startEdit(aOverlays[0]);
90
94
  }
91
95
 
96
+ /**
97
+ * @override
98
+ */
99
+ CompVariant.prototype.setDesignTime = function(oDesignTime) {
100
+ RenameHandler._setDesignTime.call(this, oDesignTime);
101
+ };
102
+
103
+ /**
104
+ * Checks if variant rename is available for the overlay.
105
+ *
106
+ * @param {sap.ui.dt.ElementOverlay} oElementOverlay - Overlay object
107
+ * @return {boolean} <code>true</code> if available
108
+ * @public
109
+ */
110
+ CompVariant.prototype.isRenameAvailable = function(oElementOverlay) {
111
+ const oVariantManagementControl = oElementOverlay.getElement();
112
+ if (isCompVariant(oVariantManagementControl)) {
113
+ const aVariants = getAllVariants(oElementOverlay);
114
+ const oCurrentVariant = aVariants.find(function(oVariant) {
115
+ return oVariant.getVariantId() === oVariantManagementControl.getPresentVariantId();
116
+ });
117
+ const sLayer = this.getCommandFactory().getFlexSettings().layer;
118
+ return oCurrentVariant.isRenameEnabled(sLayer);
119
+ }
120
+ return false;
121
+ };
122
+
123
+ /**
124
+ * Checks if variant rename is enabled for the overlays.
125
+ * @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
126
+ * @return {boolean} <code>true</code> if available
127
+ * @public
128
+ */
129
+ CompVariant.prototype.isRenameEnabled = function(aElementOverlays) {
130
+ return this.isRenameAvailable(aElementOverlays[0]);
131
+ };
132
+
92
133
  CompVariant.prototype.startEdit = function(oOverlay) {
93
134
  var vDomRef = oOverlay.getDesignTimeMetadata().getData().variantRenameDomRef;
94
135
  RenameHandler.startEdit.call(this, {
@@ -189,7 +230,8 @@ sap.ui.define([
189
230
  MessageBox.Action.CANCEL
190
231
  ],
191
232
  emphasizedAction: oLibraryBundle.getText("BTN_MODIFIED_VARIANT_SAVE"),
192
- styleClass: Utils.getRtaStyleClassName()
233
+ styleClass: Utils.getRtaStyleClassName(),
234
+ id: "compVariantWarningDialog"
193
235
  });
194
236
  } else {
195
237
  createCommandAndFireEvent.call(this, oVariantManagementOverlay, ["compVariantSwitch"], {
@@ -51,7 +51,7 @@ sap.ui.define([
51
51
  * @class The ControlVariant allows propagation of variantManagement key
52
52
  * @extends sap.ui.rta.plugin.Plugin
53
53
  * @author SAP SE
54
- * @version 1.120.6
54
+ * @version 1.121.0
55
55
  * @constructor
56
56
  * @private
57
57
  * @since 1.50
@@ -428,7 +428,8 @@ sap.ui.define([
428
428
  MessageBox.Action.CANCEL
429
429
  ],
430
430
  emphasizedAction: oLibraryBundle.getText("BTN_MODIFIED_VARIANT_SAVE"),
431
- styleClass: Utils.getRtaStyleClassName()
431
+ styleClass: Utils.getRtaStyleClassName(),
432
+ id: "controlVariantWarningDialog"
432
433
  });
433
434
  } else {
434
435
  getCommandForSwitch.call(this, oTargetOverlay, sNewVariantReference, sCurrentVariantReference)
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The CreateContainer allows trigger CreateContainer operations on the overlay
26
26
  * @extends sap.ui.rta.plugin.BaseCreate
27
27
  * @author SAP SE
28
- * @version 1.120.6
28
+ * @version 1.121.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.34
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.dt.plugin.CutPaste
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.120.6
35
+ * @version 1.121.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -33,7 +33,7 @@ function(
33
33
  * @extends sap.ui.dt.plugin.ControlDragDrop
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.120.6
36
+ * @version 1.121.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
26
26
  * @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
27
27
  * @author SAP SE
28
- * @version 1.120.6
28
+ * @version 1.121.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.48
@@ -160,7 +160,7 @@ sap.ui.define([
160
160
  * @private
161
161
  */
162
162
  EasyAdd.prototype._addButton = function(oOverlay, fnCallback, oOverlayDom, sControlName, bOverlayIsSibling) {
163
- var bIsEditable = oOverlay.getEditableByPlugins().indexOf(this._retrievePluginName(bOverlayIsSibling)) > -1;
163
+ var bIsEditable = !!oOverlay.getEditableByPlugins()[this._retrievePluginName(bOverlayIsSibling)];
164
164
  var oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
165
165
 
166
166
  var sId = `${oOverlay.getId()}-AddButton`;
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
26
26
  * @extends sap.ui.rta.plugin.Remove
27
27
  * @author SAP SE
28
- * @version 1.120.6
28
+ * @version 1.121.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.48
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * @class
42
42
  * @extends sap.ui.rta.plugin.Plugin
43
43
  * @author SAP SE
44
- * @version 1.120.6
44
+ * @version 1.121.0
45
45
  * @constructor
46
46
  * @private
47
47
  * @since 1.90
@@ -70,7 +70,7 @@ sap.ui.define([
70
70
  * @extends sap.ui.dt.Plugin
71
71
  *
72
72
  * @author SAP SE
73
- * @version 1.120.6
73
+ * @version 1.121.0
74
74
  *
75
75
  * @constructor
76
76
  * @private
@@ -292,8 +292,7 @@ sap.ui.define([
292
292
 
293
293
  BasePlugin.prototype._isEditableByPlugin = function(oOverlay, bSibling) {
294
294
  var sPluginName = this._retrievePluginName(bSibling);
295
- var aPluginList = oOverlay.getEditableByPlugins();
296
- return aPluginList.indexOf(sPluginName) > -1;
295
+ return !!oOverlay.getEditableByPlugins()[sPluginName];
297
296
  };
298
297
 
299
298
  BasePlugin.prototype.registerElementOverlay = function(oOverlay) {
@@ -365,18 +364,27 @@ sap.ui.define([
365
364
  };
366
365
 
367
366
  BasePlugin.prototype.removeFromPluginsList = function(oOverlay, bSibling) {
368
- var sName = this._retrievePluginName(bSibling);
369
- oOverlay.removeEditableByPlugin(sName);
370
- if (!oOverlay.getEditableByPlugins().length) {
367
+ const sName = this._retrievePluginName(bSibling);
368
+ const mEditableByPlugins = oOverlay.getEditableByPlugins();
369
+ oOverlay.setEditableByPlugins({
370
+ ...mEditableByPlugins,
371
+ [sName]: false
372
+ });
373
+
374
+ // If there are no more plugins registered on the overlay, set editable to false
375
+ if (!Object.values(oOverlay.getEditableByPlugins()).some(Boolean)) {
371
376
  oOverlay.setEditable(false);
372
377
  }
373
378
  };
374
379
 
375
380
  BasePlugin.prototype.addToPluginsList = function(oOverlay, bSibling) {
376
- var sName = this._retrievePluginName(bSibling);
377
- var aPluginList = oOverlay.getEditableByPlugins();
378
- if (aPluginList.indexOf(sName) === -1) {
379
- oOverlay.addEditableByPlugin(sName);
381
+ const sName = this._retrievePluginName(bSibling);
382
+ const mEditableByPlugins = oOverlay.getEditableByPlugins();
383
+ if (!mEditableByPlugins[sName]) {
384
+ oOverlay.setEditableByPlugins({
385
+ ...mEditableByPlugins,
386
+ [sName]: true
387
+ });
380
388
  oOverlay.setEditable(true);
381
389
  }
382
390
  };
@@ -35,7 +35,7 @@ function(
35
35
  * The RTAElementMover is responsible for the RTA specific adaptation of element movements.
36
36
  *
37
37
  * @author SAP SE
38
- * @version 1.120.6
38
+ * @version 1.121.0
39
39
  *
40
40
  * @constructor
41
41
  * @private
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @class The Remove allows trigger remove operations on the overlay
30
30
  * @extends sap.ui.rta.plugin.Plugin
31
31
  * @author SAP SE
32
- * @version 1.120.6
32
+ * @version 1.121.0
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.34
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.120.6
31
+ * @version 1.121.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * Provides Rename handling functionality
44
44
  *
45
45
  * @author SAP SE
46
- * @version 1.120.6
46
+ * @version 1.121.0
47
47
  *
48
48
  * @constructor
49
49
  * @private
@@ -96,7 +96,7 @@ sap.ui.define([
96
96
  var oEditableControlDomRef = oDesignTimeMetadata.getAssociatedDomRef(oElement, mPropertyBag.domRef);
97
97
 
98
98
  // if the Control is currently not visible on the screen, we have to scroll it into view
99
- if (!Utils.isElementInViewport(oEditableControlDomRef)) {
99
+ if (!DOMUtil.isElementInViewport(oEditableControlDomRef)) {
100
100
  oEditableControlDomRef.get(0).scrollIntoView();
101
101
  }
102
102
 
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @class
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  * @author SAP SE
30
- * @version 1.120.6
30
+ * @version 1.121.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.101
@@ -5,19 +5,16 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/base/util/restricted/_intersection",
9
8
  "sap/m/InstanceManager",
10
- "sap/ui/dt/DOMUtil",
9
+ "sap/ui/core/Element",
11
10
  "sap/ui/dt/OverlayRegistry",
12
11
  "sap/ui/dt/OverlayUtil",
13
12
  "sap/ui/events/KeyCodes",
14
13
  "sap/ui/rta/plugin/Plugin",
15
14
  "sap/ui/rta/Utils"
16
- ],
17
- function(
18
- _intersection,
15
+ ], function(
19
16
  InstanceManager,
20
- DOMUtil,
17
+ Element,
21
18
  OverlayRegistry,
22
19
  OverlayUtil,
23
20
  KeyCodes,
@@ -34,7 +31,7 @@ function(
34
31
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
35
32
  * @extends sap.ui.rta.plugin.Plugin
36
33
  * @author SAP SE
37
- * @version 1.120.6
34
+ * @version 1.121.0
38
35
  * @constructor
39
36
  * @private
40
37
  * @since 1.34
@@ -74,7 +71,9 @@ function(
74
71
  var aSharedMultiSelectionPlugins = aMultiSelectionRequiredPlugins.slice();
75
72
 
76
73
  aElementOverlays.forEach(function(oElementOverlay) {
77
- aSharedMultiSelectionPlugins = _intersection(aSharedMultiSelectionPlugins, oElementOverlay.getEditableByPlugins());
74
+ aSharedMultiSelectionPlugins = aSharedMultiSelectionPlugins.filter(function(sPlugin) {
75
+ return oElementOverlay.getEditableByPlugins()[sPlugin];
76
+ });
78
77
  });
79
78
 
80
79
  return aSharedMultiSelectionPlugins.length > 0;
@@ -201,6 +200,22 @@ function(
201
200
  }
202
201
  };
203
202
 
203
+ /**
204
+ * Returns the focused overlay
205
+ *
206
+ * @returns {sap.ui.dt.ElementOverlay} Overlay object
207
+ * @private
208
+ */
209
+ Selection.prototype._getFocusedOverlay = function() {
210
+ if (document.activeElement) {
211
+ var oElement = Element.getElementById(document.activeElement.id);
212
+ if (oElement && oElement.isA("sap.ui.dt.ElementOverlay")) {
213
+ return oElement;
214
+ }
215
+ }
216
+ return undefined;
217
+ };
218
+
204
219
  /**
205
220
  * Handle keydown event
206
221
  *
@@ -211,7 +226,7 @@ function(
211
226
  if (!this.getIsActive()) {
212
227
  return;
213
228
  }
214
- var oOverlay = Utils.getFocusedOverlay();
229
+ var oOverlay = this._getFocusedOverlay();
215
230
  if (oEvent.keyCode === KeyCodes.ENTER) {
216
231
  this._selectOverlay(oEvent);
217
232
  } else if (oEvent.keyCode === KeyCodes.ARROW_UP && oEvent.shiftKey === false && oEvent.altKey === false) {
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The Settings allows trigger change of settings operations on the overlay
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.120.6
28
+ * @version 1.121.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.44
@@ -79,15 +79,16 @@ sap.ui.define([
79
79
  * @public
80
80
  */
81
81
  Settings.prototype.isEnabled = function(aElementOverlays) {
82
- var oElementOverlay = aElementOverlays[0];
83
- var oAction = this.getAction(oElementOverlay);
82
+ const oElementOverlay = aElementOverlays[0];
83
+ const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
84
+ const oAction = this.getAction(oResponsibleElementOverlay);
84
85
  if (!oAction) {
85
86
  return false;
86
87
  }
87
88
 
88
89
  if (typeof oAction.isEnabled !== "undefined") {
89
90
  if (typeof oAction.isEnabled === "function") {
90
- return oAction.isEnabled(oElementOverlay.getElement());
91
+ return oAction.isEnabled(oResponsibleElementOverlay.getElement());
91
92
  }
92
93
  return oAction.isEnabled;
93
94
  }
@@ -248,32 +249,33 @@ sap.ui.define([
248
249
  * @return {object[]} array of the items with required data
249
250
  */
250
251
  Settings.prototype.getMenuItems = function(aElementOverlays) {
251
- var oElementOverlay = aElementOverlays[0];
252
- var vSettingsActions = this.getAction(oElementOverlay);
252
+ const oElementOverlay = aElementOverlays[0];
253
+ const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
254
+ let vSettingsActions = this.getAction(oResponsibleElementOverlay);
253
255
 
254
- var aMenuItems = [];
256
+ const aMenuItems = [];
255
257
  if (vSettingsActions) {
256
- var iRank = 110;
258
+ const iRank = 110;
257
259
 
258
260
  if (vSettingsActions.handler) {
259
261
  vSettingsActions = {
260
262
  settings: vSettingsActions
261
263
  };
262
264
  }
263
- var aSettingsActions = Object.keys(vSettingsActions);
265
+ const aSettingsActions = Object.keys(vSettingsActions);
264
266
  aSettingsActions.forEach(function(sSettingsAction, iIndex, aActions) {
265
- var oSettingsAction = vSettingsActions[sSettingsAction];
267
+ const oSettingsAction = vSettingsActions[sSettingsAction];
266
268
  if (
267
269
  oSettingsAction.handler
268
- && this._checkRelevantContainerStableID(oSettingsAction, oElementOverlay)
269
- && this.isAvailable([oElementOverlay])
270
+ && this._checkRelevantContainerStableID(oSettingsAction, oResponsibleElementOverlay)
271
+ && this.isAvailable([oResponsibleElementOverlay])
270
272
  ) {
271
- var bSingleAction = aActions.length === 1;
273
+ const bSingleAction = aActions.length === 1;
272
274
 
273
275
  aMenuItems.push({
274
276
  id: bSingleAction ? sPluginId : sPluginId + iIndex,
275
277
  rank: bSingleAction ? iRank : iRank + iIndex,
276
- text: this.getActionText(oElementOverlay, oSettingsAction, sPluginId),
278
+ text: this.getActionText(oResponsibleElementOverlay, oSettingsAction, sPluginId),
277
279
  icon: getActionIcon(oSettingsAction),
278
280
  enabled: (
279
281
  typeof oSettingsAction.isEnabled === "function"
@@ -281,7 +283,7 @@ sap.ui.define([
281
283
  return oSettingsAction.isEnabled(aElementOverlays[0].getElement());
282
284
  }
283
285
  || oSettingsAction.isEnabled
284
- || this.isEnabled([oElementOverlay])
286
+ || this.isEnabled([oResponsibleElementOverlay])
285
287
  ),
286
288
  handler: function(fnHandler, aElementOverlays, mPropertyBag) {
287
289
  mPropertyBag ||= {};
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @class
24
24
  * @extends sap.ui.rta.plugin.Plugin
25
25
  * @author SAP SE
26
- * @version 1.120.6
26
+ * @version 1.121.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
@@ -9,13 +9,11 @@ sap.ui.define([
9
9
  "sap/ui/rta/plugin/Plugin",
10
10
  "sap/ui/dt/OverlayRegistry",
11
11
  "sap/ui/dt/OverlayUtil",
12
- "sap/base/util/includes",
13
12
  "sap/base/util/restricted/_debounce"
14
13
  ], function(
15
14
  Plugin,
16
15
  OverlayRegistry,
17
16
  OverlayUtil,
18
- includes,
19
17
  _debounce
20
18
  ) {
21
19
  "use strict";
@@ -31,7 +29,7 @@ sap.ui.define([
31
29
  * @extends sap.ui.rta.plugin.Plugin
32
30
  *
33
31
  * @author SAP SE
34
- * @version 1.120.6
32
+ * @version 1.121.0
35
33
  *
36
34
  * @constructor
37
35
  * @private
@@ -74,7 +72,6 @@ sap.ui.define([
74
72
  oElement.removeStyleClass(Stretch.STRETCHSTYLECLASS);
75
73
  }
76
74
  } else {
77
- // TODO: replace when Overlay.getAssociatedDomRef() does not return jQuery any more
78
75
  var oElementDomRef = oOverlay.getAssociatedDomRef() && oOverlay.getAssociatedDomRef().get(0);
79
76
  if (oElementDomRef) {
80
77
  if (bAddClass) {
@@ -127,7 +124,8 @@ sap.ui.define([
127
124
  }
128
125
 
129
126
  /**
130
- * Checks all the decendants for an editable child. Stops as soon as an editable is found or the children don't have the same size anymore.
127
+ * Checks all the decendants for an editable child. Stops as soon as an editable is found
128
+ * or the children don't have the same size anymore.
131
129
  *
132
130
  * @param {sap.ui.dt.ElementOverlay} oReferenceOverlay - overlay object
133
131
  * @param {sap.ui.dt.ElementOverlay[]} aChildOverlays - array of child overlay objects
@@ -184,7 +182,7 @@ sap.ui.define([
184
182
 
185
183
  Stretch.prototype.addStretchCandidate = function(oOverlay) {
186
184
  var oElement = oOverlay.getElement();
187
- if (!includes(this.getStretchCandidates(), oElement.getId())) {
185
+ if (!this.getStretchCandidates().includes(oElement.getId())) {
188
186
  this.addAssociation("stretchCandidates", oElement);
189
187
  }
190
188
  };
@@ -253,7 +251,7 @@ sap.ui.define([
253
251
 
254
252
  this._aOverlaysCollected ||= [];
255
253
 
256
- if (!includes(this._aOverlaysCollected, oOverlay)) {
254
+ if (!this._aOverlaysCollected.includes(oOverlay)) {
257
255
  this._aOverlaysCollected.push(oOverlay);
258
256
  this.fnDebounced();
259
257
  }
@@ -279,7 +277,8 @@ sap.ui.define([
279
277
  };
280
278
 
281
279
  /**
282
- * When editable changes on an overlay, all parent-overlays and the overlay itself, who are already stretch candidates, have to be reevaluated
280
+ * When editable changes on an overlay, all parent-overlays and the overlay itself,
281
+ * who are already stretch candidates, have to be reevaluated
283
282
  *
284
283
  * @param {sap.ui.base.Event} oEvent event object
285
284
  */
@@ -302,7 +301,9 @@ sap.ui.define([
302
301
  var aRelevantOverlays = this._getRelevantOverlays(oOverlay);
303
302
  var fnDebounced = _debounce(function() {
304
303
  if (!this.bIsDestroyed && !oOverlay.bIsDestroyed) {
305
- var aNewStretchCandidates = this._getNewStretchCandidates(aRelevantOverlays).concat(this._getRelevantOverlaysOnEditableChange(oOverlay));
304
+ var aNewStretchCandidates =
305
+ this._getNewStretchCandidates(aRelevantOverlays)
306
+ .concat(this._getRelevantOverlaysOnEditableChange(oOverlay));
306
307
  aNewStretchCandidates = aNewStretchCandidates.filter(function(sId, iPosition, aAllCandidates) {
307
308
  return aAllCandidates.indexOf(sId) === iPosition;
308
309
  });
@@ -328,7 +329,7 @@ sap.ui.define([
328
329
  };
329
330
 
330
331
  Stretch.prototype._getRelevantOverlaysOnEditableChange = function(oOverlay) {
331
- var aRelevantElements = includes(this.getStretchCandidates(), oOverlay.getElement().getId()) ? [oOverlay.getElement().getId()] : [];
332
+ var aRelevantElements = this.getStretchCandidates().includes(oOverlay.getElement().getId()) ? [oOverlay.getElement().getId()] : [];
332
333
  var oParentAggregationOverlay = oOverlay.getParentAggregationOverlay();
333
334
  if (!oParentAggregationOverlay) {
334
335
  return aRelevantElements;
@@ -358,12 +359,13 @@ sap.ui.define([
358
359
  return aReturn;
359
360
  }
360
361
 
361
- if (!includes(this.getStretchCandidates(), oOverlay.getElement().getId())) {
362
+ if (!this.getStretchCandidates().includes(oOverlay.getElement().getId())) {
362
363
  return aReturn;
363
364
  }
364
365
 
365
366
  aReturn.push(oOverlay.getElement().getId());
366
367
  }
368
+ return aReturn;
367
369
  };
368
370
 
369
371
  Stretch.prototype._getNewStretchCandidates = function(aOverlays) {
@@ -379,7 +381,6 @@ sap.ui.define([
379
381
 
380
382
  Stretch.prototype._reevaluateStretching = function(oOverlay) {
381
383
  if (!oOverlay.bIsDestroyed) {
382
- // TODO: replace when getAssociatedDomRef does not return jQuery any more
383
384
  var oElementDomRef = oOverlay.getAssociatedDomRef() && oOverlay.getAssociatedDomRef().get(0);
384
385
  if (oElementDomRef) {
385
386
  var bIsStretched = oElementDomRef.classList.contains(Stretch.STRETCHSTYLECLASS);
@@ -392,11 +393,11 @@ sap.ui.define([
392
393
  }
393
394
  }
394
395
  }
396
+ return false;
395
397
  };
396
398
 
397
399
  Stretch.prototype._checkParentAndAddToStretchCandidates = function(oOverlay) {
398
400
  var oParentOverlay = oOverlay.getParentElementOverlay();
399
- // TODO: replace when getAssociatedDomRef does not return jQuery any more
400
401
  var oParentElementDOM = oParentOverlay && oParentOverlay.getAssociatedDomRef() && oParentOverlay.getAssociatedDomRef().get(0);
401
402
  if (oParentElementDOM) {
402
403
  if (startAtSamePosition(oParentOverlay, oOverlay)) {
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.120.6
37
+ * @version 1.121.0
38
38
  * @private
39
39
  * @since 1.94
40
40
  */
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @class Context - Dialog for available Fields in Runtime Authoring
35
35
  * @extends sap.ui.base.ManagedObject
36
36
  * @author SAP SE
37
- * @version 1.120.6
37
+ * @version 1.121.0
38
38
  * @constructor
39
39
  * @private
40
40
  * @since 1.44