@openui5/sap.ui.rta 1.134.0 → 1.136.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 (216) hide show
  1. package/REUSE.toml +649 -0
  2. package/THIRDPARTY.txt +23 -23
  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 +124 -28
  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 +26 -26
  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 +72 -72
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
  16. package/src/sap/ui/rta/appVariant/Utils.js +27 -36
  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 +54 -68
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +2 -2
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  21. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  22. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  23. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  24. package/src/sap/ui/rta/command/AddXML.js +2 -2
  25. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  26. package/src/sap/ui/rta/command/AnnotationCommand.js +66 -6
  27. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  28. package/src/sap/ui/rta/command/BindProperty.js +2 -2
  29. package/src/sap/ui/rta/command/Combine.js +2 -2
  30. package/src/sap/ui/rta/command/CommandFactory.js +72 -48
  31. package/src/sap/ui/rta/command/CompositeCommand.js +13 -13
  32. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  33. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
  35. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
  36. package/src/sap/ui/rta/command/ControlVariantSwitch.js +2 -2
  37. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  38. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  39. package/src/sap/ui/rta/command/ExtendControllerCommand.js +93 -0
  40. package/src/sap/ui/rta/command/FlexCommand.js +55 -44
  41. package/src/sap/ui/rta/command/LREPSerializer.js +24 -24
  42. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  43. package/src/sap/ui/rta/command/ManifestCommand.js +112 -0
  44. package/src/sap/ui/rta/command/Move.js +2 -2
  45. package/src/sap/ui/rta/command/Property.js +2 -2
  46. package/src/sap/ui/rta/command/Remove.js +2 -2
  47. package/src/sap/ui/rta/command/Rename.js +2 -2
  48. package/src/sap/ui/rta/command/Resize.js +2 -2
  49. package/src/sap/ui/rta/command/Reveal.js +2 -2
  50. package/src/sap/ui/rta/command/Settings.js +2 -2
  51. package/src/sap/ui/rta/command/Split.js +2 -2
  52. package/src/sap/ui/rta/command/Stack.js +20 -5
  53. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
  54. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  55. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  56. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
  57. package/src/sap/ui/rta/command/{appDescriptor → manifest}/AddLibrary.js +11 -11
  58. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  59. package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
  60. package/src/sap/ui/rta/library.js +3 -3
  61. package/src/sap/ui/rta/messagebundle.properties +181 -9
  62. package/src/sap/ui/rta/messagebundle_ar.properties +105 -6
  63. package/src/sap/ui/rta/messagebundle_bg.properties +105 -6
  64. package/src/sap/ui/rta/messagebundle_ca.properties +108 -9
  65. package/src/sap/ui/rta/messagebundle_cnr.properties +106 -7
  66. package/src/sap/ui/rta/messagebundle_cs.properties +103 -4
  67. package/src/sap/ui/rta/messagebundle_cy.properties +105 -6
  68. package/src/sap/ui/rta/messagebundle_da.properties +104 -5
  69. package/src/sap/ui/rta/messagebundle_de.properties +114 -15
  70. package/src/sap/ui/rta/messagebundle_el.properties +102 -3
  71. package/src/sap/ui/rta/messagebundle_en.properties +105 -6
  72. package/src/sap/ui/rta/messagebundle_en_GB.properties +105 -6
  73. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +9 -1
  74. package/src/sap/ui/rta/messagebundle_es.properties +109 -10
  75. package/src/sap/ui/rta/messagebundle_es_MX.properties +113 -14
  76. package/src/sap/ui/rta/messagebundle_et.properties +103 -4
  77. package/src/sap/ui/rta/messagebundle_fi.properties +107 -8
  78. package/src/sap/ui/rta/messagebundle_fr.properties +123 -24
  79. package/src/sap/ui/rta/messagebundle_fr_CA.properties +110 -11
  80. package/src/sap/ui/rta/messagebundle_hi.properties +105 -6
  81. package/src/sap/ui/rta/messagebundle_hr.properties +145 -46
  82. package/src/sap/ui/rta/messagebundle_hu.properties +104 -5
  83. package/src/sap/ui/rta/messagebundle_id.properties +113 -14
  84. package/src/sap/ui/rta/messagebundle_it.properties +146 -47
  85. package/src/sap/ui/rta/messagebundle_iw.properties +105 -6
  86. package/src/sap/ui/rta/messagebundle_ja.properties +117 -18
  87. package/src/sap/ui/rta/messagebundle_kk.properties +104 -5
  88. package/src/sap/ui/rta/messagebundle_ko.properties +105 -6
  89. package/src/sap/ui/rta/messagebundle_lt.properties +105 -6
  90. package/src/sap/ui/rta/messagebundle_lv.properties +104 -5
  91. package/src/sap/ui/rta/messagebundle_mk.properties +108 -9
  92. package/src/sap/ui/rta/messagebundle_ms.properties +115 -16
  93. package/src/sap/ui/rta/messagebundle_nl.properties +104 -5
  94. package/src/sap/ui/rta/messagebundle_no.properties +108 -9
  95. package/src/sap/ui/rta/messagebundle_pl.properties +104 -5
  96. package/src/sap/ui/rta/messagebundle_pt.properties +103 -4
  97. package/src/sap/ui/rta/messagebundle_pt_PT.properties +103 -4
  98. package/src/sap/ui/rta/messagebundle_ro.properties +103 -4
  99. package/src/sap/ui/rta/messagebundle_ru.properties +107 -8
  100. package/src/sap/ui/rta/messagebundle_sh.properties +106 -7
  101. package/src/sap/ui/rta/messagebundle_sk.properties +103 -4
  102. package/src/sap/ui/rta/messagebundle_sl.properties +103 -4
  103. package/src/sap/ui/rta/messagebundle_sr.properties +106 -7
  104. package/src/sap/ui/rta/messagebundle_sv.properties +104 -5
  105. package/src/sap/ui/rta/messagebundle_th.properties +104 -5
  106. package/src/sap/ui/rta/messagebundle_tr.properties +103 -4
  107. package/src/sap/ui/rta/messagebundle_uk.properties +105 -6
  108. package/src/sap/ui/rta/messagebundle_vi.properties +105 -6
  109. package/src/sap/ui/rta/messagebundle_zh_CN.properties +104 -5
  110. package/src/sap/ui/rta/messagebundle_zh_TW.properties +105 -6
  111. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +34 -34
  112. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +54 -32
  113. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
  114. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  115. package/src/sap/ui/rta/plugin/CompVariant.js +114 -114
  116. package/src/sap/ui/rta/plugin/ControlVariant.js +37 -54
  117. package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
  118. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  119. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  120. package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +172 -0
  121. package/src/sap/ui/rta/plugin/LocalReset.js +4 -3
  122. package/src/sap/ui/rta/plugin/Plugin.js +31 -11
  123. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  124. package/src/sap/ui/rta/plugin/Remove.js +2 -2
  125. package/src/sap/ui/rta/plugin/Resize.js +2 -2
  126. package/src/sap/ui/rta/plugin/Selection.js +2 -2
  127. package/src/sap/ui/rta/plugin/Settings.js +75 -62
  128. package/src/sap/ui/rta/plugin/Split.js +2 -2
  129. package/src/sap/ui/rta/plugin/Stretch.js +2 -2
  130. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -2
  131. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
  132. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -1
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +2 -2
  134. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
  135. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
  136. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +13 -9
  137. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +75 -13
  138. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +38 -32
  139. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +61 -21
  140. package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +1 -1
  141. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +8 -2
  142. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  143. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
  144. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  145. package/src/sap/ui/rta/plugin/{Rename.js → rename/Rename.js} +29 -67
  146. package/src/sap/ui/rta/plugin/rename/RenameDialog.fragment.xml +63 -0
  147. package/src/sap/ui/rta/plugin/rename/RenameDialog.js +140 -0
  148. package/src/sap/ui/rta/service/Action.js +2 -2
  149. package/src/sap/ui/rta/service/ControllerExtension.js +11 -5
  150. package/src/sap/ui/rta/service/Outline.js +2 -2
  151. package/src/sap/ui/rta/service/Property.js +2 -2
  152. package/src/sap/ui/rta/service/Receiver.js +1 -1
  153. package/src/sap/ui/rta/service/Selection.js +2 -2
  154. package/src/sap/ui/rta/service/SupportTools.js +2 -2
  155. package/src/sap/ui/rta/service/index.js +1 -1
  156. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +5 -0
  157. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  158. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  159. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +6 -0
  160. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +22 -9
  161. package/src/sap/ui/rta/toolbar/Adaptation.js +44 -9
  162. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  163. package/src/sap/ui/rta/toolbar/Base.js +2 -2
  164. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  165. package/src/sap/ui/rta/toolbar/Fiori.js +19 -10
  166. package/src/sap/ui/rta/toolbar/FioriLike.js +7 -5
  167. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
  168. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  169. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +1 -1
  170. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -2
  171. package/src/sap/ui/rta/toolbar/translation/Translation.js +2 -2
  172. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
  173. package/src/sap/ui/rta/util/Animation.js +1 -1
  174. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  175. package/src/sap/ui/rta/util/PluginManager.js +8 -6
  176. package/src/sap/ui/rta/util/PopupManager.js +2 -2
  177. package/src/sap/ui/rta/util/ReloadManager.js +2 -2
  178. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  179. package/src/sap/ui/rta/util/ServiceManager.js +2 -2
  180. package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
  181. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
  182. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -2
  183. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
  184. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
  185. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +4 -4
  186. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  187. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  188. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  189. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
  190. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
  191. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  192. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
  193. package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +242 -0
  194. package/src/sap/ui/rta/util/guidedTour/TourMarker.fragment.xml +50 -0
  195. package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +205 -0
  196. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  197. package/src/sap/ui/rta/util/isReuseComponent.js +1 -1
  198. package/src/sap/ui/rta/util/showMessageBox.js +1 -1
  199. package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
  200. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  201. package/src/sap/ui/rta/util/validateText.js +1 -1
  202. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +8 -4
  203. package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +1 -1
  204. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
  205. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
  206. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +85 -1
  207. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ChangeLabelsAction.png +0 -0
  208. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/DisplayBehavior.png +0 -0
  209. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ExtendedActions.png +0 -0
  210. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/GuidedTour.png +0 -0
  211. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/ReloadButtonToolbar.png +0 -0
  212. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/RenameDialog.png +0 -0
  213. package/ui5.yaml +1 -1
  214. package/.reuse/dep5 +0 -471
  215. package/src/sap/ui/rta/command/AppDescriptorCommand.js +0 -114
  216. package/src/sap/ui/rta/plugin/RenameHandler.js +0 -477
