@openui5/sap.ui.rta 1.131.1 → 1.132.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 (200) hide show
  1. package/.eslintrc.json +1 -2
  2. package/THIRDPARTY.txt +1 -1
  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 +26 -10
  7. package/src/sap/ui/rta/Utils.js +2 -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 +1 -1
  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 +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +27 -27
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.html +3 -3
  21. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  22. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  23. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  24. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  25. package/src/sap/ui/rta/command/AddXML.js +2 -2
  26. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  27. package/src/sap/ui/rta/command/AnnotationCommand.js +79 -0
  28. package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
  29. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  30. package/src/sap/ui/rta/command/BindProperty.js +6 -8
  31. package/src/sap/ui/rta/command/Combine.js +2 -2
  32. package/src/sap/ui/rta/command/CommandFactory.js +3 -3
  33. package/src/sap/ui/rta/command/CompositeCommand.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantConfigure.js +9 -5
  35. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  36. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +8 -6
  37. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +14 -11
  38. package/src/sap/ui/rta/command/ControlVariantSwitch.js +6 -4
  39. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  40. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  41. package/src/sap/ui/rta/command/FlexCommand.js +2 -2
  42. package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
  43. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  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 +2 -2
  53. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
  54. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
  55. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  56. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  57. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +14 -2
  58. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  59. package/src/sap/ui/rta/enablement/elementActionTest.js +15 -16
  60. package/src/sap/ui/rta/library.js +3 -3
  61. package/src/sap/ui/rta/messagebundle.properties +18 -0
  62. package/src/sap/ui/rta/messagebundle_ar.properties +10 -0
  63. package/src/sap/ui/rta/messagebundle_bg.properties +13 -3
  64. package/src/sap/ui/rta/messagebundle_ca.properties +10 -0
  65. package/src/sap/ui/rta/messagebundle_cnr.properties +10 -0
  66. package/src/sap/ui/rta/messagebundle_cs.properties +10 -0
  67. package/src/sap/ui/rta/messagebundle_cy.properties +10 -0
  68. package/src/sap/ui/rta/messagebundle_da.properties +10 -0
  69. package/src/sap/ui/rta/messagebundle_de.properties +10 -0
  70. package/src/sap/ui/rta/messagebundle_el.properties +10 -0
  71. package/src/sap/ui/rta/messagebundle_en.properties +10 -0
  72. package/src/sap/ui/rta/messagebundle_en_GB.properties +10 -0
  73. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -0
  74. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +347 -325
  75. package/src/sap/ui/rta/messagebundle_es.properties +10 -0
  76. package/src/sap/ui/rta/messagebundle_es_MX.properties +18 -8
  77. package/src/sap/ui/rta/messagebundle_et.properties +10 -0
  78. package/src/sap/ui/rta/messagebundle_fi.properties +10 -0
  79. package/src/sap/ui/rta/messagebundle_fr.properties +10 -0
  80. package/src/sap/ui/rta/messagebundle_fr_CA.properties +10 -0
  81. package/src/sap/ui/rta/messagebundle_hi.properties +10 -0
  82. package/src/sap/ui/rta/messagebundle_hr.properties +10 -0
  83. package/src/sap/ui/rta/messagebundle_hu.properties +10 -0
  84. package/src/sap/ui/rta/messagebundle_id.properties +10 -0
  85. package/src/sap/ui/rta/messagebundle_it.properties +10 -0
  86. package/src/sap/ui/rta/messagebundle_iw.properties +10 -0
  87. package/src/sap/ui/rta/messagebundle_ja.properties +10 -0
  88. package/src/sap/ui/rta/messagebundle_kk.properties +10 -0
  89. package/src/sap/ui/rta/messagebundle_ko.properties +10 -0
  90. package/src/sap/ui/rta/messagebundle_lt.properties +10 -0
  91. package/src/sap/ui/rta/messagebundle_lv.properties +10 -0
  92. package/src/sap/ui/rta/messagebundle_mk.properties +10 -0
  93. package/src/sap/ui/rta/messagebundle_ms.properties +14 -4
  94. package/src/sap/ui/rta/messagebundle_nl.properties +10 -0
  95. package/src/sap/ui/rta/messagebundle_no.properties +10 -0
  96. package/src/sap/ui/rta/messagebundle_pl.properties +10 -0
  97. package/src/sap/ui/rta/messagebundle_pt.properties +10 -0
  98. package/src/sap/ui/rta/messagebundle_pt_PT.properties +10 -0
  99. package/src/sap/ui/rta/messagebundle_ro.properties +10 -0
  100. package/src/sap/ui/rta/messagebundle_ru.properties +10 -0
  101. package/src/sap/ui/rta/messagebundle_sh.properties +10 -0
  102. package/src/sap/ui/rta/messagebundle_sk.properties +10 -0
  103. package/src/sap/ui/rta/messagebundle_sl.properties +10 -0
  104. package/src/sap/ui/rta/messagebundle_sr.properties +10 -0
  105. package/src/sap/ui/rta/messagebundle_sv.properties +10 -0
  106. package/src/sap/ui/rta/messagebundle_th.properties +10 -0
  107. package/src/sap/ui/rta/messagebundle_tr.properties +10 -0
  108. package/src/sap/ui/rta/messagebundle_uk.properties +11 -1
  109. package/src/sap/ui/rta/messagebundle_vi.properties +10 -0
  110. package/src/sap/ui/rta/messagebundle_zh_CN.properties +10 -0
  111. package/src/sap/ui/rta/messagebundle_zh_TW.properties +10 -0
  112. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  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 +4 -2
  116. package/src/sap/ui/rta/plugin/ControlVariant.js +5 -23
  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/LocalReset.js +2 -2
  121. package/src/sap/ui/rta/plugin/Plugin.js +15 -13
  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/Rename.js +3 -3
  125. package/src/sap/ui/rta/plugin/RenameHandler.js +5 -9
  126. package/src/sap/ui/rta/plugin/Resize.js +3 -3
  127. package/src/sap/ui/rta/plugin/Selection.js +2 -2
  128. package/src/sap/ui/rta/plugin/Settings.js +2 -21
  129. package/src/sap/ui/rta/plugin/Split.js +2 -2
  130. package/src/sap/ui/rta/plugin/Stretch.js +7 -5
  131. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -126
  132. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +28 -31
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +141 -172
  134. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +108 -137
  135. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
  136. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +96 -141
  137. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +112 -0
  138. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +183 -0
  139. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +109 -0
  140. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +239 -0
  141. package/src/sap/ui/rta/plugin/annotations/AnnotationTypes.js +15 -0
  142. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  143. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +3 -3
  144. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
  145. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  146. package/src/sap/ui/rta/service/Action.js +2 -2
  147. package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
  148. package/src/sap/ui/rta/service/Outline.js +2 -2
  149. package/src/sap/ui/rta/service/Property.js +2 -2
  150. package/src/sap/ui/rta/service/Receiver.js +1 -1
  151. package/src/sap/ui/rta/service/Selection.js +2 -2
  152. package/src/sap/ui/rta/service/SupportTools.js +2 -2
  153. package/src/sap/ui/rta/service/index.js +1 -1
  154. package/src/sap/ui/rta/themes/base/WhatsNew.less +5 -0
  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/Adaptation.js +2 -2
  158. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  159. package/src/sap/ui/rta/toolbar/Base.js +2 -2
  160. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  161. package/src/sap/ui/rta/toolbar/Fiori.js +3 -4
  162. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  163. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
  164. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  165. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +1 -1
  166. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -2
  167. package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
  168. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
  169. package/src/sap/ui/rta/util/Animation.js +1 -1
  170. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  171. package/src/sap/ui/rta/util/PluginManager.js +16 -10
  172. package/src/sap/ui/rta/util/PopupManager.js +3 -3
  173. package/src/sap/ui/rta/util/ReloadManager.js +9 -9
  174. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  175. package/src/sap/ui/rta/util/ServiceManager.js +2 -2
  176. package/src/sap/ui/rta/util/adaptationStarter.js +17 -2
  177. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
  178. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -2
  179. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
  180. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
  181. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +5 -3
  182. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  183. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  184. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  185. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
  186. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
  187. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  188. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
  189. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  190. package/src/sap/ui/rta/util/showMessageBox.js +1 -1
  191. package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
  192. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  193. package/src/sap/ui/rta/util/validateText.js +1 -1
  194. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +2 -2
  195. package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +5 -4
  196. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +1 -1
  197. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +8 -2
  198. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +1 -1
  199. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +1 -1
  200. package/src/sap/ui/rta/command/Annotation.js +0 -45
