@openui5/sap.ui.rta 1.117.1 → 1.118.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 (170) hide show
  1. package/.eslintrc.json +25 -1
  2. package/package.json +6 -6
  3. package/src/sap/ui/rta/.library +1 -1
  4. package/src/sap/ui/rta/Client.js +32 -21
  5. package/src/sap/ui/rta/RuntimeAuthoring.js +78 -45
  6. package/src/sap/ui/rta/Utils.js +10 -16
  7. package/src/sap/ui/rta/api/startAdaptation.js +0 -1
  8. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
  9. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
  10. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
  11. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
  13. package/src/sap/ui/rta/appVariant/Feature.js +20 -30
  14. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
  15. package/src/sap/ui/rta/appVariant/Utils.js +4 -3
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  19. package/src/sap/ui/rta/command/AddIFrame.js +5 -7
  20. package/src/sap/ui/rta/command/AddProperty.js +1 -3
  21. package/src/sap/ui/rta/command/AddXML.js +7 -7
  22. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
  23. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
  24. package/src/sap/ui/rta/command/BaseCommand.js +1 -3
  25. package/src/sap/ui/rta/command/BindProperty.js +4 -5
  26. package/src/sap/ui/rta/command/Combine.js +1 -3
  27. package/src/sap/ui/rta/command/CommandFactory.js +7 -11
  28. package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
  29. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  30. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  31. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -4
  32. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  33. package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
  34. package/src/sap/ui/rta/command/CreateContainer.js +1 -3
  35. package/src/sap/ui/rta/command/CustomAdd.js +1 -2
  36. package/src/sap/ui/rta/command/FlexCommand.js +2 -7
  37. package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
  38. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  39. package/src/sap/ui/rta/command/Move.js +1 -3
  40. package/src/sap/ui/rta/command/Property.js +1 -3
  41. package/src/sap/ui/rta/command/Remove.js +1 -3
  42. package/src/sap/ui/rta/command/Rename.js +1 -3
  43. package/src/sap/ui/rta/command/Resize.js +1 -1
  44. package/src/sap/ui/rta/command/Reveal.js +1 -3
  45. package/src/sap/ui/rta/command/Settings.js +5 -7
  46. package/src/sap/ui/rta/command/Split.js +1 -3
  47. package/src/sap/ui/rta/command/Stack.js +2 -4
  48. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
  49. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  50. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  51. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +4 -3
  52. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  53. package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
  54. package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
  55. package/src/sap/ui/rta/library.js +2 -3
  56. package/src/sap/ui/rta/messagebundle.properties +7 -7
  57. package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
  58. package/src/sap/ui/rta/messagebundle_bg.properties +7 -7
  59. package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
  60. package/src/sap/ui/rta/messagebundle_cs.properties +8 -8
  61. package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
  62. package/src/sap/ui/rta/messagebundle_da.properties +7 -7
  63. package/src/sap/ui/rta/messagebundle_de.properties +8 -8
  64. package/src/sap/ui/rta/messagebundle_el.properties +7 -7
  65. package/src/sap/ui/rta/messagebundle_en.properties +8 -8
  66. package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
  67. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
  68. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
  69. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
  70. package/src/sap/ui/rta/messagebundle_es.properties +8 -8
  71. package/src/sap/ui/rta/messagebundle_es_MX.properties +8 -8
  72. package/src/sap/ui/rta/messagebundle_et.properties +6 -6
  73. package/src/sap/ui/rta/messagebundle_fi.properties +8 -8
  74. package/src/sap/ui/rta/messagebundle_fr.properties +8 -8
  75. package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
  76. package/src/sap/ui/rta/messagebundle_hi.properties +7 -7
  77. package/src/sap/ui/rta/messagebundle_hr.properties +8 -8
  78. package/src/sap/ui/rta/messagebundle_hu.properties +8 -8
  79. package/src/sap/ui/rta/messagebundle_id.properties +8 -8
  80. package/src/sap/ui/rta/messagebundle_it.properties +8 -8
  81. package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
  82. package/src/sap/ui/rta/messagebundle_ja.properties +8 -8
  83. package/src/sap/ui/rta/messagebundle_kk.properties +8 -8
  84. package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
  85. package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
  86. package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
  87. package/src/sap/ui/rta/messagebundle_ms.properties +8 -8
  88. package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
  89. package/src/sap/ui/rta/messagebundle_no.properties +8 -8
  90. package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
  91. package/src/sap/ui/rta/messagebundle_pt.properties +8 -8
  92. package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
  93. package/src/sap/ui/rta/messagebundle_ro.properties +8 -8
  94. package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
  95. package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
  96. package/src/sap/ui/rta/messagebundle_sk.properties +8 -8
  97. package/src/sap/ui/rta/messagebundle_sl.properties +8 -8
  98. package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
  99. package/src/sap/ui/rta/messagebundle_th.properties +8 -8
  100. package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
  101. package/src/sap/ui/rta/messagebundle_uk.properties +8 -8
  102. package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
  103. package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
  104. package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
  105. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
  106. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
  107. package/src/sap/ui/rta/plugin/Combine.js +1 -2
  108. package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
  109. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
  110. package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
  111. package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
  112. package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
  113. package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
  114. package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
  115. package/src/sap/ui/rta/plugin/Plugin.js +6 -10
  116. package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
  117. package/src/sap/ui/rta/plugin/Remove.js +8 -9
  118. package/src/sap/ui/rta/plugin/Rename.js +9 -9
  119. package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
  120. package/src/sap/ui/rta/plugin/Resize.js +11 -10
  121. package/src/sap/ui/rta/plugin/Selection.js +33 -14
  122. package/src/sap/ui/rta/plugin/Settings.js +11 -11
  123. package/src/sap/ui/rta/plugin/Split.js +1 -2
  124. package/src/sap/ui/rta/plugin/Stretch.js +18 -20
  125. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
  126. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
  128. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
  130. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +7 -6
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +5 -5
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +28 -27
  134. package/src/sap/ui/rta/service/Action.js +3 -4
  135. package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
  136. package/src/sap/ui/rta/service/Outline.js +13 -11
  137. package/src/sap/ui/rta/service/Property.js +3 -4
  138. package/src/sap/ui/rta/service/Receiver.js +1 -1
  139. package/src/sap/ui/rta/service/Selection.js +2 -3
  140. package/src/sap/ui/rta/service/SupportTools.js +2 -3
  141. package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
  142. package/src/sap/ui/rta/toolbar/Adaptation.js +25 -18
  143. package/src/sap/ui/rta/toolbar/Base.js +25 -11
  144. package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
  145. package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
  146. package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
  147. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
  148. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
  149. package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
  150. package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
  151. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
  152. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
  153. package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
  154. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
  155. package/src/sap/ui/rta/util/Animation.js +1 -3
  156. package/src/sap/ui/rta/util/PluginManager.js +1 -3
  157. package/src/sap/ui/rta/util/PopupManager.js +23 -19
  158. package/src/sap/ui/rta/util/ReloadManager.js +4 -4
  159. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  160. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
  161. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
  162. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
  163. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  164. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  165. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +2 -2
  166. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  167. package/src/sap/ui/rta/util/showMessageBox.js +2 -1
  168. package/src/sap/ui/rta/util/validateText.js +1 -1
  169. package/src/sap/ui/rta/util/StylesLoader.js +0 -31
  170. package/src/sap/ui/rta/util/UrlParser.js +0 -51
