@openui5/sap.ui.rta 1.136.4 → 1.139.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 (182) hide show
  1. package/README.md +1 -1
  2. package/REUSE.toml +8 -29
  3. package/THIRDPARTY.txt +72 -90
  4. package/package.json +7 -7
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +1 -1
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +90 -127
  8. package/src/sap/ui/rta/Utils.js +1 -1
  9. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +5 -4
  10. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  11. package/src/sap/ui/rta/command/AddIFrame.js +12 -5
  12. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  13. package/src/sap/ui/rta/command/AddXML.js +1 -1
  14. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  15. package/src/sap/ui/rta/command/AnnotationCommand.js +1 -1
  16. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  17. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  18. package/src/sap/ui/rta/command/Combine.js +1 -1
  19. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  20. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  21. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  23. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  24. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  25. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  26. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  27. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  28. package/src/sap/ui/rta/command/ExtendControllerCommand.js +1 -1
  29. package/src/sap/ui/rta/command/FlexCommand.js +2 -3
  30. package/src/sap/ui/rta/command/LREPSerializer.js +2 -85
  31. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  32. package/src/sap/ui/rta/command/ManifestCommand.js +1 -1
  33. package/src/sap/ui/rta/command/Move.js +1 -1
  34. package/src/sap/ui/rta/command/Property.js +1 -1
  35. package/src/sap/ui/rta/command/Remove.js +1 -1
  36. package/src/sap/ui/rta/command/Rename.js +1 -1
  37. package/src/sap/ui/rta/command/Resize.js +1 -1
  38. package/src/sap/ui/rta/command/Reveal.js +1 -1
  39. package/src/sap/ui/rta/command/Settings.js +1 -1
  40. package/src/sap/ui/rta/command/Split.js +1 -1
  41. package/src/sap/ui/rta/command/Stack.js +115 -87
  42. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  43. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  44. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  46. package/src/sap/ui/rta/command/manifest/AddLibrary.js +1 -1
  47. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  48. package/src/sap/ui/rta/library.js +2 -2
  49. package/src/sap/ui/rta/messagebundle.properties +39 -57
  50. package/src/sap/ui/rta/messagebundle_ar.properties +7 -31
  51. package/src/sap/ui/rta/messagebundle_bg.properties +8 -32
  52. package/src/sap/ui/rta/messagebundle_ca.properties +8 -32
  53. package/src/sap/ui/rta/messagebundle_cnr.properties +7 -31
  54. package/src/sap/ui/rta/messagebundle_cs.properties +7 -31
  55. package/src/sap/ui/rta/messagebundle_cy.properties +8 -32
  56. package/src/sap/ui/rta/messagebundle_da.properties +8 -32
  57. package/src/sap/ui/rta/messagebundle_de.properties +6 -30
  58. package/src/sap/ui/rta/messagebundle_el.properties +8 -32
  59. package/src/sap/ui/rta/messagebundle_en.properties +8 -32
  60. package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -32
  61. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +29 -48
  62. package/src/sap/ui/rta/messagebundle_es.properties +8 -32
  63. package/src/sap/ui/rta/messagebundle_es_MX.properties +15 -39
  64. package/src/sap/ui/rta/messagebundle_et.properties +8 -32
  65. package/src/sap/ui/rta/messagebundle_fi.properties +8 -32
  66. package/src/sap/ui/rta/messagebundle_fr.properties +9 -33
  67. package/src/sap/ui/rta/messagebundle_fr_CA.properties +8 -32
  68. package/src/sap/ui/rta/messagebundle_hi.properties +7 -31
  69. package/src/sap/ui/rta/messagebundle_hr.properties +8 -32
  70. package/src/sap/ui/rta/messagebundle_hu.properties +8 -32
  71. package/src/sap/ui/rta/messagebundle_id.properties +9 -33
  72. package/src/sap/ui/rta/messagebundle_it.properties +8 -32
  73. package/src/sap/ui/rta/messagebundle_iw.properties +7 -31
  74. package/src/sap/ui/rta/messagebundle_ja.properties +8 -32
  75. package/src/sap/ui/rta/messagebundle_kk.properties +9 -33
  76. package/src/sap/ui/rta/messagebundle_ko.properties +8 -32
  77. package/src/sap/ui/rta/messagebundle_lt.properties +8 -32
  78. package/src/sap/ui/rta/messagebundle_lv.properties +8 -32
  79. package/src/sap/ui/rta/messagebundle_mk.properties +8 -32
  80. package/src/sap/ui/rta/messagebundle_ms.properties +8 -32
  81. package/src/sap/ui/rta/messagebundle_nl.properties +7 -31
  82. package/src/sap/ui/rta/messagebundle_no.properties +8 -32
  83. package/src/sap/ui/rta/messagebundle_pl.properties +8 -32
  84. package/src/sap/ui/rta/messagebundle_pt.properties +8 -32
  85. package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -32
  86. package/src/sap/ui/rta/messagebundle_ro.properties +8 -32
  87. package/src/sap/ui/rta/messagebundle_ru.properties +8 -32
  88. package/src/sap/ui/rta/messagebundle_sh.properties +7 -31
  89. package/src/sap/ui/rta/messagebundle_sk.properties +8 -32
  90. package/src/sap/ui/rta/messagebundle_sl.properties +8 -32
  91. package/src/sap/ui/rta/messagebundle_sr.properties +7 -31
  92. package/src/sap/ui/rta/messagebundle_sv.properties +8 -32
  93. package/src/sap/ui/rta/messagebundle_th.properties +8 -32
  94. package/src/sap/ui/rta/messagebundle_tr.properties +8 -32
  95. package/src/sap/ui/rta/messagebundle_uk.properties +8 -32
  96. package/src/sap/ui/rta/messagebundle_vi.properties +9 -33
  97. package/src/sap/ui/rta/messagebundle_zh_CN.properties +8 -32
  98. package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -32
  99. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  100. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +3 -2
  101. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  102. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  103. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  104. package/src/sap/ui/rta/plugin/CreateContainer.js +57 -35
  105. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  106. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  107. package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +3 -2
  108. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  109. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  110. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  111. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  112. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  113. package/src/sap/ui/rta/plugin/Selection.js +14 -7
  114. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  115. package/src/sap/ui/rta/plugin/Split.js +1 -1
  116. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +11 -1
  118. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  120. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  121. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  122. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +16 -3
  123. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +1 -1
  124. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +1 -1
  125. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +3 -3
  126. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  127. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +256 -203
  128. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +28 -75
  129. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +72 -17
  130. package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
  131. package/src/sap/ui/rta/plugin/rename/RenameDialog.fragment.xml +2 -2
  132. package/src/sap/ui/rta/plugin/rename/RenameDialog.js +41 -23
  133. package/src/sap/ui/rta/service/Action.js +1 -1
  134. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  135. package/src/sap/ui/rta/service/Outline.js +1 -1
  136. package/src/sap/ui/rta/service/Property.js +1 -1
  137. package/src/sap/ui/rta/service/Selection.js +1 -1
  138. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  139. package/src/sap/ui/rta/themes/base/AddIFrame.less +23 -33
  140. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +4 -2
  141. package/src/sap/ui/rta/toolbar/Adaptation.js +16 -3
  142. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  143. package/src/sap/ui/rta/toolbar/Fiori.js +2 -7
  144. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  145. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  147. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  148. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  149. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  150. package/src/sap/ui/rta/util/Animation.js +4 -6
  151. package/src/sap/ui/rta/util/BindingsExtractor.js +44 -53
  152. package/src/sap/ui/rta/util/PluginManager.js +6 -6
  153. package/src/sap/ui/rta/util/PopupManager.js +90 -109
  154. package/src/sap/ui/rta/util/ReloadManager.js +53 -98
  155. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  156. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  157. package/src/sap/ui/rta/util/adaptationStarter.js +59 -80
  158. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +3 -3
  159. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  160. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +5 -4
  161. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -4
  162. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +13 -25
  163. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +5 -7
  164. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +9 -9
  165. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +5 -5
  166. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +8 -8
  167. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +5 -5
  168. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +5 -5
  169. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +2 -2
  170. package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +22 -5
  171. package/src/sap/ui/rta/util/guidedTour/TourMarker.fragment.xml +1 -1
  172. package/src/sap/ui/rta/util/guidedTour/content/GeneralTour.js +1 -1
  173. package/src/sap/ui/rta/util/hasStableId.js +11 -19
  174. package/src/sap/ui/rta/util/showMessageBox.js +15 -15
  175. package/src/sap/ui/rta/util/validateFlexEnabled.js +35 -34
  176. package/src/sap/ui/rta/util/validateStableIds.js +22 -31
  177. package/src/sap/ui/rta/util/validateText.js +7 -7
  178. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +34 -9
  179. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +2 -6
  180. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +1 -0
  181. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +4 -4
  182. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +8 -22