@@ -1,11 +1,10 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-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/base/util/restricted/_difference",
9
8
  "sap/base/util/merge",
10
9
  "sap/base/Log",
11
10
  "sap/ui/core/util/reflection/JsControlTreeModifier",
@@ -16,7 +15,6 @@ sap.ui.define([
16
15
  "sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils",
17
16
  "sap/ui/rta/Utils"
18
17
  ], function(
19
- difference,
20
18
  merge,
21
19
  Log,
22
20
  JsControlTreeModifier,
@@ -34,33 +32,31 @@ sap.ui.define([
34
32
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
35
33
  *
36
34
  * @author SAP SE
37
- * @version 1.131.1
35
+ * @version 1.132.1
38
36
  * @private
39
37
  * @since 1.94
40
38
  */
41
39
  const ActionExtractor = {};
42
40
 
43
- function getAddViaDelegateActionData(mAction, oDesignTimeMetadata, oPlugin) {
44
- return oPlugin.hasChangeHandler(mAction.changeType, mAction.element)
45
- .then(function(bHasChangeHandler) {
46
- if (bHasChangeHandler) {
47
- return {
48
- aggregationName: mAction.aggregation,
49
- addPropertyActionData: {
50
- designTimeMetadata: oDesignTimeMetadata,
51
- action: mAction,
52
- delegateInfo: {
53
- payload: mAction.delegateInfo.payload || {},
54
- delegate: mAction.delegateInfo.instance,
55
- modelType: mAction.delegateInfo.modelType,
56
- requiredLibraries: mAction.delegateInfo.requiredLibraries,
57
- delegateType: mAction.delegateInfo.delegateType
58
- }
41
+ async function getAddViaDelegateActionData(mAction, oDesignTimeMetadata, oPlugin) {
42
+ const bHasChangeHandler = await oPlugin.hasChangeHandler(mAction.changeType, mAction.element);
43
+ if (bHasChangeHandler) {
44
+ return {
45
+ aggregationName: mAction.aggregation,
46
+ addPropertyActionData: {
47
+ designTimeMetadata: oDesignTimeMetadata,
48
+ action: mAction,
49
+ delegateInfo: {
50
+ payload: mAction.delegateInfo.payload || {},
51
+ delegate: mAction.delegateInfo.instance,
52
+ modelType: mAction.delegateInfo.modelType,
53
+ requiredLibraries: mAction.delegateInfo.requiredLibraries,
54
+ delegateType: mAction.delegateInfo.delegateType
59
55
  }
60
- };
61
- }
62
- return undefined;
63
- });
56
+ }
57
+ };
58
+ }
59
+ return undefined;
64
60
  }
65
61
 
66
62
  function getInvisibleElements(oParentOverlay, sAggregationName, oPlugin) {
@@ -123,7 +119,7 @@ sap.ui.define([
123
119
  }
124
120
 
125
121
  // Return all elements that can be made visible in each aggregation (including elements from other aggregations)
126
- function getRevealActionFromAggregations(aParents, _mReveal, sAggregationName, aAggregationNames, oPlugin) {
122
+ async function getRevealActionFromAggregations(aParents, _mReveal, sAggregationName, aAggregationNames, oPlugin) {
127
123
  const aInvisibleElements = aParents.reduce(function(aInvisibleChildren, oParentOverlay) {
128
124
  let aInvisibleChildrenPerAggregation = [];
129
125
  aAggregationNames.forEach(function(sAggregation) {
@@ -133,24 +129,20 @@ sap.ui.define([
133
129
  return oParentOverlay ? aInvisibleChildren.concat(aInvisibleChildrenPerAggregation) : aInvisibleChildren;
134
130
  }.bind(this), []);
135
131
 
136
- const oInitialRevealObject = {
132
+ let oRevealObject = {
137
133
  elements: [],
138
134
  controlTypeNames: []
139
135
  };
140
- const mRevealPromise = aInvisibleElements.reduce(function(oPreviousPromise, mInvisibleElement) {
141
- return oPreviousPromise.then(function(mReveal) {
142
- return checkAndEnrichReveal(mReveal, mInvisibleElement, oPlugin, sAggregationName);
143
- });
144
- }, Promise.resolve(oInitialRevealObject));
136
+ for (const mInvisibleElement of aInvisibleElements) {
137
+ oRevealObject = await checkAndEnrichReveal(oRevealObject, mInvisibleElement, oPlugin, sAggregationName);
138
+ }
145
139
 
146
- return mRevealPromise.then(function(mReveal) {
147
- if (mReveal.elements.length > 0) {
148
- _mReveal[sAggregationName] = {
149
- reveal: mReveal
150
- };
151
- }
152
- return _mReveal;
153
- });
140
+ if (oRevealObject.elements.length > 0) {
141
+ _mReveal[sAggregationName] = {
142
+ reveal: oRevealObject
143
+ };
144
+ }
145
+ return _mReveal;
154
146
  }
155
147
 
156
148
  function filterValidAddPropertyActions(aActions, mParents, oPlugin) {
@@ -161,21 +153,18 @@ sap.ui.define([
161
153
  });
162
154
  }
163
155
 
164
- function loadRequiredLibraries(mRequiredLibraries) {
156
+ async function loadRequiredLibraries(mRequiredLibraries) {
165
157
  const aRequiredLibraries = Object.keys(mRequiredLibraries || {});
166
- const aRequireLibrariesPromise = [];
167
- aRequiredLibraries.forEach((sLibrary) => {
168
- aRequireLibrariesPromise.push(
169
- Lib.load({name: sLibrary})
170
- );
171
- });
172
- return Promise.all(aRequireLibrariesPromise)
173
- .then(() => true)
174
- .catch((vError) => {
158
+ try {
159
+ for (const sLibrary of aRequiredLibraries) {
160
+ await Lib.load({name: sLibrary});
161
+ }
162
+ return true;
163
+ } catch (vError) {
175
164
  Log.error("Required library not available: ", vError);
176
165
  // Ignore the error here as the write delegate might not be required
177
166
  return false;
178
- });
167
+ }
179
168
  }
180
169
 
181
170
  function filterValidDelegateForAction(aActions, mParents) {
@@ -203,68 +192,53 @@ sap.ui.define([
203
192
  return oFilterPromise;
204
193
  }
205
194
 
206
- function checkAndEnrichReveal(mReveal, mInvisibleElement, oPlugin, sTargetAggregation) {
207
- const oInvisibleElement = mInvisibleElement.element;
208
- let oDesignTimeMetadata;
209
- let mRevealAction;
210
- let bRevealEnabled = false;
211
- let oHasChangeHandlerPromise = Promise.resolve(false);
212
- const sSourceAggregation = mInvisibleElement.sourceAggregation;
213
-
214
- const oOverlay = OverlayRegistry.getOverlay(oInvisibleElement);
195
+ async function checkAndEnrichReveal(mReveal, mInvisibleElement, oPlugin, sTargetAggregation) {
196
+ const oOverlay = OverlayRegistry.getOverlay(mInvisibleElement.element);
215
197
  if (oOverlay) {
216
- oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
198
+ const oDesignTimeMetadata = oOverlay.getDesignTimeMetadata();
217
199
 
218
- mRevealAction = oDesignTimeMetadata && oDesignTimeMetadata.getAction("reveal", oInvisibleElement);
200
+ const mRevealAction = oDesignTimeMetadata && oDesignTimeMetadata.getAction("reveal", mInvisibleElement.element);
219
201
  if (mRevealAction && mRevealAction.changeType) {
220
- let oRevealSelector = oInvisibleElement;
202
+ let oRevealSelector = mInvisibleElement.element;
221
203
  if (mRevealAction.changeOnRelevantContainer) {
222
204
  oRevealSelector = oOverlay.getRelevantContainer();
223
205
  }
224
206
 
225
- oHasChangeHandlerPromise = oPlugin.hasChangeHandler(mRevealAction.changeType, oRevealSelector)
226
- .then(function(bHasChangeHandler) {
227
- // Element can be made invalid while the check is running (e.g. destroyed during undo of split)
228
- if (ElementUtil.isElementValid(oInvisibleElement)) {
229
- const mParents = AdditionalElementsUtils.getParents(true, oOverlay, oPlugin);
230
- if (bHasChangeHandler) {
231
- if (mRevealAction.changeOnRelevantContainer) {
232
- // we have the child overlay, so we need the parents
233
- bRevealEnabled = oPlugin.hasStableId(mParents.relevantContainerOverlay)
234
- && oPlugin.hasStableId(mParents.parentOverlay);
235
- } else {
236
- bRevealEnabled = true;
237
- }
238
- mRevealAction.getAggregationName ||= defaultGetAggregationName;
207
+ // Element can be made invalid while the check is running (e.g. destroyed during undo of split)
208
+ if (ElementUtil.isElementValid(mInvisibleElement.element)) {
209
+ const mParents = AdditionalElementsUtils.getParents(true, oOverlay, oPlugin);
210
+ const bHasChangeHandler = await oPlugin.hasChangeHandler(mRevealAction.changeType, oRevealSelector);
211
+ if (bHasChangeHandler) {
212
+ let bRevealEnabled = mRevealAction.changeOnRelevantContainer ?
213
+ // we have the child overlay, so we need the parents
214
+ oPlugin.hasStableId(mParents.relevantContainerOverlay) && oPlugin.hasStableId(mParents.parentOverlay)
215
+ : true;
216
+ mRevealAction.getAggregationName ||= defaultGetAggregationName;
217
+
218
+ // Check if the invisible element can be moved to the target aggregation
219
+ if (bRevealEnabled && (mInvisibleElement.sourceAggregation !== sTargetAggregation)) {
220
+ const oAggregationOverlay = mParents.parentOverlay.getAggregationOverlay(sTargetAggregation);
221
+ bRevealEnabled = await Utils.checkTargetZone(oAggregationOverlay, oOverlay, oPlugin);
222
+ }
239
223
 
240
- // Check if the invisible element can be moved to the target aggregation
241
- if (bRevealEnabled && (sSourceAggregation !== sTargetAggregation)) {
242
- const oAggregationOverlay = mParents.parentOverlay.getAggregationOverlay(sTargetAggregation);
243
- return Utils.checkTargetZone(oAggregationOverlay, oOverlay, oPlugin);
224
+ if (bRevealEnabled) {
225
+ mReveal.elements.push({
226
+ element: mInvisibleElement.element,
227
+ designTimeMetadata: oDesignTimeMetadata,
228
+ action: mRevealAction,
229
+ sourceAggregation: mInvisibleElement.sourceAggregation,
230
+ targetAggregation: sTargetAggregation
231
+ });
232
+ const mName = oDesignTimeMetadata.getName(mInvisibleElement.element);
233
+ if (mName) {
234
+ mReveal.controlTypeNames.push(mName);
244
235
  }
245
236
  }
246
237
  }
247
- return bRevealEnabled;
248
- });
249
- }
250
- }
251
-
252
- return oHasChangeHandlerPromise.then(function(bIncludeReveal) {
253
- if (bIncludeReveal) {
254
- mReveal.elements.push({
255
- element: oInvisibleElement,
256
- designTimeMetadata: oDesignTimeMetadata,
257
- action: mRevealAction,
258
- sourceAggregation: sSourceAggregation,
259
- targetAggregation: sTargetAggregation
260
- });
261
- const mName = oDesignTimeMetadata.getName(oInvisibleElement);
262
- if (mName) {
263
- mReveal.controlTypeNames.push(mName);
264
238
  }
265
239
  }
266
- return mReveal;
267
- });
240
+ }
241
+ return mReveal;
268
242
  }
269
243
 
270
244
  /**
@@ -298,32 +272,28 @@ sap.ui.define([
298
272
  *
299
273
  * @return {Promise} Resolving to a structure with all "add/reveal" action relevant data collected
300
274
  */
301
- ActionExtractor.getActions = function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate, oDesignTime) {
275
+ ActionExtractor.getActions = async function(bSibling, oSourceElementOverlay, oPlugin, bInvalidate, oDesignTime) {
302
276
  const sSiblingOrChild = bSibling ? "asSibling" : "asChild";
303
277
  if (!bInvalidate && oSourceElementOverlay._mAddActions) {
304
- return Promise.resolve(oSourceElementOverlay._mAddActions[sSiblingOrChild]);
278
+ return oSourceElementOverlay._mAddActions[sSiblingOrChild];
305
279
  }
306
280
 
307
- const oRevealActionsPromise = this._getRevealActions(bSibling, oSourceElementOverlay, oPlugin, oDesignTime);
308
- const oAddPropertyActionsPromise = this._getAddViaDelegateActions(bSibling, oSourceElementOverlay, oPlugin);
309
-
310
- return Promise.all([
311
- oRevealActionsPromise,
312
- oAddPropertyActionsPromise
313
- ]).then(function(aAllActions) {
314
- // join and condense all action data
315
- const mAllActions = merge(aAllActions[0], aAllActions[1]);
316
- oSourceElementOverlay._mAddActions ||= {asSibling: {}, asChild: {}};
317
- oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
318
- return mAllActions;
319
- });
281
+ const [oRevealAction, oAddViaDelegateAction] = await Promise.all([
282
+ this._getRevealActions(bSibling, oSourceElementOverlay, oPlugin, oDesignTime),
283
+ this._getAddViaDelegateActions(bSibling, oSourceElementOverlay, oPlugin)
284
+ ]);
285
+ // join and condense all action data
286
+ const mAllActions = merge(oRevealAction, oAddViaDelegateAction);
287
+ oSourceElementOverlay._mAddActions ||= {asSibling: {}, asChild: {}};
288
+ oSourceElementOverlay._mAddActions[sSiblingOrChild] = mAllActions;
289
+ return mAllActions;
320
290
  };
321
291
 
322
292
  /**
323
293
  * Returns the already calculated actions of an Overlay, or undefined if no actions available
324
294
  * @param {boolean} bSibling - Indicates if the elements should be added as sibling (true) or child (false) to the overlay
325
295
  * @param {sap.ui.dt.ElementOverlay} oOverlay - Elements will be added in relation (sibling/parent) to this overlay
326
- * @returns {object/undefined} - Object with all "add/reveal" action relevant data collected or undefined if no actions available
296
+ * @returns {object|undefined} - Object with all "add/reveal" action relevant data collected or undefined if no actions available
327
297
  */
328
298
  ActionExtractor.getActionsOrUndef = function(bSibling, oOverlay) {
329
299
  const sSiblingOrChild = bSibling ? "asSibling" : "asChild";
@@ -342,7 +312,7 @@ sap.ui.define([
342
312
  *
343
313
  * @returns {Promise<object>} Reveal action data
344
314
  */
345
- ActionExtractor._getRevealActions = function(bSibling, oSourceElementOverlay, oPlugin, oDesignTime) {
315
+ ActionExtractor._getRevealActions = async function(bSibling, oSourceElementOverlay, oPlugin, oDesignTime) {
346
316
  if (bIsSyncRegistered) {
347
317
  bIsSyncRegistered = false;
348
318
  oDesignTime.attachEventOnce("synced", function() {
@@ -371,19 +341,17 @@ sap.ui.define([
371
341
  }).map(function(oAggregationOverlay) {
372
342
  return oAggregationOverlay.getAggregationName();
373
343
  });
374
- return aAggregationNames.reduce(function(oPreviousPromise, sAggregationName) {
344
+ const mAggregatedReveal = await aAggregationNames.reduce(function(oPreviousPromise, sAggregationName) {
375
345
  return oPreviousPromise.then(function(mReveal) {
376
346
  return getRevealActionFromAggregations(aParents, mReveal, sAggregationName, aAggregationNames, oPlugin);
377
347
  });
378
- }, Promise.resolve({}))
379
- .then(function(mAggregatedReveal) {
380
- if (bSibling) {
381
- mRevealCache[mParents.parentOverlay.getId()] = mAggregatedReveal;
382
- }
383
- return mAggregatedReveal;
384
- });
348
+ }, Promise.resolve({}));
349
+ if (bSibling) {
350
+ mRevealCache[mParents.parentOverlay.getId()] = mAggregatedReveal;
351
+ }
352
+ return mAggregatedReveal;
385
353
  }
386
- return Promise.resolve({});
354
+ return {};
387
355
  };
388
356
 
389
357
  /**
@@ -415,4 +383,4 @@ sap.ui.define([
415
383
  };
416
384
 
417
385
  return ActionExtractor;
418
- });
386
+ });
@@ -1,13 +1,12 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-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
  sap.ui.define([
7
7
  "sap/ui/base/ManagedObject",
8
8
  "sap/ui/core/Element",
9
9
  "sap/ui/core/Fragment",
10
- "sap/ui/core/Lib",
11
10
  "sap/ui/model/json/JSONModel",
12
11
  "sap/ui/model/Filter",
13
12
  "sap/ui/model/FilterOperator",
@@ -18,7 +17,6 @@ sap.ui.define([
18
17
  ManagedObject,
19
18
  Element,
20
19
  Fragment,
21
- Lib,
22
20
  JSONModel,
23
21
  Filter,
24
22
  FilterOperator,
@@ -34,13 +32,13 @@ sap.ui.define([
34
32
  * @class Context - Dialog for available Fields in Runtime Authoring
35
33
  * @extends sap.ui.base.ManagedObject
36
34
  * @author SAP SE
37
- * @version 1.131.1
35
+ * @version 1.132.1
38
36
  * @constructor
39
37
  * @private
40
38
  * @since 1.44
41
39
  * @alias sap.ui.rta.plugin.additionalElements.AddElementsDialog
42
40
  */
43
- var AddElementsDialog = ManagedObject.extend("sap.ui.rta.plugin.additionalElements.AddElementsDialog", {
41
+ const AddElementsDialog = ManagedObject.extend("sap.ui.rta.plugin.additionalElements.AddElementsDialog", {
44
42
  metadata: {
45
43
  library: "sap.ui.rta",
46
44
  properties: {
@@ -59,7 +57,7 @@ sap.ui.define([
59
57
  }
60
58
  });
61
59
 
62
- var oRTAResourceModel;
60
+ let oRTAResourceModel;
63
61
 
64
62
  /**
65
63
  * Initialize the Dialog
@@ -124,11 +122,10 @@ sap.ui.define([
124
122
  * Close the dialog.
125
123
  * @returns {Promise} a Promise that resolves (to nothing) once the dialog is loaded and closed
126
124
  */
127
- AddElementsDialog.prototype._submitDialog = function() {
128
- return this._oDialogPromise.then(function(oDialog) {
129
- oDialog.close();
130
- this._fnResolveOnDialogConfirm();
131
- }.bind(this));
125
+ AddElementsDialog.prototype._submitDialog = async function() {
126
+ const oDialog = await this._oDialogPromise;
127
+ oDialog.close();
128
+ this._fnResolveOnDialogConfirm();
132
129
  // indicate that the dialog has been closed and the selected fields (if any) are to be added to the UI
133
130
  };
134
131
 
@@ -188,8 +185,8 @@ sap.ui.define([
188
185
  */
189
186
  AddElementsDialog.prototype._resortList = function() {
190
187
  this._bDescendingSortOrder = !this._bDescendingSortOrder;
191
- var oBinding = this._oList.getBinding("items");
192
- var aSorter = [];
188
+ const oBinding = this._oList.getBinding("items");
189
+ const aSorter = [];
193
190
  aSorter.push(new Sorter("label", this._bDescendingSortOrder));
194
191
  oBinding.sort(aSorter);
195
192
  };
@@ -201,15 +198,15 @@ sap.ui.define([
201
198
  * @private
202
199
  */
203
200
  AddElementsDialog.prototype._updateModelFilter = function(oEvent) {
204
- var sValue = oEvent.getParameter("newValue");
205
- var oBinding = this._oList.getBinding("items");
201
+ const sValue = oEvent.getParameter("newValue");
202
+ const oBinding = this._oList.getBinding("items");
206
203
  if ((typeof sValue) === "string") {
207
- var oFilterLabel = new Filter("label", FilterOperator.Contains, sValue);
208
- var oOriginalLabelFilter = new Filter("originalLabel", FilterOperator.Contains, sValue);
209
- var oParentPropertyNameFilter = new Filter("parentPropertyName", FilterOperator.Contains, sValue);
210
- var oDuplicateNameFilter = new Filter("duplicateName", FilterOperator.EQ, true);
211
- var oParentNameFilter = new Filter({ filters: [oParentPropertyNameFilter, oDuplicateNameFilter], and: true });
212
- var oFilterLabelOrInfo = new Filter({ filters: [oFilterLabel, oOriginalLabelFilter, oParentNameFilter], and: false });
204
+ const oFilterLabel = new Filter("label", FilterOperator.Contains, sValue);
205
+ const oOriginalLabelFilter = new Filter("originalLabel", FilterOperator.Contains, sValue);
206
+ const oParentPropertyNameFilter = new Filter("parentPropertyName", FilterOperator.Contains, sValue);
207
+ const oDuplicateNameFilter = new Filter("duplicateName", FilterOperator.EQ, true);
208
+ const oParentNameFilter = new Filter({ filters: [oParentPropertyNameFilter, oDuplicateNameFilter], and: true });
209
+ const oFilterLabelOrInfo = new Filter({ filters: [oFilterLabel, oOriginalLabelFilter, oParentNameFilter], and: false });
213
210
  oBinding.filter([oFilterLabelOrInfo]);
214
211
  } else {
215
212
  oBinding.filter([]);
@@ -228,19 +225,19 @@ sap.ui.define([
228
225
  });
229
226
  };
230
227
 
231
- AddElementsDialog.prototype.setTitle = function(sTitle) {
228
+ AddElementsDialog.prototype.setTitle = async function(sTitle) {
232
229
  ManagedObject.prototype.setProperty.call(this, "title", sTitle, true);
233
- this._oDialogPromise.then(function(oDialog) {
234
- oDialog.setTitle(sTitle);
235
- });
230
+ const oDialog = await this._oDialogPromise;
231
+ oDialog.setTitle(sTitle);
236
232
  };
237
233
 
238
234
  /**
239
235
  * Sets the information for the extensibility menu button items
240
236
  *
241
- * @param {string} sButtonText - Text for the extensibility MenuButton
242
- * @param {string} sButtonTooltip - Tooltip for the extensibility MenuButton
243
- * @param {object[]} aExtensibilityOptions - Options available on the extensibility MenuButton
237
+ * @param {object} oExtensibilityInfo - Information for the extensibility menu button
238
+ * @param {string} oExtensibilityInfo.UITexts.buttonText - Text for the extensibility MenuButton
239
+ * @param {string} oExtensibilityInfo.UITexts.tooltip - Tooltip for the extensibility MenuButton
240
+ * @param {object[]} oExtensibilityInfo.UITexts.options - Options available on the extensibility MenuButton
244
241
  * @public
245
242
  */
246
243
  AddElementsDialog.prototype.setExtensibilityOptions = function(oExtensibilityInfo) {
@@ -286,7 +283,7 @@ sap.ui.define([
286
283
  // clear old values from last run
287
284
  this._removeExtensionDataTexts();
288
285
 
289
- var aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
286
+ const aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
290
287
  if (aContexts && aContexts.length > 0) {
291
288
  aContexts.forEach(function(oContext) {
292
289
  aBusinessContextTexts.push({
@@ -313,9 +310,9 @@ sap.ui.define([
313
310
  * @private
314
311
  */
315
312
  AddElementsDialog.prototype._removeExtensionDataTexts = function() {
316
- var aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
313
+ const aBusinessContextTexts = this._oDialogModel.getObject("/businessContextTexts");
317
314
  aBusinessContextTexts.splice(1);
318
315
  };
319
316
 
320
317
  return AddElementsDialog;
321
- });
318
+ });