@@ -35,13 +35,12 @@ 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.117.1
38
+ * @version 1.118.0
39
39
  *
40
40
  * @constructor
41
41
  * @private
42
42
  * @since 1.34
43
43
  * @alias sap.ui.rta.plugin.RTAElementMover
44
- * @experimental Since 1.34. This class is experimental and provides only limited functionality. Also the API might be changed in future.
45
44
  */
46
45
  var RTAElementMover = ElementMover.extend("sap.ui.rta.plugin.RTAElementMover", /** @lends sap.ui.rta.plugin.RTAElementMover.prototype */ {
47
46
  metadata: {
@@ -109,7 +108,7 @@ function(
109
108
  // Direct children of template aggregations should not be movable
110
109
  // because their order is defined based on the underlying data
111
110
  var oElement = oOverlay.getElement();
112
- if (ElementUtil.isElementDirectTemplateChild(oElement)) {
111
+ if (oElement.isDestroyStarted() || ElementUtil.isElementDirectTemplateChild(oElement)) {
113
112
  return Promise.resolve(false);
114
113
  }
115
114
 
@@ -121,11 +120,9 @@ function(
121
120
 
122
121
  return this.isMoveAvailableOnRelevantContainer(oOverlay)
123
122
  .then(function(bValid) {
124
- if (bValid) {
125
- bValid = this.oBasePlugin.hasStableId(oOverlay) &&
123
+ bValid &&= this.oBasePlugin.hasStableId(oOverlay) &&
126
124
  this.oBasePlugin.hasStableId(oParentElementOverlay) &&
127
125
  this.oBasePlugin.hasStableId(oRelevantContainerOverlay);
128
- }
129
126
  return bValid;
130
127
  }.bind(this))
131
128
  .then(function(bValid) {
@@ -29,12 +29,11 @@ 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.117.1
32
+ * @version 1.118.0
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.34
36
36
  * @alias sap.ui.rta.plugin.Remove
37
- * @experimental Since 1.34. This class is experimental and provides only limited functionality. Also the API might be changed in future.
38
37
  */
39
38
  var Remove = Plugin.extend("sap.ui.rta.plugin.Remove", /** @lends sap.ui.rta.plugin.Remove.prototype */{
40
39
  metadata: {
@@ -51,11 +50,12 @@ sap.ui.define([
51
50
  * @param {sap.ui.dt.Overlay} oOverlay overlay object
52
51
  * @override
53
52
  */
54
- Remove.prototype.registerElementOverlay = function(oOverlay) {
53
+ Remove.prototype.registerElementOverlay = function(...aArgs) {
54
+ const [oOverlay] = aArgs;
55
55
  if (this.isEnabled([oOverlay])) {
56
56
  oOverlay.attachBrowserEvent("keydown", this._onKeyDown, this);
57
57
  }
58
- Plugin.prototype.registerElementOverlay.apply(this, arguments);
58
+ Plugin.prototype.registerElementOverlay.apply(this, aArgs);
59
59
  };
60
60
 
61
61
  /**
@@ -160,11 +160,12 @@ sap.ui.define([
160
160
  * @param {sap.ui.dt.Overlay} oOverlay overlay object
161
161
  * @override
162
162
  */
163
- Remove.prototype.deregisterElementOverlay = function(oOverlay) {
163
+ Remove.prototype.deregisterElementOverlay = function(...aArgs) {
164
+ const [oOverlay] = aArgs;
164
165
  if (this.isEnabled([oOverlay])) {
165
166
  oOverlay.detachBrowserEvent("keydown", this._onKeyDown, this);
166
167
  }
167
- Plugin.prototype.deregisterElementOverlay.apply(this, arguments);
168
+ Plugin.prototype.deregisterElementOverlay.apply(this, aArgs);
168
169
  };
169
170
 
170
171
  /**
@@ -298,9 +299,7 @@ sap.ui.define([
298
299
  }).shift();
299
300
  }
300
301
  }
301
- if (!oNextOverlaySelection) {
302
- oNextOverlaySelection = OverlayRegistry.getOverlay(aSelectedOverlays[0].getRelevantContainer());
303
- }
302
+ oNextOverlaySelection ||= OverlayRegistry.getOverlay(aSelectedOverlays[0].getRelevantContainer());
304
303
  return oNextOverlaySelection;
305
304
  };
306
305
 
@@ -28,14 +28,12 @@ sap.ui.define([
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.117.1
31
+ * @version 1.118.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.30
36
36
  * @alias sap.ui.rta.plugin.Rename
37
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be
38
- * changed in future.
39
37
  */
40
38
  var Rename = Plugin.extend("sap.ui.rta.plugin.Rename", /** @lends sap.ui.rta.plugin.Rename.prototype */ {
41
39
  metadata: {
@@ -61,8 +59,8 @@ sap.ui.define([
61
59
  /**
62
60
  * @override
63
61
  */
64
- Rename.prototype.exit = function() {
65
- Plugin.prototype.exit.apply(this, arguments);
62
+ Rename.prototype.exit = function(...aArgs) {
63
+ Plugin.prototype.exit.apply(this, aArgs);
66
64
 
67
65
  this.setBusy(false);
68
66
  RenameHandler._exit.call(this);
@@ -150,10 +148,11 @@ sap.ui.define([
150
148
  /**
151
149
  * @override
152
150
  */
153
- Rename.prototype.registerElementOverlay = function(oOverlay) {
151
+ Rename.prototype.registerElementOverlay = function(...aArgs) {
152
+ const [oOverlay] = aArgs;
154
153
  oOverlay.attachEvent("editableChange", RenameHandler._manageClickEvent, this);
155
154
 
156
- Plugin.prototype.registerElementOverlay.apply(this, arguments);
155
+ Plugin.prototype.registerElementOverlay.apply(this, aArgs);
157
156
  };
158
157
 
159
158
  /**
@@ -168,11 +167,12 @@ sap.ui.define([
168
167
  /**
169
168
  * @override
170
169
  */
171
- Rename.prototype.deregisterElementOverlay = function(oOverlay) {
170
+ Rename.prototype.deregisterElementOverlay = function(...aArgs) {
171
+ const [oOverlay] = aArgs;
172
172
  oOverlay.detachEvent("editableChange", RenameHandler._manageClickEvent, this);
173
173
  oOverlay.detachBrowserEvent("click", RenameHandler._onClick, this);
174
174
 
175
- Plugin.prototype.deregisterElementOverlay.apply(this, arguments);
175
+ Plugin.prototype.deregisterElementOverlay.apply(this, aArgs);
176
176
  };
177
177
 
178
178
  Rename.prototype.createRenameCommand = function(oElementOverlay, sNewText) {
@@ -39,14 +39,12 @@ sap.ui.define([
39
39
  * Provides Rename handling functionality
40
40
  *
41
41
  * @author SAP SE
42
- * @version 1.117.1
42
+ * @version 1.118.0
43
43
  *
44
44
  * @constructor
45
45
  * @private
46
46
  * @since 1.52
47
47
  * @alias sap.ui.rta.plugin.RenameHandler
48
- * @experimental Since 1.52. This class is experimental and provides only limited functionality. Also the API might be
49
- * changed in future.
50
48
  */
51
49
  var RenameHandler = {
52
50
 
@@ -55,7 +53,7 @@ sap.ui.define([
55
53
  /**
56
54
  * @override
57
55
  */
58
- _manageClickEvent: function(vEventOrElement) {
56
+ _manageClickEvent(vEventOrElement) {
59
57
  var oOverlay = vEventOrElement.getSource ? vEventOrElement.getSource() : vEventOrElement;
60
58
  if (oOverlay.isSelected() && this.isRenameAvailable(oOverlay) && this.isRenameEnabled([oOverlay])) {
61
59
  oOverlay.attachBrowserEvent("click", RenameHandler._onClick, this);
@@ -64,7 +62,7 @@ sap.ui.define([
64
62
  }
65
63
  },
66
64
 
67
- _setEditableFieldPosition: function() {
65
+ _setEditableFieldPosition() {
68
66
  if (this._oEditableField) {
69
67
  jQuery(this._oEditableField).offset({left: DOMUtil.getOffset(this._oEditableControlDomRef).left});
70
68
  jQuery(this._oEditableField).offset({top: DOMUtil.getOffset(this._oEditableControlDomRef).top});
@@ -77,7 +75,7 @@ sap.ui.define([
77
75
  * @param {map} mPropertyBag - (required) contains required properties
78
76
  * @public
79
77
  */
80
- startEdit: function(mPropertyBag) {
78
+ startEdit(mPropertyBag) {
81
79
  this.setBusy(true);
82
80
  this._oEditedOverlay = mPropertyBag.overlay;
83
81
 
@@ -150,7 +148,7 @@ sap.ui.define([
150
148
  _oWrapperDomRef.classList.add("sapUiRtaEditableField");
151
149
  _oWrapperDomRef.style.whiteSpace = "nowrap";
152
150
  _oWrapperDomRef.style.overflow = "hidden";
153
- _oWrapperDomRef.style.width = "calc(100% - (" + iWidthDifference + "px))";
151
+ _oWrapperDomRef.style.width = `calc(100% - (${iWidthDifference}px))`;
154
152
  oOverlayForWrapper.getDomRef().append(_oWrapperDomRef);
155
153
  var _oEditableFieldDomRef = document.createElement("div");
156
154
  _oEditableFieldDomRef.setAttribute("contentEditable", "true");
@@ -230,14 +228,15 @@ sap.ui.define([
230
228
  });
231
229
  },
232
230
 
233
- _setDesignTime: function(oDesignTime) {
231
+ _setDesignTime(...aArgs) {
232
+ const [oDesignTime] = aArgs;
234
233
  this._aSelection = [];
235
234
  var oOldDesignTime = this.getDesignTime();
236
235
 
237
236
  if (oOldDesignTime) {
238
237
  oOldDesignTime.getSelectionManager().detachChange(RenameHandler._onDesignTimeSelectionChange, this);
239
238
  }
240
- Plugin.prototype.setDesignTime.apply(this, arguments);
239
+ Plugin.prototype.setDesignTime.apply(this, aArgs);
241
240
 
242
241
  if (oDesignTime) {
243
242
  oDesignTime.getSelectionManager().attachChange(RenameHandler._onDesignTimeSelectionChange, this);
@@ -248,7 +247,7 @@ sap.ui.define([
248
247
  /**
249
248
  * @override
250
249
  */
251
- _onDesignTimeSelectionChange: function(oEvent) {
250
+ _onDesignTimeSelectionChange(oEvent) {
252
251
  var aSelection = oEvent.getParameter("selection");
253
252
 
254
253
  // detach events from previous selection
@@ -263,7 +262,7 @@ sap.ui.define([
263
262
  * @param {sap.ui.base.Event} oEvent - event object
264
263
  * @private
265
264
  */
266
- _stopPropagation: function(oEvent) {
265
+ _stopPropagation(oEvent) {
267
266
  oEvent.stopPropagation();
268
267
  },
269
268
 
@@ -271,7 +270,7 @@ sap.ui.define([
271
270
  * @param {sap.ui.base.Event} oEvent - event object
272
271
  * @private
273
272
  */
274
- _preventDefault: function(oEvent) {
273
+ _preventDefault(oEvent) {
275
274
  oEvent.preventDefault();
276
275
  },
277
276
 
@@ -279,7 +278,7 @@ sap.ui.define([
279
278
  * @param {sap.ui.base.Event} oEvent - event object
280
279
  * @private
281
280
  */
282
- _onEditableFieldFocus: function(oEvent) {
281
+ _onEditableFieldFocus(oEvent) {
283
282
  var el = oEvent.target;
284
283
  var range = document.createRange();
285
284
  range.selectNodeContents(el);
@@ -293,7 +292,7 @@ sap.ui.define([
293
292
  * @param {string} sPluginMethodName - method name of the plugin
294
293
  * @private
295
294
  */
296
- _stopEdit: function(bRestoreFocus, sPluginMethodName) {
295
+ _stopEdit(bRestoreFocus, sPluginMethodName) {
297
296
  var oOverlay;
298
297
  this.setBusy(false);
299
298
  this._oEditableField.removeEventListener("blur", this._oBlurHandler);
@@ -340,11 +339,11 @@ sap.ui.define([
340
339
  });
341
340
  },
342
341
 
343
- _onEditableFieldBlur: function(oEvent) {
342
+ _onEditableFieldBlur(oEvent) {
344
343
  return RenameHandler._handlePostRename.call(this, false, oEvent);
345
344
  },
346
345
 
347
- _handlePostRename: function(bRestoreFocus, oEvent) {
346
+ _handlePostRename(bRestoreFocus, oEvent) {
348
347
  if (!this._bBlurOrKeyDownStarted) {
349
348
  this._oEditedOverlay.removeStyleClass(RenameHandler.errorStyleClass);
350
349
  this._bBlurOrKeyDownStarted = true;
@@ -375,7 +374,7 @@ sap.ui.define([
375
374
  return Promise.resolve();
376
375
  },
377
376
 
378
- _handleInvalidRename: function(sErrorMessage, bRestoreFocus) {
377
+ _handleInvalidRename(sErrorMessage, bRestoreFocus) {
379
378
  return Utils.showMessageBox("error", sErrorMessage, {
380
379
  titleKey: "RENAME_ERROR_TITLE"
381
380
  })
@@ -388,7 +387,7 @@ sap.ui.define([
388
387
  }.bind(this));
389
388
  },
390
389
 
391
- _validateNewText: function() {
390
+ _validateNewText() {
392
391
  var oResponsibleOverlay = this.getResponsibleElementOverlay(this._oEditedOverlay);
393
392
  var oRenameAction = this.getAction(oResponsibleOverlay);
394
393
  var sNewText = RenameHandler._getCurrentEditableFieldText.call(this);
@@ -396,7 +395,7 @@ sap.ui.define([
396
395
  validateText(sNewText, this.getOldValue(), oRenameAction);
397
396
  },
398
397
 
399
- _onEditableFieldKeydown: function(oEvent) {
398
+ _onEditableFieldKeydown(oEvent) {
400
399
  switch (oEvent.keyCode) {
401
400
  case KeyCodes.ENTER:
402
401
  // to prevent context menu from opening when rename is finished
@@ -421,7 +420,7 @@ sap.ui.define([
421
420
  * @returns {string} current editable field text
422
421
  * @private
423
422
  */
424
- _getCurrentEditableFieldText: function() {
423
+ _getCurrentEditableFieldText() {
425
424
  // Rename to empty string should not be possible
426
425
  // to prevent issues with disappearing elements
427
426
  var sText = this._oEditableField ? this._oEditableField.textContent.trim() : "";
@@ -432,7 +431,7 @@ sap.ui.define([
432
431
  * @param {sap.ui.base.Event} oEvent - event object
433
432
  * @private
434
433
  */
435
- _onClick: function(oEvent) {
434
+ _onClick(oEvent) {
436
435
  var oOverlay = sap.ui.getCore().byId(oEvent.currentTarget.id);
437
436
  if (this.isRenameEnabled([oOverlay]) && !oEvent.metaKey && !oEvent.ctrlKey && !oEvent.shiftKey) {
438
437
  this.startEdit(oOverlay);
@@ -440,7 +439,7 @@ sap.ui.define([
440
439
  }
441
440
  },
442
441
 
443
- _exit: function() {
442
+ _exit() {
444
443
  if (this._oEditableControlDomRef) {
445
444
  this.stopEdit(false);
446
445
  }
@@ -27,12 +27,11 @@ sap.ui.define([
27
27
  * @class
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  * @author SAP SE
30
- * @version 1.117.1
30
+ * @version 1.118.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.101
34
34
  * @alias sap.ui.rta.plugin.Resize
35
- * @experimental Since 1.101. This class is experimental and provides only limited functionality. Also the API might be changed in future.
36
35
  */
37
36
  var Resize = Plugin.extend("sap.ui.rta.plugin.Resize", /** @lends sap.ui.rta.plugin.Resize.prototype */ {
38
37
  metadata: {
@@ -189,7 +188,7 @@ sap.ui.define([
189
188
  // Initially set the current size of the element
190
189
  var iNewWidth = getWidth(oOverlay);
191
190
  // Place the middle of the handle on the mouse position
192
- oHandle.style[sBeginDirection] = (iMousePosition - iOverlayBoundary) * iDirectionFactor - iHalfOffsetWidth + "px";
191
+ oHandle.style[sBeginDirection] = `${(iMousePosition - iOverlayBoundary) * iDirectionFactor - iHalfOffsetWidth}px`;
193
192
 
194
193
  this.setDragging(true);
195
194
  oOverlay.focus();
@@ -202,7 +201,7 @@ sap.ui.define([
202
201
  var iHandleExtensionHeight = oAction.getHandleExtensionHeight(oElement);
203
202
  oExtension = document.createElement("div");
204
203
  oExtension.className = HANDLE_EXTENSION_CLASS_NAME;
205
- oExtension.style.height = iHandleExtensionHeight + "px";
204
+ oExtension.style.height = `${iHandleExtensionHeight}px`;
206
205
  oExtension.style["pointer-events"] = "none";
207
206
  }
208
207
 
@@ -218,7 +217,7 @@ sap.ui.define([
218
217
  iNewWidth = this._limitNewWidth(oOverlay, iNewWidth);
219
218
 
220
219
  // The middle of the handle is on the mouse cursor
221
- oHandle.style[sBeginDirection] = iNewWidth - oHandle.offsetWidth + "px";
220
+ oHandle.style[sBeginDirection] = `${iNewWidth - oHandle.offsetWidth}px`;
222
221
  }
223
222
 
224
223
  function onMouseUp() {
@@ -305,7 +304,7 @@ sap.ui.define([
305
304
  var oNewHandle = document.createElement("div");
306
305
  oNewHandle.className = HANDLE_CLASS_NAME;
307
306
  oOverlayDomElement.append(oNewHandle);
308
- oNewHandle.style[sBeginDirection] = oOverlayDomElement.clientWidth - oNewHandle.clientWidth + "px";
307
+ oNewHandle.style[sBeginDirection] = `${oOverlayDomElement.clientWidth - oNewHandle.clientWidth}px`;
309
308
  oNewHandle.style["z-index"] = ZIndexManager.getNextZIndex();
310
309
  oNewHandle.addEventListener("mousedown", this._onHandleMouseDown.bind(this, oOverlay));
311
310
  this.setHandle(oNewHandle);
@@ -392,7 +391,8 @@ sap.ui.define([
392
391
  *
393
392
  * @override
394
393
  */
395
- Resize.prototype.registerElementOverlay = function(oOverlay) {
394
+ Resize.prototype.registerElementOverlay = function(...aArgs) {
395
+ const [oOverlay] = aArgs;
396
396
  if (this.isEnabled([oOverlay])) {
397
397
  oOverlay.attachBrowserEvent("mousemove", this._onOverlayMouseMove, this);
398
398
  oOverlay.attachBrowserEvent("mouseleave", this._onOverlayMouseLeave, this);
@@ -401,7 +401,7 @@ sap.ui.define([
401
401
  oOverlay.attachEvent("selectionChange", this._onOverlaySelectionChange, this);
402
402
  oOverlay.attachEvent("geometryChanged", this._onOverlayGeometryChanged, this);
403
403
  }
404
- Plugin.prototype.registerElementOverlay.apply(this, arguments);
404
+ Plugin.prototype.registerElementOverlay.apply(this, aArgs);
405
405
  };
406
406
 
407
407
  /**
@@ -410,14 +410,15 @@ sap.ui.define([
410
410
  *
411
411
  * @override
412
412
  */
413
- Resize.prototype.deregisterElementOverlay = function(oOverlay) {
413
+ Resize.prototype.deregisterElementOverlay = function(...aArgs) {
414
+ const [oOverlay] = aArgs;
414
415
  oOverlay.detachBrowserEvent("mousemove", this._onOverlayMouseMove, this);
415
416
  oOverlay.detachBrowserEvent("mouseleave", this._onOverlayMouseLeave, this);
416
417
  oOverlay.detachBrowserEvent("keydown", this._onOverlayKeyDown, this);
417
418
  oOverlay.detachBrowserEvent("focus", this._onOverlayFocus, this);
418
419
  oOverlay.detachEvent("selectionChange", this._onOverlaySelectionChange, this);
419
420
  oOverlay.detachEvent("geometryChanged", this._onOverlayGeometryChanged, this);
420
- Plugin.prototype.deregisterElementOverlay.apply(this, arguments);
421
+ Plugin.prototype.deregisterElementOverlay.apply(this, aArgs);
421
422
  };
422
423
 
423
424
  /**
@@ -5,20 +5,24 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/rta/plugin/Plugin",
9
- "sap/ui/rta/Utils",
8
+ "sap/base/util/restricted/_intersection",
9
+ "sap/m/InstanceManager",
10
+ "sap/ui/dt/DOMUtil",
10
11
  "sap/ui/dt/OverlayRegistry",
12
+ "sap/ui/dt/OverlayUtil",
11
13
  "sap/ui/events/KeyCodes",
12
- "sap/base/util/restricted/_intersection",
13
- "sap/m/InstanceManager"
14
+ "sap/ui/rta/plugin/Plugin",
15
+ "sap/ui/rta/Utils"
14
16
  ],
15
17
  function(
16
- Plugin,
17
- Utils,
18
+ _intersection,
19
+ InstanceManager,
20
+ DOMUtil,
18
21
  OverlayRegistry,
22
+ OverlayUtil,
19
23
  KeyCodes,
20
- _intersection,
21
- InstanceManager
24
+ Plugin,
25
+ Utils
22
26
  ) {
23
27
  "use strict";
24
28
 
@@ -30,12 +34,11 @@ function(
30
34
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
31
35
  * @extends sap.ui.rta.plugin.Plugin
32
36
  * @author SAP SE
33
- * @version 1.117.1
37
+ * @version 1.118.0
34
38
  * @constructor
35
39
  * @private
36
40
  * @since 1.34
37
41
  * @alias sap.ui.rta.plugin.Selection
38
- * @experimental Since 1.34. This class is experimental and provides only limited functionality. Also the API might be changed in future.
39
42
  */
40
43
  var Selection = Plugin.extend("sap.ui.rta.plugin.Selection", {
41
44
  metadata: {
@@ -95,9 +98,23 @@ function(
95
98
  });
96
99
  }
97
100
 
98
- Selection.prototype.init = function() {
101
+ // If a parent overlay is movable it should not be draggable by a non-movable child
102
+ function setOrResetFirstParentMovable(oOverlay, bSet) {
103
+ if (bSet) {
104
+ const oFirstMovableParentOverlay = OverlayUtil.getFirstMovableParentOverlay(oOverlay);
105
+ if (oFirstMovableParentOverlay) {
106
+ oOverlay._firstMovableParentOverlay = oFirstMovableParentOverlay;
107
+ oFirstMovableParentOverlay.setMovable(false);
108
+ }
109
+ } else if (oOverlay._firstMovableParentOverlay) {
110
+ oOverlay._firstMovableParentOverlay.setMovable(true);
111
+ delete oOverlay._firstMovableParentOverlay;
112
+ }
113
+ }
114
+
115
+ Selection.prototype.init = function(...aArgs) {
99
116
  this._multiSelectionValidator = this._multiSelectionValidator.bind(this);
100
- Plugin.prototype.init.apply(this, arguments);
117
+ Plugin.prototype.init.apply(this, aArgs);
101
118
  };
102
119
 
103
120
  /**
@@ -325,6 +342,7 @@ function(
325
342
  return;
326
343
  }
327
344
  if (oOverlay.isSelectable()) {
345
+ setOrResetFirstParentMovable(oOverlay, true);
328
346
  if (oOverlay !== this._oHoverTarget) {
329
347
  this._removePreviousHover();
330
348
  this._oHoverTarget = oOverlay;
@@ -349,6 +367,7 @@ function(
349
367
  return;
350
368
  }
351
369
  if (oOverlay.isSelectable()) {
370
+ setOrResetFirstParentMovable(oOverlay);
352
371
  this._removePreviousHover();
353
372
  preventEventDefaultAndPropagation(oEvent);
354
373
  }
@@ -368,14 +387,14 @@ function(
368
387
  /**
369
388
  * @override
370
389
  */
371
- Selection.prototype.setDesignTime = function() {
390
+ Selection.prototype.setDesignTime = function(...aArgs) {
372
391
  // detach from listener from old DesignTime instance
373
392
  if (this.getDesignTime()) {
374
393
  this.getDesignTime().getSelectionManager().removeValidator(this._multiSelectionValidator);
375
394
  }
376
395
 
377
396
  // set new DesignTime instance in parent class
378
- Plugin.prototype.setDesignTime.apply(this, arguments);
397
+ Plugin.prototype.setDesignTime.apply(this, aArgs);
379
398
 
380
399
  // attach listener back to the new DesignTime instance
381
400
  if (this.getDesignTime()) {
@@ -25,12 +25,11 @@ 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.117.1
28
+ * @version 1.118.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.44
32
32
  * @alias sap.ui.rta.plugin.Settings
33
- * @experimental Since 1.44. This class is experimental and provides only limited functionality. Also the API might be changed in future.
34
33
  */
35
34
  var Settings = Plugin.extend("sap.ui.rta.plugin.Settings", /** @lends sap.ui.rta.plugin.Settings.prototype */ {
36
35
  metadata: {
@@ -185,6 +184,7 @@ sap.ui.define([
185
184
  } else if (mChangeSpecificData.appDescriptorChangeType) {
186
185
  return this._handleAppDescriptorChangeCommand(mChange, oElement, oCompositeCommand);
187
186
  }
187
+ return undefined;
188
188
  }, this);
189
189
  }.bind(this))
190
190
 
@@ -211,15 +211,13 @@ sap.ui.define([
211
211
  * @return {Promise} Returns promise resolving with the creation of the commands
212
212
  */
213
213
  Settings.prototype.handler = function(aElementOverlays, mPropertyBag, oSettingsAction) {
214
- mPropertyBag = mPropertyBag || {};
214
+ mPropertyBag ||= {};
215
215
  var oElement = aElementOverlays[0].getElement();
216
- var fnHandler = mPropertyBag.fnHandler;
216
+ var {fnHandler} = mPropertyBag;
217
217
 
218
+ fnHandler ||= aElementOverlays[0].getDesignTimeMetadata().getAction("settings").handler;
218
219
  if (!fnHandler) {
219
- fnHandler = aElementOverlays[0].getDesignTimeMetadata().getAction("settings").handler;
220
- if (!fnHandler) {
221
- throw new Error("Handler not found for settings action");
222
- }
220
+ throw new Error("Handler not found for settings action");
223
221
  }
224
222
  mPropertyBag.getUnsavedChanges = this._getUnsavedChanges.bind(this);
225
223
  mPropertyBag.styleClass = Utils.getRtaStyleClassName();
@@ -230,6 +228,7 @@ sap.ui.define([
230
228
  if (aChanges.length > 0) {
231
229
  return this._handleCompositeCommand(aElementOverlays, oElement, aChanges, oSettingsAction);
232
230
  }
231
+ return undefined;
233
232
  }.bind(this))
234
233
 
235
234
  .catch(function(vError) {
@@ -285,14 +284,14 @@ sap.ui.define([
285
284
  || this.isEnabled([oElementOverlay])
286
285
  ),
287
286
  handler: function(fnHandler, aElementOverlays, mPropertyBag) {
288
- mPropertyBag = mPropertyBag || {};
287
+ mPropertyBag ||= {};
289
288
  mPropertyBag.fnHandler = fnHandler;
290
289
  return this.handler(aElementOverlays, mPropertyBag, oSettingsAction);
291
290
  }.bind(this, oSettingsAction.handler),
292
291
  submenu: formatSubMenuItems(oSettingsAction.submenu)
293
292
  });
294
293
  } else {
295
- BaseLog.warning("Handler not found for settings action '" + sSettingsAction + "' or relevant container has no stable id");
294
+ BaseLog.warning(`Handler not found for settings action '${sSettingsAction}' or relevant container has no stable id`);
296
295
  }
297
296
  }, this);
298
297
  }
@@ -304,13 +303,14 @@ sap.ui.define([
304
303
  if (aSubMenu) {
305
304
  return aSubMenu.map(function(oSubMenu, iIndex) {
306
305
  return {
307
- id: oSubMenu.key || sPluginId + "_SUB_" + iIndex,
306
+ id: oSubMenu.key || `${sPluginId}_SUB_${iIndex}`,
308
307
  icon: oSubMenu.icon || "blank",
309
308
  text: oSubMenu.name || "",
310
309
  enabled: oSubMenu.hasOwnProperty("enabled") ? oSubMenu.enabled : true
311
310
  };
312
311
  });
313
312
  }
313
+ return undefined;
314
314
  }
315
315
 
316
316
  function getActionIcon(oSettingsAction) {
@@ -23,12 +23,11 @@ sap.ui.define([
23
23
  * @class
24
24
  * @extends sap.ui.rta.plugin.Plugin
25
25
  * @author SAP SE
26
- * @version 1.117.1
26
+ * @version 1.118.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
30
30
  * @alias sap.ui.rta.plugin.Split
31
- * @experimental Since 1.46. This class is experimental and provides only limited functionality. Also the API might be changed in future.
32
31
  */
33
32
  var Split = Plugin.extend("sap.ui.rta.plugin.Split", /** @lends sap.ui.rta.plugin.Split.prototype */ {
34
33
  metadata: {