@@ -5,50 +5,83 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/base/ManagedObject",
8
+ "sap/base/util/restricted/_curry",
9
9
  "sap/m/InstanceManager",
10
- "sap/ui/dt/Overlay",
11
- "sap/ui/dt/OverlayRegistry",
12
- "sap/ui/fl/Utils",
10
+ "sap/ui/base/ManagedObject",
13
11
  "sap/ui/core/Component",
14
- "sap/ui/core/ComponentContainer",
15
- "sap/ui/core/Element",
16
12
  "sap/ui/dt/util/ZIndexManager",
17
- "sap/m/Dialog",
18
- "sap/m/Popover",
19
- "sap/base/util/restricted/_curry"
13
+ "sap/ui/dt/Overlay",
14
+ "sap/ui/dt/OverlayRegistry",
15
+ "sap/ui/fl/Utils"
20
16
  ], function(
21
- ManagedObject,
17
+ _curry,
22
18
  InstanceManager,
23
- Overlay,
24
- OverlayRegistry,
25
- flUtils,
19
+ ManagedObject,
26
20
  Component,
27
- ComponentContainer,
28
- Element,
29
21
  ZIndexManager,
30
- Dialog,
31
- Popover,
32
- _curry
22
+ Overlay,
23
+ OverlayRegistry,
24
+ FlUtils
33
25
  ) {
34
26
  "use strict";
35
27
 
36
- var FOCUS_EVENT_NAMES = {
28
+ const FOCUS_EVENT_NAMES = {
37
29
  add: "_activateFocusHandle",
38
30
  remove: "_deactivateFocusHandle"
39
31
  };
40
32
 
33
+ // TODO harmonize with FlUtils.getAppComponentForControl, todos#9
34
+ function getAppComponentForControl(oControl) {
35
+ let oComponent;
36
+ let oAppComponent;
37
+
38
+ if (oControl.isA("sap.ui.core.Component")) {
39
+ oComponent = oControl;
40
+ } else {
41
+ oComponent = getComponentForControl(oControl);
42
+ }
43
+
44
+ if (oComponent) {
45
+ oAppComponent = FlUtils.getAppComponentForControl(oComponent);
46
+ }
47
+ return oAppComponent;
48
+ }
49
+
50
+ function getComponentForControl(oControl) {
51
+ let oComponent;
52
+ let oRootComponent;
53
+ let oParentControl;
54
+ if (oControl) {
55
+ oComponent = Component.getOwnerComponentFor(oControl);
56
+ if (
57
+ !oComponent
58
+ && typeof oControl.getParent === "function"
59
+ && oControl.getParent()?.isA("sap.ui.core.Element")
60
+ ) {
61
+ oParentControl = oControl.getParent();
62
+ } else if (oComponent) {
63
+ oParentControl = oComponent;
64
+ }
65
+
66
+ if (oParentControl) {
67
+ oRootComponent = getComponentForControl(oParentControl);
68
+ }
69
+ }
70
+
71
+ return oRootComponent || oComponent;
72
+ }
73
+
41
74
  /**
42
75
  * Constructor for a new sap.ui.rta.util.PopupManager
43
76
  * @extends sap.ui.base.ManagedObject
44
77
  * @author SAP SE
45
- * @version 1.136.4
78
+ * @version 1.139.0
46
79
  * @constructor
47
80
  * @private
48
81
  * @since 1.48
49
82
  * @alias sap.ui.rta.util.PopupManager
50
83
  */
51
- var PopupManager = ManagedObject.extend("sap.ui.rta.util.PopupManager", {
84
+ const PopupManager = ManagedObject.extend("sap.ui.rta.util.PopupManager", {
52
85
  metadata: {
53
86
  properties: {
54
87
  rta: "any"
@@ -120,20 +153,17 @@ sap.ui.define([
120
153
  * @public
121
154
  */
122
155
  PopupManager.prototype.getCategorizedOpenPopups = function() {
123
- var aOpenDialogs;
124
- var aOpenPopovers;
125
-
126
156
  // check if dialogs are already open when RTA is started
127
- aOpenDialogs = InstanceManager.getOpenDialogs();
157
+ const aOpenDialogs = InstanceManager.getOpenDialogs();
128
158
  // separate adaptable dialogs from all supported dialogs
129
- var oCategorizedDialogs = this._getValidatedPopups(aOpenDialogs);
159
+ const oCategorizedDialogs = this._getValidatedPopups(aOpenDialogs);
130
160
 
131
161
  // check if popovers are already open when RTA is started
132
- aOpenPopovers = InstanceManager.getOpenPopovers();
162
+ const aOpenPopovers = InstanceManager.getOpenPopovers();
133
163
  // separate adaptable popovers from all supported popovers
134
- var oCategorizedPopovers = this._getValidatedPopups(aOpenPopovers);
164
+ const oCategorizedPopovers = this._getValidatedPopups(aOpenPopovers);
135
165
 
136
- var oOpenPopups = {
166
+ const oOpenPopups = {
137
167
  aDialogs: oCategorizedDialogs.relevant,
138
168
  aPopovers: oCategorizedPopovers.relevant,
139
169
  aAllSupportedPopups: oCategorizedDialogs.allSupported.concat(oCategorizedPopovers.allSupported)
@@ -150,12 +180,12 @@ sap.ui.define([
150
180
  * @private
151
181
  */
152
182
  PopupManager.prototype._getValidatedPopups = function(aOpenPopups) {
153
- var aAllSupportedPopups = [];
183
+ const aAllSupportedPopups = [];
154
184
  aOpenPopups = aOpenPopups.filter(function(oPopupElement) {
155
185
  if (this._isPopupAdaptable(oPopupElement)) {
156
186
  aAllSupportedPopups.push(oPopupElement);
157
187
  return true;
158
- } else if (oPopupElement instanceof Dialog) {
188
+ } else if (oPopupElement.isA("sap.m.Dialog")) {
159
189
  // all modal type popups are supported for which modal property is later turned true, when in Adaptation mode
160
190
  aAllSupportedPopups.push(oPopupElement);
161
191
  }
@@ -180,8 +210,8 @@ sap.ui.define([
180
210
  return Array.isArray(oPopup.getContent())
181
211
  ? oPopup.getContent().some(
182
212
  function(oContent) {
183
- if (oContent instanceof ComponentContainer) {
184
- return this.oRtaRootAppComponent === this._getAppComponentForControl(Component.getComponentById(oContent.getComponent()));
213
+ if (oContent.isA("sap.ui.core.ComponentContainer")) {
214
+ return this.oRtaRootAppComponent === getAppComponentForControl(Component.getComponentById(oContent.getComponent()));
185
215
  }
186
216
  return undefined;
187
217
  }.bind(this))
@@ -196,7 +226,7 @@ sap.ui.define([
196
226
  * @private
197
227
  */
198
228
  PopupManager.prototype._isSupportedPopup = function(oPopup) {
199
- return (oPopup instanceof Dialog || oPopup instanceof Popover);
229
+ return (oPopup.isA("sap.m.Dialog") || oPopup.isA("sap.m.Popover"));
200
230
  };
201
231
 
202
232
  /**
@@ -208,10 +238,10 @@ sap.ui.define([
208
238
  PopupManager.prototype.setRta = function(oRta) {
209
239
  if (oRta && oRta._oDesignTime) {
210
240
  this.setProperty("rta", oRta);
211
- var oRootControl = oRta.getRootControlInstance();
212
- this.oRtaRootAppComponent = this._getAppComponentForControl(oRootControl);
241
+ const oRootControl = oRta.getRootControlInstance();
242
+ this.oRtaRootAppComponent = getAppComponentForControl(oRootControl);
213
243
  // listener for RTA mode change
214
- var fnModeChange = this._onModeChange.bind(this);
244
+ const fnModeChange = this._onModeChange.bind(this);
215
245
  oRta.attachModeChanged(fnModeChange);
216
246
  this._overrideInstanceFunctions();
217
247
  }
@@ -236,8 +266,8 @@ sap.ui.define([
236
266
  * @param {sap.ui.base.Event} oEvent The Event triggered by the mode change
237
267
  */
238
268
  PopupManager.prototype._onModeChange = function(oEvent) {
239
- var sNewMode = oEvent.getParameters().mode;
240
- var fnApplyFocusAndSetModal = function(sMode, oPopover) {
269
+ const sNewMode = oEvent.getParameters().mode;
270
+ const fnApplyFocusAndSetModal = function(sMode, oPopover) {
241
271
  if (sMode === "navigation") {
242
272
  // add focus handlers
243
273
  oPopover.oPopup[this._getFocusEventName("add")]();
@@ -319,7 +349,7 @@ sap.ui.define([
319
349
  PopupManager.prototype._overrideAddFunctions = function(fnOriginalFunction) {
320
350
  return function(...aArgs) {
321
351
  const [oPopupElement] = aArgs;
322
- var vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
352
+ const vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
323
353
  if (this._isSupportedPopup(oPopupElement)) {
324
354
  if (this._isPopupAdaptable(oPopupElement)
325
355
  && this.getRta()._oDesignTime) {
@@ -327,7 +357,7 @@ sap.ui.define([
327
357
  // PopupManager internal method
328
358
  oPopupElement.attachEventOnce("afterOpen", this.fireOpen, this);
329
359
  this._setModal(true, oPopupElement);
330
- } else if (!(oPopupElement instanceof Popover)) {
360
+ } else if (!(oPopupElement.isA("sap.m.Popover"))) {
331
361
  // for all popups which are non-adaptable and non-popovers
332
362
  this._setModal(true, oPopupElement);
333
363
  }
@@ -345,7 +375,7 @@ sap.ui.define([
345
375
  * @private
346
376
  */
347
377
  PopupManager.prototype._setModal = function(bSetModal, oPopupElement) {
348
- var bOriginalModalState = this._oModalState.get(oPopupElement.oPopup);
378
+ const bOriginalModalState = this._oModalState.get(oPopupElement.oPopup);
349
379
  if (typeof bOriginalModalState !== "boolean" && bSetModal && this.getRta().getMode() !== "navigation") {
350
380
  this._oModalState.set(oPopupElement.oPopup, oPopupElement.oPopup.getModal());
351
381
  if (this._isPopupAdaptable(oPopupElement)) {
@@ -363,7 +393,7 @@ sap.ui.define([
363
393
 
364
394
  PopupManager.prototype._applyPopupAttributes = function(mPropertyBag) {
365
395
  // check if popups are open
366
- var oRelevantPopups = this.getCategorizedOpenPopups();
396
+ const oRelevantPopups = this.getCategorizedOpenPopups();
367
397
 
368
398
  ["aDialogs", "aPopovers"].forEach(function(sKey) {
369
399
  if (oRelevantPopups[sKey].length > 0) {
@@ -392,9 +422,9 @@ sap.ui.define([
392
422
  * @private
393
423
  */
394
424
  PopupManager.prototype._applyPopupPatch = function(oPopupElement) {
395
- var oOverlayContainer = Overlay.getOverlayContainer();
396
- var {oPopup} = oPopupElement;
397
- var aAutoCloseAreas = [
425
+ const oOverlayContainer = Overlay.getOverlayContainer();
426
+ const {oPopup} = oPopupElement;
427
+ const aAutoCloseAreas = [
398
428
  oPopup.oContent.getDomRef(),
399
429
  oOverlayContainer
400
430
  ].concat(
@@ -402,8 +432,8 @@ sap.ui.define([
402
432
  );
403
433
 
404
434
  if (this.getRta().getShowToolbars()) {
405
- var oRtaToolbar = this.getRta().getToolbar();
406
- var bVisible = !!oRtaToolbar.getVisible();
435
+ const oRtaToolbar = this.getRta().getToolbar();
436
+ const bVisible = !!oRtaToolbar.getVisible();
407
437
  // Check if RTA is not started -> toolbar is not visible
408
438
  if (!bVisible) {
409
439
  this.getRta().attachEventOnce("start", function() {
@@ -419,7 +449,7 @@ sap.ui.define([
419
449
  // cases when onAfterRendering is called after this function - app inside popup
420
450
  this.fnOriginalPopupOnAfterRendering ||= oPopup.onAfterRendering;
421
451
  oPopup.onAfterRendering = function(...aArgs) {
422
- var vOriginalReturn = this.fnOriginalPopupOnAfterRendering.apply(oPopup, aArgs);
452
+ const vOriginalReturn = this.fnOriginalPopupOnAfterRendering.apply(oPopup, aArgs);
423
453
  oPopup[this._getFocusEventName("remove")]();
424
454
  return vOriginalReturn;
425
455
  }.bind(this);
@@ -455,7 +485,7 @@ sap.ui.define([
455
485
  PopupManager.prototype._overrideRemoveFunctions = function(fnOriginalFunction) {
456
486
  return function(...aArgs) {
457
487
  const [oPopupElement] = aArgs;
458
- var vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
488
+ const vOriginalReturn = fnOriginalFunction.apply(InstanceManager, aArgs);
459
489
  if (this._isSupportedPopup(oPopupElement)) {
460
490
  if (this._isPopupAdaptable(oPopupElement)
461
491
  && this.getRta()._oDesignTime) {
@@ -470,60 +500,6 @@ sap.ui.define([
470
500
  }.bind(this);
471
501
  };
472
502
 
473
- /**
474
- * Returns the app component of the passed control is exists
475
- *
476
- * @param {sap.ui.core.Control} oControl Control object
477
- * @returns {object|undefined} component object if exists
478
- * @private
479
- */
480
- PopupManager.prototype._getAppComponentForControl = function(oControl) {
481
- var oComponent;
482
- var oAppComponent;
483
-
484
- if (oControl instanceof Component) {
485
- oComponent = oControl;
486
- } else {
487
- oComponent = this._getComponentForControl(oControl);
488
- }
489
-
490
- if (oComponent) {
491
- oAppComponent = flUtils.getAppComponentForControl(oComponent);
492
- }
493
- return oAppComponent;
494
- };
495
-
496
- /**
497
- * Returns the component of the passed control, navigating through control tree, except if parent is sap.ui.core.UIArea
498
- *
499
- * @param {sap.ui.core.Control} oControl Control object
500
- * @returns {object|undefined} component object if exists
501
- * @private
502
- */
503
- PopupManager.prototype._getComponentForControl = function(oControl) {
504
- var oComponent;
505
- var oRootComponent;
506
- var oParentControl;
507
- if (oControl) {
508
- oComponent = Component.getOwnerComponentFor(oControl);
509
- if (
510
- !oComponent
511
- && typeof oControl.getParent === "function"
512
- && oControl.getParent() instanceof Element
513
- ) {
514
- oParentControl = oControl.getParent();
515
- } else if (oComponent) {
516
- oParentControl = oComponent;
517
- }
518
-
519
- if (oParentControl) {
520
- oRootComponent = this._getComponentForControl(oParentControl);
521
- }
522
- }
523
-
524
- return oRootComponent || oComponent;
525
- };
526
-
527
503
  /**
528
504
  * Create popup overlays
529
505
  *
@@ -534,7 +510,7 @@ sap.ui.define([
534
510
  if (!oEvent) {
535
511
  return;
536
512
  }
537
- var oPopupElement = (oEvent instanceof Element) ? oEvent : oEvent.getSource();
513
+ const oPopupElement = oEvent.isA("sap.ui.base.Event") ? oEvent.getSource() : oEvent;
538
514
 
539
515
  // when application is opened in a popup, rootElement should not be added more than once
540
516
  if (
@@ -583,7 +559,7 @@ sap.ui.define([
583
559
  * @private
584
560
  */
585
561
  PopupManager.prototype._removePopupPatch = function(oPopupElement) {
586
- var {oPopup} = oPopupElement;
562
+ const {oPopup} = oPopupElement;
587
563
  oPopup[this._getFocusEventName("add")]();
588
564
  if (this.fnOriginalPopupOnAfterRendering) {
589
565
  oPopup.onAfterRendering = this.fnOriginalPopupOnAfterRendering;
@@ -591,7 +567,7 @@ sap.ui.define([
591
567
  };
592
568
 
593
569
  function checkPopupAncestorsAdaptation(oPopupElement) {
594
- if (!oPopupElement || oPopupElement instanceof Component) {
570
+ if (!oPopupElement || oPopupElement.isA("sap.ui.core.Component")) {
595
571
  return true;
596
572
  }
597
573
  if (!oPopupElement.isPopupAdaptationAllowed || oPopupElement.isPopupAdaptationAllowed()) {
@@ -601,10 +577,15 @@ sap.ui.define([
601
577
  }
602
578
 
603
579
  PopupManager.prototype._isPopupAdaptable = function(oPopupElement) {
604
- if (oPopupElement.isPopupAdaptationAllowed && !oPopupElement.isPopupAdaptationAllowed()) {
580
+ if (oPopupElement.isPopupAdaptationAllowed) {
581
+ return oPopupElement.isPopupAdaptationAllowed();
582
+ }
583
+ // the event is needed for the RTA integration
584
+ if (!oPopupElement.getMetadata().getEvents().afterOpen) {
605
585
  return false;
606
586
  }
607
- var oPopupAppComponent = this._getAppComponentForControl(oPopupElement);
587
+
588
+ const oPopupAppComponent = getAppComponentForControl(oPopupElement);
608
589
  if (
609
590
  (oPopupAppComponent && this.oRtaRootAppComponent === oPopupAppComponent)
610
591
  || this._isComponentInsidePopup(oPopupElement)
@@ -30,22 +30,17 @@ sap.ui.define([
30
30
  * @namespace sap.ui.rta.util.ReloadManager
31
31
  * @alias sap.ui.rta.util.ReloadManager
32
32
  * @since 1.104
33
- * @version 1.136.4
33
+ * @version 1.139.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
37
- var ReloadManager = {};
37
+ const ReloadManager = {};
38
38
 
39
- var mUShellServices = {};
40
- var mReloadMethods = {
41
- NOT_NEEDED: "NO_RELOAD",
42
- VIA_HASH: "CROSS_APP_NAVIGATION",
43
- RELOAD_PAGE: "HARD_RELOAD"
44
- };
39
+ let mUShellServices = {};
45
40
 
46
41
  function getReloadMessageOnStart(oReloadInfo) {
47
- var sReason;
48
- var bIsCustomerLayer = oReloadInfo.layer === Layer.CUSTOMER;
42
+ let sReason;
43
+ const bIsCustomerLayer = oReloadInfo.layer === Layer.CUSTOMER;
49
44
 
50
45
  if (oReloadInfo.hasHigherLayerChanges && oReloadInfo.isDraftAvailable) {
51
46
  sReason = bIsCustomerLayer ? "MSG_VIEWS_OR_PERSONALIZATION_AND_DRAFT_EXISTS" : "MSG_HIGHER_LAYER_CHANGES_AND_DRAFT_EXISTS";
@@ -62,7 +57,7 @@ sap.ui.define([
62
57
  }
63
58
 
64
59
  function getReloadMessageOnExit(oReloadInfo) {
65
- var bIsCustomerLayer = oReloadInfo.layer === Layer.CUSTOMER;
60
+ const bIsCustomerLayer = oReloadInfo.layer === Layer.CUSTOMER;
66
61
 
67
62
  if (oReloadInfo.hasHigherLayerChanges) {
68
63
  if (!bIsCustomerLayer) {
@@ -102,48 +97,44 @@ sap.ui.define([
102
97
  return undefined;
103
98
  }
104
99
 
105
- function handleReloadMessageBoxOnExit(oReloadReasons) {
106
- var sReason = getReloadMessageOnExit(oReloadReasons);
100
+ async function handleReloadMessageBoxOnExit(oReloadReasons) {
101
+ const sReason = getReloadMessageOnExit(oReloadReasons);
107
102
 
108
103
  if (sReason) {
109
- return Utils.showMessageBox("information", sReason, {
104
+ await Utils.showMessageBox("information", sReason, {
110
105
  titleKey: "HEADER_RELOAD_NEEDED"
111
106
  });
112
107
  }
113
- return Promise.resolve();
114
108
  }
115
109
 
116
- function triggerReloadOnStart(oReloadInfo, bVersioningEnabled, bDeveloperMode) {
117
- return Promise.resolve().then(function() {
118
- if (mUShellServices.Navigation && bVersioningEnabled) {
119
- // clears FlexState and triggers reloading of the flex data without blocking
120
- if (oReloadInfo.isDraftAvailable) {
121
- return VersionsAPI.loadDraftForApplication({
122
- control: oReloadInfo.selector,
123
- layer: oReloadInfo.layer,
124
- allContexts: oReloadInfo.allContexts,
125
- adaptationId: oReloadInfo.adaptationId
126
- });
127
- }
128
- return VersionsAPI.loadVersionForApplication({
110
+ async function triggerReloadOnStart(oReloadInfo) {
111
+ if (mUShellServices.Navigation && oReloadInfo.versioningEnabled) {
112
+ // clears FlexState and triggers reloading of the flex data without blocking
113
+ if (oReloadInfo.isDraftAvailable) {
114
+ await VersionsAPI.loadDraftForApplication({
115
+ control: oReloadInfo.selector,
116
+ layer: oReloadInfo.layer,
117
+ allContexts: oReloadInfo.allContexts,
118
+ adaptationId: oReloadInfo.adaptationId
119
+ });
120
+ } else {
121
+ await VersionsAPI.loadVersionForApplication({
129
122
  control: oReloadInfo.selector,
130
123
  layer: oReloadInfo.layer,
131
124
  allContexts: oReloadInfo.allContexts,
132
125
  adaptationId: oReloadInfo.adaptationId
133
126
  });
134
127
  }
135
- return undefined;
136
- }).then(function() {
137
- var sReason = getReloadMessageOnStart(oReloadInfo);
138
- // showing messages in visual editor is leading to blocked screen. In this case we should reload without message
139
- return bDeveloperMode ? undefined : Utils.showMessageBox("information", sReason);
140
- }).then(function() {
141
- ReloadManager.enableAutomaticStart(oReloadInfo.layer, oReloadInfo.selector);
142
- oReloadInfo.onStart = true;
143
- return ReloadManager.triggerReload(oReloadInfo);
144
- }).then(function() {
145
- return true;
146
- });
128
+ }
129
+ const sReason = getReloadMessageOnStart(oReloadInfo);
130
+ // showing messages in visual editor is leading to blocked screen. In this case we should reload without message
131
+ if (!oReloadInfo.developerMode) {
132
+ await Utils.showMessageBox("information", sReason);
133
+ }
134
+ ReloadManager.enableAutomaticStart(oReloadInfo.layer, oReloadInfo.selector);
135
+ oReloadInfo.onStart = true;
136
+ ReloadManager.triggerReload(oReloadInfo);
137
+ return true;
147
138
  }
148
139
 
149
140
  ReloadManager.setUShellServices = function(mPassedUShellServices) {
@@ -157,8 +148,8 @@ sap.ui.define([
157
148
  * @param {sap.ui.core.Control} oRootControl - Root control for which key user adaptation was started
158
149
  */
159
150
  ReloadManager.enableAutomaticStart = function(sLayer, oRootControl) {
160
- var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oRootControl});
161
- var vParameter = sFlexReference || true;
151
+ const sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oRootControl});
152
+ const vParameter = sFlexReference || true;
162
153
  window.sessionStorage.setItem(`sap.ui.rta.restart.${sLayer}`, vParameter);
163
154
  };
164
155
 
@@ -181,37 +172,12 @@ sap.ui.define([
181
172
  return !!window.sessionStorage.getItem(`sap.ui.rta.restart.${sLayer}`);
182
173
  };
183
174
 
184
- /**
185
- * Sets a flag in sessionStorage to indicate that the "What's New" dialog should not be shown after rta reload.
186
- */
187
- ReloadManager.setDontShowWhatsNewAfterReload = () => {
188
- window.sessionStorage.setItem("sap.ui.rta.whatsNew", true);
189
- };
190
-
191
- /**
192
- * Checks if the "What's New" dialog should be shown rta after reload.
193
- *
194
- * @returns {boolean} Returns true if the "What's New" dialog should be shown, false otherwise.
195
- */
196
- ReloadManager.getDontShowWhatsNewAfterReload = () => {
197
- return window.sessionStorage.getItem("sap.ui.rta.whatsNew");
198
- };
199
-
200
- /**
201
- * Removes the flag from sessionStorage that indicates the "What's New" dialog should not be shown after reload.
202
- */
203
- ReloadManager.removeDontShowWhatsNewAfterReload = () => {
204
- window.sessionStorage.removeItem("sap.ui.rta.whatsNew");
205
- };
206
-
207
175
  /**
208
176
  * Triggers the reload of the page. Can either be a soft reload inside the FLP or a hard reload.
209
177
  *
210
178
  * @param {object} oReloadInfo - Information needed for the reload
211
- * @param {sap.ui.fl.Layer} oReloadInfo.layer - Current layer
212
179
  * @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
213
180
  * @param {boolean} oReloadInfo.ignoreMaxLayerParameter - Indicates if the max layer parameter should be ignored
214
- * @param {string|object} oReloadInfo.parameters - The URL parameters to be modified
215
181
  * @param {string} oReloadInfo.versionSwitch - Indicates if we are in a version switch scenario
216
182
  * @param {string} oReloadInfo.version - Version we want to switch to
217
183
  * @param {string} oReloadInfo.removeVersionParameter - Indicates if version parameter should be removed
@@ -225,9 +191,7 @@ sap.ui.define([
225
191
  }
226
192
  if (FlUtils.getUshellContainer()) {
227
193
  mUShellServices.AppLifeCycle.reloadCurrentApp();
228
- }
229
- // standalone app always trigger hard reload
230
- if (!FlUtils.getUshellContainer() || oReloadInfo.triggerHardReload) {
194
+ } else {
231
195
  ReloadManager.reloadPage();
232
196
  }
233
197
  };
@@ -260,25 +224,20 @@ sap.ui.define([
260
224
  *
261
225
  * @return {Promise<boolean>} Resolving to <code>false</code> means that reload is not necessary
262
226
  */
263
- ReloadManager.handleReloadOnStart = function(mProperties) {
227
+ ReloadManager.handleReloadOnStart = async function(mProperties) {
264
228
  merge(mProperties, {
265
- hasHigherLayerChanges: false,
266
- isDraftAvailable: false,
267
229
  ignoreMaxLayerParameter: false,
268
- includeCtrlVariants: true,
269
- URLParsingService: mUShellServices.URLParsing
270
- });
271
- return ReloadInfoAPI.getReloadReasonsForStart(mProperties).then(function(oReloadInfo) {
272
- if (
273
- oReloadInfo.hasHigherLayerChanges
274
- || oReloadInfo.isDraftAvailable
275
- || oReloadInfo.allContexts
276
- || oReloadInfo.switchAdaptation
277
- ) {
278
- return triggerReloadOnStart(oReloadInfo, mProperties.versioningEnabled, mProperties.developerMode);
279
- }
280
- return undefined;
230
+ includeCtrlVariants: true
281
231
  });
232
+ const oReloadInfo = await ReloadInfoAPI.getReloadReasonsForStart(mProperties);
233
+ if (
234
+ oReloadInfo.hasHigherLayerChanges
235
+ || oReloadInfo.isDraftAvailable
236
+ || oReloadInfo.allContexts
237
+ ) {
238
+ return triggerReloadOnStart(merge(mProperties, oReloadInfo));
239
+ }
240
+ return undefined;
282
241
  };
283
242
 
284
243
  /**
@@ -290,21 +249,17 @@ sap.ui.define([
290
249
  * @param {boolean} mProperties.versioningEnabled - Whether versioning is enabled
291
250
  * @param {boolean} mProperties.isDraftAvailable - Whether a draft is available
292
251
  * @param {boolean} mProperties.activeVersion - Number of the active version
293
- * @param {Promise} mProperties.changesNeedReloadPromise - Resolves to whether any change needs a hard reload
252
+ * @param {Promise} mProperties.changesNeedReloadPromise - Resolves to whether any change needs a reload
294
253
  * @param {boolean} bSkipRestart - Stop key user adaptation without reloading the app in any way
295
254
  *
296
255
  * @return {Promise<object>} Resolving to an object containing information about whether a reload is needed and how to handle it
297
256
  */
298
- ReloadManager.checkReloadOnExit = function(mProperties) {
299
- return mProperties.changesNeedReloadPromise.then(function(bChangesNeedReload) {
300
- mProperties.changesNeedReload = bChangesNeedReload;
301
- mProperties.URLParsingService = mUShellServices.URLParsing;
302
- var oReloadInfo = ReloadInfoAPI.getReloadMethod(mProperties);
303
- return handleReloadMessageBoxOnExit(oReloadInfo).then(function() {
304
- oReloadInfo.triggerHardReload = oReloadInfo.reloadMethod === mReloadMethods.RELOAD_PAGE;
305
- return oReloadInfo;
306
- });
307
- });
257
+ ReloadManager.checkReloadOnExit = async function(mProperties) {
258
+ const bChangesNeedReload = await mProperties.changesNeedReloadPromise;
259
+ mProperties.changesNeedReload = bChangesNeedReload;
260
+ const oReloadInfo = ReloadInfoAPI.getReloadInfo(mProperties);
261
+ await handleReloadMessageBoxOnExit(oReloadInfo);
262
+ return oReloadInfo;
308
263
  };
309
264
 
310
265
  /**
@@ -314,7 +269,7 @@ sap.ui.define([
314
269
  * @param {boolean} oReloadInfo.hasHigherLayerChanges - Indicates if higher layer changes exist
315
270
  */
316
271
  ReloadManager.handleReloadOnExit = function(oReloadInfo) {
317
- if (oReloadInfo.reloadMethod !== mReloadMethods.NOT_NEEDED) {
272
+ if (oReloadInfo.reloadNeeded) {
318
273
  oReloadInfo.removeVersionParameter = true;
319
274
  ReloadManager.triggerReload(oReloadInfo);
320
275
  }
@@ -6,8 +6,7 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/ui/core/EventBus"
9
- ],
10
- function(
9
+ ], function(
11
10
  EventBus
12
11
  ) {
13
12
  "use strict";
@@ -19,12 +18,12 @@ function(
19
18
  *
20
19
  * @extends sap.ui.core.EventBus
21
20
  * @author SAP SE
22
- * @version 1.136.4
21
+ * @version 1.139.0
23
22
  * @private
24
23
  * @since 1.56.0
25
24
  * @alias sap.ui.rta.util.ServiceEventBus
26
25
  */
27
- var ServiceEventBus = EventBus.extend("sap.ui.rta.util.ServiceEventBus");
26
+ const ServiceEventBus = EventBus.extend("sap.ui.rta.util.ServiceEventBus");
28
27
 
29
28
  ServiceEventBus.prototype._callListener = function(fnCallback, oListener, sChannelId, sEventId, vData) {
30
29
  fnCallback.call(oListener, vData);
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  *
28
28
  * @extends sap.ui.base.ManagedObject
29
29
  * @author SAP SE
30
- * @version 1.136.4
30
+ * @version 1.139.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.121