@openui5/sap.ui.rta 1.135.0 → 1.136.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/REUSE.toml +649 -0
  2. package/THIRDPARTY.txt +22 -22
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +2 -2
  5. package/src/sap/ui/rta/Client.js +2 -2
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +92 -19
  7. package/src/sap/ui/rta/Utils.js +19 -2
  8. package/src/sap/ui/rta/api/startAdaptation.js +1 -1
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
  14. package/src/sap/ui/rta/appVariant/Feature.js +1 -1
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
  16. package/src/sap/ui/rta/appVariant/Utils.js +8 -15
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +30 -44
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  21. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  22. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  23. package/src/sap/ui/rta/command/AddXML.js +2 -2
  24. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  25. package/src/sap/ui/rta/command/AnnotationCommand.js +2 -2
  26. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  27. package/src/sap/ui/rta/command/BindProperty.js +2 -2
  28. package/src/sap/ui/rta/command/Combine.js +2 -2
  29. package/src/sap/ui/rta/command/CommandFactory.js +2 -2
  30. package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
  31. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  32. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  33. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
  35. package/src/sap/ui/rta/command/ControlVariantSwitch.js +2 -2
  36. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  37. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  38. package/src/sap/ui/rta/command/ExtendControllerCommand.js +4 -3
  39. package/src/sap/ui/rta/command/FlexCommand.js +2 -2
  40. package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
  41. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  42. package/src/sap/ui/rta/command/ManifestCommand.js +2 -2
  43. package/src/sap/ui/rta/command/Move.js +2 -2
  44. package/src/sap/ui/rta/command/Property.js +2 -2
  45. package/src/sap/ui/rta/command/Remove.js +2 -2
  46. package/src/sap/ui/rta/command/Rename.js +2 -2
  47. package/src/sap/ui/rta/command/Resize.js +2 -2
  48. package/src/sap/ui/rta/command/Reveal.js +2 -2
  49. package/src/sap/ui/rta/command/Settings.js +2 -2
  50. package/src/sap/ui/rta/command/Split.js +2 -2
  51. package/src/sap/ui/rta/command/Stack.js +20 -5
  52. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
  53. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  54. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  55. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
  56. package/src/sap/ui/rta/command/manifest/AddLibrary.js +2 -2
  57. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  58. package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
  59. package/src/sap/ui/rta/library.js +3 -3
  60. package/src/sap/ui/rta/messagebundle.properties +170 -9
  61. package/src/sap/ui/rta/messagebundle_ar.properties +104 -6
  62. package/src/sap/ui/rta/messagebundle_bg.properties +104 -6
  63. package/src/sap/ui/rta/messagebundle_ca.properties +107 -9
  64. package/src/sap/ui/rta/messagebundle_cnr.properties +105 -7
  65. package/src/sap/ui/rta/messagebundle_cs.properties +102 -4
  66. package/src/sap/ui/rta/messagebundle_cy.properties +104 -6
  67. package/src/sap/ui/rta/messagebundle_da.properties +103 -5
  68. package/src/sap/ui/rta/messagebundle_de.properties +113 -15
  69. package/src/sap/ui/rta/messagebundle_el.properties +101 -3
  70. package/src/sap/ui/rta/messagebundle_en.properties +104 -6
  71. package/src/sap/ui/rta/messagebundle_en_GB.properties +104 -6
  72. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +2 -0
  73. package/src/sap/ui/rta/messagebundle_es.properties +108 -10
  74. package/src/sap/ui/rta/messagebundle_es_MX.properties +112 -14
  75. package/src/sap/ui/rta/messagebundle_et.properties +102 -4
  76. package/src/sap/ui/rta/messagebundle_fi.properties +105 -7
  77. package/src/sap/ui/rta/messagebundle_fr.properties +113 -15
  78. package/src/sap/ui/rta/messagebundle_fr_CA.properties +105 -7
  79. package/src/sap/ui/rta/messagebundle_hi.properties +104 -6
  80. package/src/sap/ui/rta/messagebundle_hr.properties +114 -16
  81. package/src/sap/ui/rta/messagebundle_hu.properties +103 -5
  82. package/src/sap/ui/rta/messagebundle_id.properties +112 -14
  83. package/src/sap/ui/rta/messagebundle_it.properties +102 -4
  84. package/src/sap/ui/rta/messagebundle_iw.properties +104 -6
  85. package/src/sap/ui/rta/messagebundle_ja.properties +116 -18
  86. package/src/sap/ui/rta/messagebundle_kk.properties +103 -5
  87. package/src/sap/ui/rta/messagebundle_ko.properties +104 -6
  88. package/src/sap/ui/rta/messagebundle_lt.properties +104 -6
  89. package/src/sap/ui/rta/messagebundle_lv.properties +103 -5
  90. package/src/sap/ui/rta/messagebundle_mk.properties +107 -9
  91. package/src/sap/ui/rta/messagebundle_ms.properties +114 -16
  92. package/src/sap/ui/rta/messagebundle_nl.properties +103 -5
  93. package/src/sap/ui/rta/messagebundle_no.properties +107 -9
  94. package/src/sap/ui/rta/messagebundle_pl.properties +103 -5
  95. package/src/sap/ui/rta/messagebundle_pt.properties +102 -4
  96. package/src/sap/ui/rta/messagebundle_pt_PT.properties +102 -4
  97. package/src/sap/ui/rta/messagebundle_ro.properties +102 -4
  98. package/src/sap/ui/rta/messagebundle_ru.properties +106 -8
  99. package/src/sap/ui/rta/messagebundle_sh.properties +105 -7
  100. package/src/sap/ui/rta/messagebundle_sk.properties +102 -4
  101. package/src/sap/ui/rta/messagebundle_sl.properties +102 -4
  102. package/src/sap/ui/rta/messagebundle_sr.properties +105 -7
  103. package/src/sap/ui/rta/messagebundle_sv.properties +103 -5
  104. package/src/sap/ui/rta/messagebundle_th.properties +103 -5
  105. package/src/sap/ui/rta/messagebundle_tr.properties +102 -4
  106. package/src/sap/ui/rta/messagebundle_uk.properties +104 -6
  107. package/src/sap/ui/rta/messagebundle_vi.properties +104 -6
  108. package/src/sap/ui/rta/messagebundle_zh_CN.properties +103 -5
  109. package/src/sap/ui/rta/messagebundle_zh_TW.properties +104 -6
  110. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  111. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +54 -32
  112. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
  113. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  114. package/src/sap/ui/rta/plugin/CompVariant.js +114 -114
  115. package/src/sap/ui/rta/plugin/ControlVariant.js +37 -54
  116. package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
  117. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  118. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  119. package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +62 -38
  120. package/src/sap/ui/rta/plugin/LocalReset.js +4 -3
  121. package/src/sap/ui/rta/plugin/Plugin.js +30 -12
  122. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  123. package/src/sap/ui/rta/plugin/Remove.js +2 -2
  124. package/src/sap/ui/rta/plugin/Resize.js +2 -2
  125. package/src/sap/ui/rta/plugin/Selection.js +2 -2
  126. package/src/sap/ui/rta/plugin/Settings.js +5 -2
  127. package/src/sap/ui/rta/plugin/Split.js +2 -2
  128. package/src/sap/ui/rta/plugin/Stretch.js +2 -2
  129. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -2
  130. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
  131. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -1
  132. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +2 -2
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
  134. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
  135. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +4 -4
  136. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +26 -13
  137. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +30 -31
  138. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +13 -7
  139. package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +1 -1
  140. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +8 -2
  141. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  142. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
  143. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  144. package/src/sap/ui/rta/plugin/{Rename.js → rename/Rename.js} +29 -67
  145. package/src/sap/ui/rta/plugin/rename/RenameDialog.fragment.xml +63 -0
  146. package/src/sap/ui/rta/plugin/rename/RenameDialog.js +140 -0
  147. package/src/sap/ui/rta/service/Action.js +2 -2
  148. package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
  149. package/src/sap/ui/rta/service/Outline.js +2 -2
  150. package/src/sap/ui/rta/service/Property.js +2 -2
  151. package/src/sap/ui/rta/service/Receiver.js +1 -1
  152. package/src/sap/ui/rta/service/Selection.js +2 -2
  153. package/src/sap/ui/rta/service/SupportTools.js +2 -2
  154. package/src/sap/ui/rta/service/index.js +1 -1
  155. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  156. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  157. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +6 -0
  158. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +1 -6
  159. package/src/sap/ui/rta/toolbar/Adaptation.js +12 -3
  160. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  161. package/src/sap/ui/rta/toolbar/Base.js +2 -2
  162. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  163. package/src/sap/ui/rta/toolbar/Fiori.js +20 -10
  164. package/src/sap/ui/rta/toolbar/FioriLike.js +7 -5
  165. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
  166. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  167. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +1 -1
  168. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -2
  169. package/src/sap/ui/rta/toolbar/translation/Translation.js +2 -2
  170. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
  171. package/src/sap/ui/rta/util/Animation.js +1 -1
  172. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  173. package/src/sap/ui/rta/util/PluginManager.js +8 -6
  174. package/src/sap/ui/rta/util/PopupManager.js +2 -2
  175. package/src/sap/ui/rta/util/ReloadManager.js +2 -2
  176. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  177. package/src/sap/ui/rta/util/ServiceManager.js +2 -2
  178. package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
  179. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
  180. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -2
  181. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
  182. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
  183. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +3 -3
  184. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  185. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  186. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  187. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
  188. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
  189. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  190. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
  191. package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +242 -0
  192. package/src/sap/ui/rta/util/guidedTour/TourMarker.fragment.xml +50 -0
  193. package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +205 -0
  194. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  195. package/src/sap/ui/rta/util/isReuseComponent.js +1 -1
  196. package/src/sap/ui/rta/util/showMessageBox.js +1 -1
  197. package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
  198. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  199. package/src/sap/ui/rta/util/validateText.js +1 -1
  200. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +8 -4
  201. package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +1 -1
  202. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
  203. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
  204. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +85 -1
  205. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ChangeLabelsAction.png +0 -0
  206. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/DisplayBehavior.png +0 -0
  207. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ExtendedActions.png +0 -0
  208. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/GuidedTour.png +0 -0
  209. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ReloadButtonToolbar.png +0 -0
  210. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/RenameDialog.png +0 -0
  211. package/ui5.yaml +1 -1
  212. package/.reuse/dep5 +0 -471
  213. package/src/sap/ui/rta/plugin/RenameHandler.js +0 -477