@@ -1,21 +1,17 @@
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
- "sap/ui/fl/Utils",
10
- "sap/ui/rta/Utils",
11
- "sap/ui/rta/plugin/Plugin",
12
- "sap/ui/rta/util/isReuseComponent"
10
+ "sap/ui/rta/plugin/Plugin"
13
11
  ], function(
12
+ Lib,
14
13
  DtUtil,
15
- FlUtils,
16
- RtaUtils,
17
- Plugin,
18
- isReuseComponent
14
+ Plugin
19
15
  ) {
20
16
  "use strict";
21
17
 
@@ -41,7 +37,7 @@ sap.ui.define([
41
37
  * @class
42
38
  * @extends sap.ui.rta.plugin.Plugin
43
39
  * @author SAP SE
44
- * @version 1.134.0
40
+ * @version 1.136.0
45
41
  * @constructor
46
42
  * @private
47
43
  * @since 1.134
@@ -72,12 +68,8 @@ sap.ui.define([
72
68
  AddXML.prototype._isEditable = async function(oOverlay) {
73
69
  // Action should be available by default
74
70
  const oAddXMLAction = this.getAction(oOverlay);
75
- const oComponent = FlUtils.getComponentForControl(oOverlay.getElement());
76
- const bIsS4HanaCloud = RtaUtils.isS4HanaCloud();
77
71
  if (
78
- oAddXMLAction === null ||
79
- !this.hasStableId(oOverlay) ||
80
- (bIsS4HanaCloud && isReuseComponent(oComponent))
72
+ oAddXMLAction === null
81
73
  ) {
82
74
  return Promise.resolve(false);
83
75
  }
@@ -92,25 +84,40 @@ sap.ui.define([
92
84
  * @public
93
85
  */
94
86
  AddXML.prototype.isEnabled = function(aElementOverlays) {
95
- const bEnabled = aElementOverlays.length === 1;
87
+ const bEnabled = (aElementOverlays.length === 1) &&
88
+ !this.isInReuseComponentOnS4HanaCloud(aElementOverlays[0]) &&
89
+ this.hasStableId(aElementOverlays[0]);
96
90
  return bEnabled;
97
91
  };
98
92
 
99
- function handleAddXmlCommand(mAddXmlData, oElement) {
100
- const mAddXmlSettings = {
101
- fragment: mAddXmlData.fragment,
102
- fragmentPath: mAddXmlData.fragmentPath,
103
- targetAggregation: mAddXmlData.targetAggregation,
104
- index: mAddXmlData.index
105
-
106
- };
107
-
108
- return this.getCommandFactory().getCommandFor(
109
- oElement,
110
- FLEX_CHANGE_TYPE,
111
- mAddXmlSettings
112
- );
113
- }
93
+ /**
94
+ * Redefinition of getActionText to add special texts for the context menu
95
+ * @param {sap.ui.dt.ElementOverlay} oOverlay Overlay containing the Designtime Metadata
96
+ * @param {object} mAction The action data from the Designtime Metadata
97
+ * @param {string} sPluginId The ID of the plugin
98
+ * @returns {string} Returns the text for the menu item
99
+ */
100
+ AddXML.prototype.getActionText = function(oOverlay, mAction, sPluginId) {
101
+ const vName = mAction.name;
102
+ const oElement = oOverlay.getElement();
103
+ let sText;
104
+ if (vName) {
105
+ if (typeof vName === "function") {
106
+ return vName(oElement);
107
+ }
108
+ sText = oOverlay.getDesignTimeMetadata() ? oOverlay.getDesignTimeMetadata().getLibraryText(oElement, vName) : "";
109
+ } else {
110
+ sText = Lib.getResourceBundleFor("sap.ui.rta").getText(sPluginId);
111
+ }
112
+ // The cases where the control is in a reuse component on S4HanaCloud or has no stable ID
113
+ // are not enabled and have special texts in parenthesis on the context menu
114
+ if (this.isInReuseComponentOnS4HanaCloud(oOverlay)) {
115
+ sText += ` (${Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_DISABLED_REUSE")})`;
116
+ } else if (!this.hasStableId(oOverlay)) {
117
+ sText += ` (${Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_DISABLED_NO_STABLE_ID")})`;
118
+ }
119
+ return sText;
120
+ };
114
121
 
115
122
  /**
116
123
  * Triggers the plugin execution.
@@ -130,7 +137,12 @@ sap.ui.define([
130
137
 
131
138
  const mAddXmlData = await fnFragmentHandler(oOverlay, aExcludedAggregation);
132
139
 
133
- const oAddXmlCommand = await handleAddXmlCommand.call(this, mAddXmlData, oOverlay.getElement());
140
+ const oAddXmlCommand = await this.getCommandFactory().getCommandFor(
141
+ oOverlay.getElement(),
142
+ FLEX_CHANGE_TYPE,
143
+ mAddXmlData
144
+ );
145
+
134
146
  this.fireElementModified({
135
147
  command: oAddXmlCommand
136
148
  });
@@ -164,5 +176,15 @@ sap.ui.define([
164
176
  return "addXML";
165
177
  };
166
178
 
179
+ /**
180
+ * Returns the action information when defined in the designtime metadata or an object with only the changeType.
181
+ * @param {sap.ui.dt.ElementOverlay} oOverlay - Overlay containing the Designtime Metadata
182
+ * @returns {object} Action information
183
+ */
184
+ AddXML.prototype.getAction = function(oOverlay) {
185
+ const oAction = Plugin.prototype.getAction.apply(this, [oOverlay]);
186
+ return oAction || { changeType: FLEX_CHANGE_TYPE };
187
+ };
188
+
167
189
  return AddXML;
168
190
  });
@@ -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 BaseCreate allows trigger BaseCreate operations on the overlay.
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.134.0
28
+ * @version 1.136.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.75
@@ -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
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.134.0
28
+ * @version 1.136.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.46
@@ -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.134.0
56
+ * @version 1.136.0
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.134.0
28
+ * @version 1.136.0
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.134.0
35
+ * @version 1.136.0
36
36
  *
37
37
  * @constructor
38
38
  * @private