@@ -1,31 +1,31 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/m/MessageBox",
9
8
  "sap/base/util/restricted/_omit",
10
9
  "sap/base/util/isEmptyObject",
10
+ "sap/m/MessageBox",
11
11
  "sap/ui/core/Lib",
12
12
  "sap/ui/dt/OverlayRegistry",
13
13
  "sap/ui/dt/Util",
14
+ "sap/ui/fl/write/api/ContextSharingAPI",
15
+ "sap/ui/rta/plugin/rename/RenameDialog",
14
16
  "sap/ui/rta/plugin/Plugin",
15
- "sap/ui/rta/plugin/RenameHandler",
16
- "sap/ui/rta/Utils",
17
- "sap/ui/fl/write/api/ContextSharingAPI"
17
+ "sap/ui/rta/Utils"
18
18
  ], function(
19
- MessageBox,
20
19
  _omit,
21
20
  isEmptyObject,
21
+ MessageBox,
22
22
  Lib,
23
23
  OverlayRegistry,
24
24
  DtUtil,
25
+ ContextSharingAPI,
26
+ RenameDialog,
25
27
  Plugin,
26
- RenameHandler,
27
- Utils,
28
- ContextSharingAPI
28
+ Utils
29
29
  ) {
30
30
  "use strict";
31
31
 
@@ -88,18 +88,34 @@ sap.ui.define([
88
88
  return oOverlay.getElement().getAllVariants();
89
89
  }
90
90
 
91
+ CompVariant.prototype.init = function(...aArgs) {
92
+ Plugin.prototype.init.apply(this, aArgs);
93
+ this._oDialog = new RenameDialog();
94
+ };
95
+
91
96
  // ------ rename ------
92
- function renameVariant(aOverlays) {
93
- this.startEdit(aOverlays[0]);
97
+ async function renameVariant(aOverlays) {
98
+ const [oOverlay] = aOverlays;
99
+ const sVariantId = oOverlay.getElement().getPresentVariantId();
100
+ const vDomRef = oOverlay.getDesignTimeMetadata().getData().variantRenameDomRef;
101
+ const sNewText = await this._oDialog.openDialogAndHandleRename({
102
+ overlay: oOverlay,
103
+ domRef: vDomRef,
104
+ action: this.getAction(oOverlay)
105
+ });
106
+ if (!sNewText) {
107
+ return;
108
+ }
109
+ const mPropertyBag = {
110
+ newVariantProperties: {
111
+ [sVariantId]: {
112
+ name: sNewText
113
+ }
114
+ }
115
+ };
116
+ createCommandAndFireEvent.call(this, oOverlay, ["compVariantUpdate"], mPropertyBag);
94
117
  }
95
118
 
96
- /**
97
- * @override
98
- */
99
- CompVariant.prototype.setDesignTime = function(oDesignTime) {
100
- RenameHandler._setDesignTime.call(this, oDesignTime);
101
- };
102
-
103
119
  /**
104
120
  * Checks if variant rename is available for the overlay.
105
121
  *
@@ -130,32 +146,6 @@ sap.ui.define([
130
146
  return this.isRenameAvailable(aElementOverlays[0]);
131
147
  };
132
148
 
133
- CompVariant.prototype.startEdit = function(oOverlay) {
134
- var vDomRef = oOverlay.getDesignTimeMetadata().getData().variantRenameDomRef;
135
- RenameHandler.startEdit.call(this, {
136
- overlay: oOverlay,
137
- domRef: vDomRef,
138
- pluginMethodName: "plugin.CompVariant.startEdit"
139
- });
140
- };
141
-
142
- CompVariant.prototype.stopEdit = function(bRestoreFocus) {
143
- RenameHandler._stopEdit.call(this, bRestoreFocus, "plugin.CompVariant.stopEdit");
144
- };
145
-
146
- CompVariant.prototype._emitLabelChangeEvent = function() {
147
- var oOverlay = this._oEditedOverlay;
148
- var sVariantId = oOverlay.getElement().getPresentVariantId();
149
- var sText = RenameHandler._getCurrentEditableFieldText.call(this);
150
- var mPropertyBag = {
151
- newVariantProperties: {}
152
- };
153
- mPropertyBag.newVariantProperties[sVariantId] = {
154
- name: sText
155
- };
156
- createCommandAndFireEvent.call(this, oOverlay, ["compVariantUpdate"], mPropertyBag);
157
- };
158
-
159
149
  // ------ configure ------
160
150
  function configureVariants(aOverlays) {
161
151
  var oVariantManagementControl = aOverlays[0].getElement();
@@ -314,11 +304,11 @@ sap.ui.define([
314
304
  }
315
305
  }
316
306
 
317
- function changeContent(aOverlays) {
307
+ function changeContent(oAction, aOverlays) {
318
308
  var oLibraryBundle = Lib.getResourceBundleFor("sap.ui.rta");
319
309
  var oElementOverlay = aOverlays[0];
320
310
  var oControl = oElementOverlay.getElement();
321
- var oAction = this.getAction(oElementOverlay);
311
+ oAction = oAction.action || oAction;
322
312
  var oVariantManagementControl = oControl.getVariantManagement();
323
313
  // the modified flag might be changed before the dialog is closed, so it has to be saved here already
324
314
  var bIsModified = oVariantManagementControl.getModified();
@@ -359,85 +349,89 @@ sap.ui.define([
359
349
  CompVariant.prototype.getMenuItems = function(aElementOverlays) {
360
350
  var oElementOverlay = aElementOverlays[0];
361
351
  var oVariantManagementControl = oElementOverlay.getElement();
352
+ const oAction = this.getAction(oElementOverlay);
362
353
  var aMenuItems = [];
363
354
  if (this.isAvailable([oElementOverlay])) {
364
- if (this.getAction(oElementOverlay).changeType === "variantContent") {
365
- aMenuItems.push({
366
- id: "CTX_COMP_VARIANT_CONTENT",
367
- text: this.getActionText(oElementOverlay, this.getAction(oElementOverlay)),
368
- handler: changeContent.bind(this),
369
- enabled: true,
370
- rank: this.getRank("CTX_COMP_VARIANT_CONTENT"),
371
- icon: "sap-icon://key-user-settings"
372
- });
373
- } else {
374
- var sLayer = this.getCommandFactory().getFlexSettings().layer;
375
- var oLibraryBundle = Lib.getResourceBundleFor("sap.ui.rta");
376
- var aVariants = getAllVariants(oElementOverlay);
377
- var oCurrentVariant = aVariants.find(function(oVariant) {
378
- return oVariant.getVariantId() === oVariantManagementControl.getPresentVariantId();
379
- });
380
-
381
- if (oCurrentVariant.isRenameEnabled(sLayer)) {
355
+ if (oAction) {
356
+ if (oAction.changeType === "variantContent") {
382
357
  aMenuItems.push({
383
- id: "CTX_COMP_VARIANT_RENAME",
384
- text: oLibraryBundle.getText("CTX_RENAME"),
385
- handler: renameVariant.bind(this),
358
+ id: "CTX_COMP_VARIANT_CONTENT",
359
+ additionalInfo: this._getAdditionalInfo(oElementOverlay, oAction),
360
+ text: this.getActionText(oElementOverlay, oAction),
361
+ handler: changeContent.bind(this, oAction),
386
362
  enabled: true,
387
- rank: this.getRank("CTX_COMP_VARIANT_RENAME"),
388
- icon: "sap-icon://edit"
363
+ rank: this.getRank("CTX_COMP_VARIANT_CONTENT"),
364
+ icon: "sap-icon://key-user-settings"
365
+ });
366
+ } else {
367
+ var sLayer = this.getCommandFactory().getFlexSettings().layer;
368
+ var oLibraryBundle = Lib.getResourceBundleFor("sap.ui.rta");
369
+ var aVariants = getAllVariants(oElementOverlay);
370
+ var oCurrentVariant = aVariants.find(function(oVariant) {
371
+ return oVariant.getVariantId() === oVariantManagementControl.getPresentVariantId();
389
372
  });
390
- }
391
373
 
392
- if (oCurrentVariant.isEditEnabled(sLayer)) {
374
+ if (oCurrentVariant.isRenameEnabled(sLayer)) {
375
+ aMenuItems.push({
376
+ id: "CTX_COMP_VARIANT_RENAME",
377
+ text: oLibraryBundle.getText("CTX_RENAME"),
378
+ handler: renameVariant.bind(this),
379
+ enabled: true,
380
+ rank: this.getRank("CTX_COMP_VARIANT_RENAME"),
381
+ icon: "sap-icon://edit"
382
+ });
383
+ }
384
+
385
+ if (oCurrentVariant.isEditEnabled(sLayer)) {
386
+ aMenuItems.push({
387
+ id: "CTX_COMP_VARIANT_SAVE",
388
+ text: oLibraryBundle.getText("CTX_VARIANT_SAVE"),
389
+ handler: saveVariant.bind(this),
390
+ enabled: isSaveEnabled,
391
+ rank: this.getRank("CTX_COMP_VARIANT_SAVE"),
392
+ icon: "sap-icon://save"
393
+ });
394
+ }
395
+
393
396
  aMenuItems.push({
394
- id: "CTX_COMP_VARIANT_SAVE",
395
- text: oLibraryBundle.getText("CTX_VARIANT_SAVE"),
396
- handler: saveVariant.bind(this),
397
- enabled: isSaveEnabled,
398
- rank: this.getRank("CTX_COMP_VARIANT_SAVE"),
399
- icon: "sap-icon://save"
397
+ id: "CTX_COMP_VARIANT_SAVE_AS",
398
+ text: oLibraryBundle.getText("CTX_VARIANT_SAVEAS"),
399
+ handler: saveAsNewVariant.bind(this),
400
+ enabled: true,
401
+ rank: this.getRank("CTX_COMP_VARIANT_SAVE_AS"),
402
+ icon: "sap-icon://duplicate"
400
403
  });
401
- }
402
404
 
403
- aMenuItems.push({
404
- id: "CTX_COMP_VARIANT_SAVE_AS",
405
- text: oLibraryBundle.getText("CTX_VARIANT_SAVEAS"),
406
- handler: saveAsNewVariant.bind(this),
407
- enabled: true,
408
- rank: this.getRank("CTX_COMP_VARIANT_SAVE_AS"),
409
- icon: "sap-icon://duplicate"
410
- });
411
-
412
- aMenuItems.push({
413
- id: "CTX_COMP_VARIANT_MANAGE",
414
- text: oLibraryBundle.getText("CTX_VARIANT_MANAGE"),
415
- handler: configureVariants.bind(this),
416
- enabled: true,
417
- rank: this.getRank("CTX_COMP_VARIANT_MANAGE"),
418
- icon: "sap-icon://action-settings"
419
- });
405
+ aMenuItems.push({
406
+ id: "CTX_COMP_VARIANT_MANAGE",
407
+ text: oLibraryBundle.getText("CTX_VARIANT_MANAGE"),
408
+ handler: configureVariants.bind(this),
409
+ enabled: true,
410
+ rank: this.getRank("CTX_COMP_VARIANT_MANAGE"),
411
+ icon: "sap-icon://action-settings"
412
+ });
420
413
 
421
- var aSubmenuItems = aVariants.map(function(oVariant) {
422
- var bCurrentItem = oVariantManagementControl.getPresentVariantId() === oVariant.getVariantId();
423
- var oItem = {
424
- id: oVariant.getVariantId(),
425
- text: oVariant.getText("variantName"),
426
- icon: bCurrentItem ? "sap-icon://accept" : "blank",
427
- enabled: !bCurrentItem
428
- };
429
- return oItem;
430
- });
414
+ var aSubmenuItems = aVariants.map(function(oVariant) {
415
+ var bCurrentItem = oVariantManagementControl.getPresentVariantId() === oVariant.getVariantId();
416
+ var oItem = {
417
+ id: oVariant.getVariantId(),
418
+ text: oVariant.getText("variantName"),
419
+ icon: bCurrentItem ? "sap-icon://accept" : "blank",
420
+ enabled: !bCurrentItem
421
+ };
422
+ return oItem;
423
+ });
431
424
 
432
- aMenuItems.push({
433
- id: "CTX_COMP_VARIANT_SWITCH",
434
- text: oLibraryBundle.getText("CTX_VARIANT_SWITCH"),
435
- handler: switchVariant.bind(this),
436
- enabled: isSwitchEnabled,
437
- submenu: aSubmenuItems,
438
- rank: this.getRank("CTX_COMP_VARIANT_SWITCH"),
439
- icon: "sap-icon://switch-views"
440
- });
425
+ aMenuItems.push({
426
+ id: "CTX_COMP_VARIANT_SWITCH",
427
+ text: oLibraryBundle.getText("CTX_VARIANT_SWITCH"),
428
+ handler: switchVariant.bind(this),
429
+ enabled: isSwitchEnabled,
430
+ submenu: aSubmenuItems,
431
+ rank: this.getRank("CTX_COMP_VARIANT_SWITCH"),
432
+ icon: "sap-icon://switch-views"
433
+ });
434
+ }
441
435
  }
442
436
  }
443
437
 
@@ -448,5 +442,11 @@ sap.ui.define([
448
442
  return "compVariant";
449
443
  };
450
444
 
445
+ CompVariant.prototype.destroy = function(...args) {
446
+ Plugin.prototype.destroy.apply(this, args);
447
+ this._oDialog.destroy();
448
+ delete this._oDialog;
449
+ };
450
+
451
451
  return CompVariant;
452
452
  });
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -20,8 +20,8 @@ sap.ui.define([
20
20
  "sap/ui/fl/write/api/ContextSharingAPI",
21
21
  "sap/ui/fl/Layer",
22
22
  "sap/ui/fl/Utils",
23
+ "sap/ui/rta/plugin/rename/RenameDialog",
23
24
  "sap/ui/rta/plugin/Plugin",
24
- "sap/ui/rta/plugin/RenameHandler",
25
25
  "sap/ui/rta/Utils"
26
26
  ], function(
27
27
  Log,
@@ -39,8 +39,8 @@ sap.ui.define([
39
39
  ContextSharingAPI,
40
40
  Layer,
41
41
  flUtils,
42
+ RenameDialog,
42
43
  Plugin,
43
- RenameHandler,
44
44
  Utils
45
45
  ) {
46
46
  "use strict";
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @class The ControlVariant allows propagation of variantManagement key
54
54
  * @extends sap.ui.rta.plugin.Plugin
55
55
  * @author SAP SE
56
- * @version 1.135.0
56
+ * @version 1.136.1
57
57
  * @constructor
58
58
  * @private
59
59
  * @since 1.50
@@ -106,6 +106,11 @@ sap.ui.define([
106
106
  }, oDesignTimeMetadata);
107
107
  }
108
108
 
109
+ ControlVariant.prototype.init = function(...aArgs) {
110
+ Plugin.prototype.init.apply(this, aArgs);
111
+ this._oDialog = new RenameDialog();
112
+ };
113
+
109
114
  /**
110
115
  * Registers an overlay.
111
116
  *
@@ -158,14 +163,12 @@ sap.ui.define([
158
163
  this._propagateVariantManagement(oVariantManagementTargetOverlay, sVariantManagementReference);
159
164
  }
160
165
  }.bind(this));
161
- oOverlay.attachEvent("editableChange", RenameHandler._manageClickEvent, this);
162
166
  destroyManageDialog(oOverlay);
163
167
  } else if (!oOverlay.getVariantManagement()) {
164
168
  // Case where overlay is dynamically created - variant management reference should be identified from parent
165
169
  sVariantManagementReference = this._getVariantManagementFromParent(oOverlay);
166
170
  if (sVariantManagementReference) {
167
171
  oOverlay.setVariantManagement(sVariantManagementReference);
168
- oOverlay.attachEvent("editableChange", RenameHandler._manageClickEvent, this);
169
172
  }
170
173
  }
171
174
  };
@@ -222,8 +225,6 @@ sap.ui.define([
222
225
  if (this._isVariantManagementControl(oOverlay)) {
223
226
  destroyManageDialog(oOverlay);
224
227
  }
225
- oOverlay.detachEvent("editableChange", RenameHandler._manageClickEvent, this);
226
- oOverlay.detachBrowserEvent("click", RenameHandler._onClick, this);
227
228
  this.removeFromPluginsList(oOverlay);
228
229
  Plugin.prototype.deregisterElementOverlay.apply(this, aArgs);
229
230
  };
@@ -291,13 +292,6 @@ sap.ui.define([
291
292
  return false;
292
293
  };
293
294
 
294
- /**
295
- * @override
296
- */
297
- ControlVariant.prototype.setDesignTime = function(oDesignTime) {
298
- RenameHandler._setDesignTime.call(this, oDesignTime);
299
- };
300
-
301
295
  /**
302
296
  * Checks if variant rename is available for the overlay.
303
297
  *
@@ -466,21 +460,31 @@ sap.ui.define([
466
460
  * @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
467
461
  * @public
468
462
  */
469
- ControlVariant.prototype.renameVariant = function(aElementOverlays) {
470
- this.startEdit(aElementOverlays[0]);
471
- };
472
-
473
- ControlVariant.prototype.startEdit = function(oVariantManagementOverlay) {
474
- var vDomRef = oVariantManagementOverlay.getDesignTimeMetadata().getData().variantRenameDomRef;
475
- RenameHandler.startEdit.call(this, {
476
- overlay: oVariantManagementOverlay,
463
+ ControlVariant.prototype.renameVariant = async function(aElementOverlays) {
464
+ const [oOverlay] = aElementOverlays;
465
+ const sVariantManagementReference = oOverlay.getVariantManagement();
466
+ const oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
467
+ const oRenamedElement = oOverlay.getElement();
468
+ const vDomRef = oDesignTimeMetadata.getData().variantRenameDomRef;
469
+ const sNewText = await this._oDialog.openDialogAndHandleRename({
470
+ overlay: oOverlay,
477
471
  domRef: vDomRef,
478
- pluginMethodName: "plugin.ControlVariant.startEdit"
472
+ action: this.getAction(oOverlay)
479
473
  });
480
- };
474
+ if (!sNewText) {
475
+ return;
476
+ }
481
477
 
482
- ControlVariant.prototype.stopEdit = function(bRestoreFocus) {
483
- RenameHandler._stopEdit.call(this, bRestoreFocus, "plugin.ControlVariant.stopEdit");
478
+ const oSetTitleCommand = await this._createSetTitleCommand({
479
+ text: sNewText,
480
+ element: oRenamedElement,
481
+ designTimeMetadata: oDesignTimeMetadata,
482
+ variantManagementReference: sVariantManagementReference
483
+ });
484
+
485
+ this.fireElementModified({
486
+ command: oSetTitleCommand
487
+ });
484
488
  };
485
489
 
486
490
  ControlVariant.prototype.createSaveCommand = function(aElementOverlays) {
@@ -512,31 +516,6 @@ sap.ui.define([
512
516
  }.bind(this));
513
517
  };
514
518
 
515
- /**
516
- * @returns {Promise} empty promise
517
- * @private
518
- */
519
- ControlVariant.prototype._emitLabelChangeEvent = function() {
520
- var sText = RenameHandler._getCurrentEditableFieldText.call(this);
521
- var oOverlay = this._oEditedOverlay;
522
- var oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
523
- var oRenamedElement = oOverlay.getElement();
524
- var sVariantManagementReference = oOverlay.getVariantManagement();
525
-
526
- return this._createSetTitleCommand({
527
- text: sText,
528
- element: oRenamedElement,
529
- designTimeMetadata: oDesignTimeMetadata,
530
- variantManagementReference: sVariantManagementReference
531
- })
532
-
533
- .then(function(oSetTitleCommand) {
534
- this.fireElementModified({
535
- command: oSetTitleCommand
536
- });
537
- }.bind(this));
538
- };
539
-
540
519
  /**
541
520
  * Sets the domref text, creates a setTitle command and fires element modified.
542
521
  * @param {map} mPropertyBag - (required) contains required properties to create the command
@@ -544,8 +523,6 @@ sap.ui.define([
544
523
  * @private
545
524
  */
546
525
  ControlVariant.prototype._createSetTitleCommand = function(mPropertyBag) {
547
- this._oEditableControlDomRef.textContent = mPropertyBag.text;
548
-
549
526
  return this.getCommandFactory().getCommandFor(mPropertyBag.element, "setTitle", {
550
527
  newText: mPropertyBag.text
551
528
  }, mPropertyBag.designTimeMetadata, mPropertyBag.variantManagementReference)
@@ -702,5 +679,11 @@ sap.ui.define([
702
679
  return "controlVariant";
703
680
  };
704
681
 
682
+ ControlVariant.prototype.destroy = function(...args) {
683
+ Plugin.prototype.destroy.apply(this, args);
684
+ this._oDialog.destroy();
685
+ delete this._oDialog;
686
+ };
687
+
705
688
  return ControlVariant;
706
689
  });
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -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.135.0
28
+ * @version 1.136.1
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.34
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -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.135.0
35
+ * @version 1.136.1
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -33,7 +33,7 @@ function(
33
33
  * @extends sap.ui.dt.plugin.ControlDragDrop
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.135.0
36
+ * @version 1.136.1
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -1,21 +1,19 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2025 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2025 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Lib",
8
9
  "sap/ui/dt/Util",
9
10
  "sap/ui/fl/Utils",
10
- "sap/ui/rta/plugin/Plugin",
11
- "sap/ui/rta/util/isReuseComponent",
12
- "sap/ui/rta/Utils"
11
+ "sap/ui/rta/plugin/Plugin"
13
12
  ], function(
13
+ Lib,
14
14
  DtUtil,
15
- FlUtils,
16
- Plugin,
17
- isReuseComponent,
18
- RtaUtils
15
+ Utils,
16
+ Plugin
19
17
  ) {
20
18
  "use strict";
21
19
 
@@ -34,7 +32,7 @@ sap.ui.define([
34
32
  * @class
35
33
  * @extends sap.ui.rta.plugin.Plugin
36
34
  * @author SAP SE
37
- * @version 1.135.0
35
+ * @version 1.136.1
38
36
  * @constructor
39
37
  * @private
40
38
  * @since 1.134
@@ -56,6 +54,11 @@ sap.ui.define([
56
54
 
57
55
  const FLEX_CHANGE_TYPE = "codeExt";
58
56
 
57
+ function isControlInAsyncView(oOverlay) {
58
+ // Currently there is no better way to get this information. When this changes, this code must be adapted.
59
+ return !!Utils.getViewForControl(oOverlay.getElement())?.oAsyncState;
60
+ }
61
+
59
62
  /**
60
63
  * Check if the given overlay should be editable.
61
64
  *
@@ -63,17 +66,8 @@ sap.ui.define([
63
66
  * @returns {Promise<boolean>} <code>true</code> when editable wrapped in a promise
64
67
  * @private
65
68
  */
66
- ExtendControllerPlugin.prototype._isEditable = async function(oOverlay) {
67
- const oComponent = FlUtils.getComponentForControl(oOverlay.getElement());
68
- const bIsS4HanaCloud = RtaUtils.isS4HanaCloud();
69
- if (
70
- bIsS4HanaCloud ||
71
- isReuseComponent(oComponent)
72
- ) {
73
- return false;
74
- }
75
- const bHasChangeHandler = await this.hasChangeHandler(FLEX_CHANGE_TYPE, oOverlay.getElement());
76
- return bHasChangeHandler;
69
+ ExtendControllerPlugin.prototype._isEditable = function() {
70
+ return Promise.resolve(true);
77
71
  };
78
72
 
79
73
  /**
@@ -83,22 +77,42 @@ sap.ui.define([
83
77
  * @public
84
78
  */
85
79
  ExtendControllerPlugin.prototype.isEnabled = function(aElementOverlays) {
86
- const bEnabled = aElementOverlays.length === 1;
87
- return bEnabled;
80
+ return aElementOverlays.length === 1
81
+ && !this.isInReuseComponentOnS4HanaCloud(aElementOverlays[0])
82
+ && isControlInAsyncView(aElementOverlays[0]);
88
83
  };
89
84
 
90
- function handleExtendControllerCommand(mExtendControllerData, oElement) {
91
- const mExtendControllerSettings = {
92
- codeRef: mExtendControllerData.codeRef,
93
- viewId: mExtendControllerData.viewId
94
- };
95
-
96
- return this.getCommandFactory().getCommandFor(
97
- oElement,
98
- FLEX_CHANGE_TYPE,
99
- mExtendControllerSettings
100
- );
101
- }
85
+ /**
86
+ * Redefinition of getActionText to add special texts for the context menu
87
+ * @param {sap.ui.dt.ElementOverlay} oOverlay Overlay containing the Designtime Metadata
88
+ * @param {object} mAction The action data from the Designtime Metadata
89
+ * @param {string} sPluginId The ID of the plugin
90
+ * @returns {string} Returns the text for the menu item
91
+ */
92
+ ExtendControllerPlugin.prototype.getActionText = function(oOverlay, mAction, sPluginId) {
93
+ const vName = mAction.name;
94
+ const oElement = oOverlay.getElement();
95
+ let sText;
96
+ if (vName) {
97
+ if (typeof vName === "function") {
98
+ return vName(oElement);
99
+ }
100
+ sText = oOverlay.getDesignTimeMetadata() ? oOverlay.getDesignTimeMetadata().getLibraryText(oElement, vName) : "";
101
+ } else {
102
+ sText = Lib.getResourceBundleFor("sap.ui.rta").getText(sPluginId);
103
+ }
104
+ // The case where the control is in a reuse component on S4HanaCloud
105
+ // is not enabled and has a special text in parenthesis on the context menu
106
+ if (this.isInReuseComponentOnS4HanaCloud(oOverlay)) {
107
+ sText += ` (${Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_DISABLED_REUSE")})`;
108
+ }
109
+ // The case where the control is not in an async view
110
+ // is not enabled and has a special text in parenthesis on the context menu
111
+ if (!isControlInAsyncView(oOverlay)) {
112
+ sText += ` (${Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_DISABLED_NOT_ASYNC")})`;
113
+ }
114
+ return sText;
115
+ };
102
116
 
103
117
  /**
104
118
  * Triggers the plugin execution.
@@ -118,10 +132,10 @@ sap.ui.define([
118
132
 
119
133
  const mExtendControllerData = await fnControllerHandler(oElementOverlay);
120
134
 
121
- const oExtendControllerCommand = await handleExtendControllerCommand.call(
122
- this,
123
- mExtendControllerData,
124
- oElementOverlay.getElement()
135
+ const oExtendControllerCommand = await this.getCommandFactory().getCommandFor(
136
+ oElementOverlay.getElement(),
137
+ FLEX_CHANGE_TYPE,
138
+ mExtendControllerData
125
139
  );
126
140
 
127
141
  this.fireElementModified({
@@ -157,5 +171,15 @@ sap.ui.define([
157
171
  return "extendController";
158
172
  };
159
173
 
174
+ /**
175
+ * Returns the action information when defined in the designtime metadata or an object with only the changeType.
176
+ * @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay containing the Designtime Metadata
177
+ * @returns {object} Action information
178
+ */
179
+ ExtendControllerPlugin.prototype.getAction = function(oOverlay) {
180
+ const oAction = Plugin.prototype.getAction.apply(this, [oOverlay]);
181
+ return oAction || { changeType: FLEX_CHANGE_TYPE };
182
+ };
183
+
160
184
  return ExtendControllerPlugin;
161
185
  });