@openui5/sap.ui.rta 1.113.0 → 1.115.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 (154) hide show
  1. package/.reuse/dep5 +0 -5
  2. package/THIRDPARTY.txt +1 -7
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +1 -1
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +156 -54
  7. package/src/sap/ui/rta/Utils.js +36 -2
  8. package/src/sap/ui/rta/appVariant/AppVariantManager.js +6 -5
  9. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  10. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  11. package/src/sap/ui/rta/command/AddXML.js +1 -1
  12. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  13. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  14. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  15. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  16. package/src/sap/ui/rta/command/Combine.js +1 -1
  17. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  18. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  19. package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -8
  20. package/src/sap/ui/rta/command/ControlVariantSave.js +5 -6
  21. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -10
  22. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -5
  23. package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -12
  24. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  25. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  26. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  27. package/src/sap/ui/rta/command/LREPSerializer.js +4 -2
  28. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  29. package/src/sap/ui/rta/command/Move.js +1 -1
  30. package/src/sap/ui/rta/command/Property.js +1 -1
  31. package/src/sap/ui/rta/command/Remove.js +1 -1
  32. package/src/sap/ui/rta/command/Rename.js +1 -1
  33. package/src/sap/ui/rta/command/Resize.js +1 -1
  34. package/src/sap/ui/rta/command/Reveal.js +1 -1
  35. package/src/sap/ui/rta/command/Settings.js +1 -1
  36. package/src/sap/ui/rta/command/Split.js +1 -1
  37. package/src/sap/ui/rta/command/Stack.js +1 -1
  38. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  39. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  40. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  41. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  42. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  43. package/src/sap/ui/rta/enablement/elementActionTest.js +93 -76
  44. package/src/sap/ui/rta/library.js +2 -2
  45. package/src/sap/ui/rta/messagebundle.properties +30 -2
  46. package/src/sap/ui/rta/messagebundle_ar.properties +16 -4
  47. package/src/sap/ui/rta/messagebundle_bg.properties +16 -4
  48. package/src/sap/ui/rta/messagebundle_ca.properties +16 -4
  49. package/src/sap/ui/rta/messagebundle_cs.properties +16 -4
  50. package/src/sap/ui/rta/messagebundle_cy.properties +16 -4
  51. package/src/sap/ui/rta/messagebundle_da.properties +16 -4
  52. package/src/sap/ui/rta/messagebundle_de.properties +16 -4
  53. package/src/sap/ui/rta/messagebundle_el.properties +16 -4
  54. package/src/sap/ui/rta/messagebundle_en.properties +14 -2
  55. package/src/sap/ui/rta/messagebundle_en_GB.properties +14 -2
  56. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +14 -2
  57. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -2
  58. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +14 -2
  59. package/src/sap/ui/rta/messagebundle_es.properties +16 -4
  60. package/src/sap/ui/rta/messagebundle_es_MX.properties +16 -4
  61. package/src/sap/ui/rta/messagebundle_et.properties +16 -4
  62. package/src/sap/ui/rta/messagebundle_fi.properties +16 -4
  63. package/src/sap/ui/rta/messagebundle_fr.properties +16 -4
  64. package/src/sap/ui/rta/messagebundle_fr_CA.properties +16 -4
  65. package/src/sap/ui/rta/messagebundle_hi.properties +16 -4
  66. package/src/sap/ui/rta/messagebundle_hr.properties +16 -4
  67. package/src/sap/ui/rta/messagebundle_hu.properties +16 -4
  68. package/src/sap/ui/rta/messagebundle_id.properties +16 -4
  69. package/src/sap/ui/rta/messagebundle_it.properties +16 -4
  70. package/src/sap/ui/rta/messagebundle_iw.properties +16 -4
  71. package/src/sap/ui/rta/messagebundle_ja.properties +33 -21
  72. package/src/sap/ui/rta/messagebundle_kk.properties +16 -4
  73. package/src/sap/ui/rta/messagebundle_ko.properties +20 -8
  74. package/src/sap/ui/rta/messagebundle_lt.properties +16 -4
  75. package/src/sap/ui/rta/messagebundle_lv.properties +16 -4
  76. package/src/sap/ui/rta/messagebundle_ms.properties +20 -8
  77. package/src/sap/ui/rta/messagebundle_nl.properties +16 -4
  78. package/src/sap/ui/rta/messagebundle_no.properties +16 -4
  79. package/src/sap/ui/rta/messagebundle_pl.properties +16 -4
  80. package/src/sap/ui/rta/messagebundle_pt.properties +16 -4
  81. package/src/sap/ui/rta/messagebundle_pt_PT.properties +16 -4
  82. package/src/sap/ui/rta/messagebundle_ro.properties +16 -4
  83. package/src/sap/ui/rta/messagebundle_ru.properties +16 -4
  84. package/src/sap/ui/rta/messagebundle_sh.properties +16 -4
  85. package/src/sap/ui/rta/messagebundle_sk.properties +16 -4
  86. package/src/sap/ui/rta/messagebundle_sl.properties +16 -4
  87. package/src/sap/ui/rta/messagebundle_sv.properties +16 -4
  88. package/src/sap/ui/rta/messagebundle_th.properties +17 -5
  89. package/src/sap/ui/rta/messagebundle_tr.properties +16 -4
  90. package/src/sap/ui/rta/messagebundle_uk.properties +16 -4
  91. package/src/sap/ui/rta/messagebundle_vi.properties +16 -4
  92. package/src/sap/ui/rta/messagebundle_zh_CN.properties +16 -4
  93. package/src/sap/ui/rta/messagebundle_zh_TW.properties +16 -4
  94. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  95. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  96. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  97. package/src/sap/ui/rta/plugin/CompVariant.js +6 -2
  98. package/src/sap/ui/rta/plugin/ControlVariant.js +4 -2
  99. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  100. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  101. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  102. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  103. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  104. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  105. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  106. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  107. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  108. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  109. package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
  110. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  111. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  112. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  113. package/src/sap/ui/rta/plugin/Split.js +1 -1
  114. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -22
  116. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  118. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  120. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  121. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +17 -13
  122. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  123. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -1
  124. package/src/sap/ui/rta/service/Action.js +1 -1
  125. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  126. package/src/sap/ui/rta/service/Outline.js +4 -1
  127. package/src/sap/ui/rta/service/Property.js +1 -1
  128. package/src/sap/ui/rta/service/Selection.js +1 -1
  129. package/src/sap/ui/rta/service/SupportTools.js +11 -1
  130. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +59 -20
  131. package/src/sap/ui/rta/toolbar/Adaptation.js +115 -14
  132. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  133. package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +24 -0
  134. package/src/sap/ui/rta/toolbar/Fiori.js +2 -2
  135. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  136. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  137. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  138. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  139. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +60 -36
  140. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +3 -15
  141. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +120 -33
  142. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +12 -10
  143. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  144. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
  145. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  146. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  147. package/src/sap/ui/rta/util/ReloadManager.js +32 -21
  148. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  149. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +42 -25
  150. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
  151. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +19 -12
  152. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
  153. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +67 -9
  154. package/src/sap/ui/rta/view/RemoveElementDialog.fragment.xml +1 -1
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  * Constructor for a new sap.ui.rta.util.PluginManager
69
69
  * @extends sap.ui.base.ManagedObject
70
70
  * @author SAP SE
71
- * @version 1.113.0
71
+ * @version 1.115.0
72
72
  * @constructor
73
73
  * @private
74
74
  * @since 1.86
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * Constructor for a new sap.ui.rta.util.PopupManager
43
43
  * @extends sap.ui.base.ManagedObject
44
44
  * @author SAP SE
45
- * @version 1.113.0
45
+ * @version 1.115.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @since 1.48
@@ -30,7 +30,7 @@ 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.113.0
33
+ * @version 1.115.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -77,7 +77,7 @@ sap.ui.define([
77
77
  sReason = "MSG_DRAFT_EXISTS";
78
78
  } else if (oReloadInfo.allContexts) {
79
79
  sReason = "MSG_RESTRICTED_CONTEXT_EXIST";
80
- } // TODO add app descr changes case for start?
80
+ }// TODO add app descr changes case for start?
81
81
  return sReason;
82
82
  }
83
83
 
@@ -94,6 +94,9 @@ sap.ui.define([
94
94
  if (oReloadInfo.allContexts) {
95
95
  return "MSG_RELOAD_WITH_PERSONALIZATION_AND_RESTRICTED_CONTEXT";
96
96
  }
97
+ if (oReloadInfo.switchEndUserAdaptation) {
98
+ return "MSG_RELOAD_WITH_PERSONALIZATION_AND_CONTEXT_BASED_ADAPTATION";
99
+ }
97
100
  return "MSG_RELOAD_WITH_PERSONALIZATION_AND_VIEWS";
98
101
  }
99
102
 
@@ -112,6 +115,10 @@ sap.ui.define([
112
115
  if (oReloadInfo.allContexts) {
113
116
  return "MSG_RELOAD_WITHOUT_ALL_CONTEXT";
114
117
  }
118
+
119
+ if (oReloadInfo.switchEndUserAdaptation) {
120
+ return "MSG_RELOAD_OTHER_CONTEXT_BASED_ADAPTATION";
121
+ }
115
122
  return undefined;
116
123
  }
117
124
 
@@ -127,31 +134,34 @@ sap.ui.define([
127
134
  }
128
135
 
129
136
  function triggerReloadOnStart(oReloadInfo, bVersioningEnabled, bDeveloperMode) {
130
- if (mUShellServices.CrossApplicationNavigation && bVersioningEnabled) {
131
- // clears FlexState and triggers reloading of the flex data without blocking
132
- if (oReloadInfo.isDraftAvailable) {
133
- VersionsAPI.loadDraftForApplication({
137
+ return Promise.resolve().then(function() {
138
+ if (mUShellServices.CrossApplicationNavigation && bVersioningEnabled) {
139
+ // clears FlexState and triggers reloading of the flex data without blocking
140
+ if (oReloadInfo.isDraftAvailable) {
141
+ return VersionsAPI.loadDraftForApplication({
142
+ control: oReloadInfo.selector,
143
+ layer: oReloadInfo.layer,
144
+ allContexts: oReloadInfo.allContexts,
145
+ adaptationId: oReloadInfo.adaptationId
146
+ });
147
+ }
148
+ return VersionsAPI.loadVersionForApplication({
134
149
  control: oReloadInfo.selector,
135
150
  layer: oReloadInfo.layer,
136
- allContexts: oReloadInfo.allContexts
137
- });
138
- } else {
139
- VersionsAPI.loadVersionForApplication({
140
- control: oReloadInfo.selector,
141
- layer: oReloadInfo.layer,
142
- allContexts: oReloadInfo.allContexts
151
+ allContexts: oReloadInfo.allContexts,
152
+ adaptationId: oReloadInfo.adaptationId
143
153
  });
144
154
  }
145
- }
146
- var sReason = getReloadMessageOnStart(oReloadInfo);
147
- // showing messages in visual editor is leading to blocked screen. In this case we should reload without message
148
- var pMessageBox = bDeveloperMode ? Promise.resolve() : Utils.showMessageBox("information", sReason);
149
- return pMessageBox.then(function() {
155
+ return undefined;
156
+ }).then(function() {
157
+ var sReason = getReloadMessageOnStart(oReloadInfo);
158
+ // showing messages in visual editor is leading to blocked screen. In this case we should reload without message
159
+ return bDeveloperMode ? undefined : Utils.showMessageBox("information", sReason);
160
+ }).then(function() {
150
161
  ReloadManager.enableAutomaticStart(oReloadInfo.layer, oReloadInfo.selector);
151
162
  oReloadInfo.onStart = true;
152
163
  return ReloadManager.triggerReload(oReloadInfo);
153
- })
154
- .then(function() {
164
+ }).then(function() {
155
165
  return true;
156
166
  });
157
167
  }
@@ -268,6 +278,7 @@ sap.ui.define([
268
278
  * @param {sap.ui.fl.Selector} mProperties.selector - Root control
269
279
  * @param {boolean} mProperties.versioningEnabled - Whether versioning is enabled
270
280
  * @param {boolean} mProperties.developerMode - Whether the developer mode is set
281
+ * @param {string} mProperties.adaptationId - Context-based adaptation ID of the currently displayed adaptation
271
282
  *
272
283
  * @return {Promise<boolean>} Resolving to <code>false</code> means that reload is not necessary
273
284
  */
@@ -280,7 +291,7 @@ sap.ui.define([
280
291
  URLParsingService: mUShellServices.URLParsing
281
292
  });
282
293
  return ReloadInfoAPI.getReloadReasonsForStart(mProperties).then(function(oReloadInfo) {
283
- if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts) {
294
+ if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts || oReloadInfo.switchAdaptation) {
284
295
  return triggerReloadOnStart(oReloadInfo, mProperties.versioningEnabled, mProperties.developerMode);
285
296
  }
286
297
  return undefined;
@@ -19,7 +19,7 @@ function(
19
19
  *
20
20
  * @extends sap.ui.core.EventBus
21
21
  * @author SAP SE
22
- * @version 1.113.0
22
+ * @version 1.115.0
23
23
  * @private
24
24
  * @since 1.56.0
25
25
  * @alias sap.ui.rta.util.ServiceEventBus
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
41
41
  * @author SAP SE
42
42
  * @since 1.84.0
43
- * @version 1.113.0
43
+ * @version 1.115.0
44
44
  * @private
45
45
  */
46
46
  var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -106,6 +106,8 @@ sap.ui.define([
106
106
  type: "object"
107
107
  }
108
108
  }
109
+ },
110
+ detailPopoverOpened: {
109
111
  }
110
112
  }
111
113
  },
@@ -140,8 +142,8 @@ sap.ui.define([
140
142
  constructor: function() {
141
143
  this._oDetailModel = new JSONModel();
142
144
  this._oDetailModel.setDefaultBindingMode("OneWay");
143
- this._fnHoverTrue = this._toggleHoverStyleClasses.bind(this, true);
144
- this._fnHoverFalse = this._toggleHoverStyleClasses.bind(this, false);
145
+ this._fnHoverTrue = this._setHoverStyleClasses.bind(this, true);
146
+ this._fnHoverFalse = this._setHoverStyleClasses.bind(this, false);
145
147
  Control.prototype.constructor.apply(this, arguments);
146
148
  // is needed to prevent that multiple events listeners are attached
147
149
  // to the same overlay because setVisible is called multiple times
@@ -149,14 +151,19 @@ sap.ui.define([
149
151
  }
150
152
  });
151
153
 
152
- function handleBrowserEventsOnElement(oElement, sEventHandler) {
153
- oElement[sEventHandler]("click", this._onSelect, this);
154
- oElement[sEventHandler]("tap", this._onSelect, this);
155
- oElement[sEventHandler]("keydown", this._onKeyDown, this);
156
- oElement[sEventHandler]("mouseout", this._fnHoverFalse);
157
- oElement[sEventHandler]("focusout", this._fnHoverFalse);
158
- oElement[sEventHandler]("mouseover", this._fnHoverTrue);
159
- oElement[sEventHandler]("focusin", this._fnHoverTrue);
154
+ function handleBrowserEventsOnOverlay(oOverlay, sEventHandler) {
155
+ oOverlay[sEventHandler]("click", this._onSelect, this);
156
+ oOverlay[sEventHandler]("tap", this._onSelect, this);
157
+ oOverlay[sEventHandler]("keydown", this._onKeyDown, this);
158
+ oOverlay[sEventHandler]("mouseover", this._fnHoverTrue);
159
+ oOverlay[sEventHandler]("focusin", this._fnHoverTrue);
160
+ }
161
+
162
+ // Hover/focus events are handled by the ChangeVisualization (because it can affect multiple indicators at once)
163
+ function handleBrowserEventsOnIndicator(oIndicator, sEventHandler) {
164
+ oIndicator[sEventHandler]("click", this._onSelect, this);
165
+ oIndicator[sEventHandler]("tap", this._onSelect, this);
166
+ oIndicator[sEventHandler]("keydown", this._onKeyDown, this);
160
167
  }
161
168
 
162
169
  function centerVertically(oIndicator) {
@@ -203,7 +210,6 @@ sap.ui.define([
203
210
  sDescriptionText = oDescription.descriptionText;
204
211
  sDescriptionTooltip = oDescription.descriptionTooltip || "";
205
212
  } else {
206
- sElementLabel = sElementLabel && "'" + sElementLabel + "'";
207
213
  var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
208
214
  var sChangeTextKey = (
209
215
  "TXT_CHANGEVISUALIZATION_CHANGE_"
@@ -258,7 +264,7 @@ sap.ui.define([
258
264
 
259
265
  ChangeIndicator.prototype.init = function() {
260
266
  this._iOldTabIndex = 0;
261
- handleBrowserEventsOnElement.call(this, this, "attachBrowserEvent");
267
+ handleBrowserEventsOnIndicator.call(this, this, "attachBrowserEvent");
262
268
  };
263
269
 
264
270
  ChangeIndicator.prototype.setVisible = function(bVisible) {
@@ -267,11 +273,11 @@ sap.ui.define([
267
273
  // needed because the change indicator cleanup is only triggered on save and exit
268
274
  if (oOverlay) {
269
275
  if (bVisible && !this._bEventAttachedToElement) {
270
- handleBrowserEventsOnElement.call(this, oOverlay, "attachBrowserEvent");
276
+ handleBrowserEventsOnOverlay.call(this, oOverlay, "attachBrowserEvent");
271
277
  this._bEventAttachedToElement = true;
272
278
  }
273
279
  if (!bVisible) {
274
- handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
280
+ handleBrowserEventsOnOverlay.call(this, oOverlay, "detachBrowserEvent");
275
281
  this._bEventAttachedToElement = false;
276
282
  if (this.getAggregation("_popover")) {
277
283
  this.getAggregation("_popover").destroy();
@@ -321,7 +327,7 @@ sap.ui.define([
321
327
  if (this._bScheduledForFocus) {
322
328
  // Element was supposed to be focused before rendering
323
329
  this.focus();
324
- this._toggleHoverStyleClasses(true);
330
+ this._setHoverStyleClasses(true);
325
331
  }
326
332
  };
327
333
 
@@ -335,9 +341,9 @@ sap.ui.define([
335
341
  if (this.getAggregation("_popover")) {
336
342
  this.getAggregation("_popover").destroy();
337
343
  }
338
- handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
344
+ handleBrowserEventsOnOverlay.call(this, oOverlay, "detachBrowserEvent");
339
345
  }
340
- handleBrowserEventsOnElement.call(this, this, "detachBrowserEvent");
346
+ handleBrowserEventsOnIndicator.call(this, this, "detachBrowserEvent");
341
347
  };
342
348
 
343
349
  ChangeIndicator.prototype.setChanges = function(aChanges) {
@@ -354,7 +360,7 @@ sap.ui.define([
354
360
  ChangeIndicator.prototype._onSelect = function(oEvent) {
355
361
  this.focus();
356
362
  oEvent.stopPropagation();
357
- this._openDetailPopover();
363
+ this._toggleDetailPopover();
358
364
  };
359
365
 
360
366
  ChangeIndicator.prototype._onKeyDown = function(oEvent) {
@@ -367,11 +373,19 @@ sap.ui.define([
367
373
  });
368
374
  };
369
375
 
370
- ChangeIndicator.prototype._toggleHoverStyleClasses = function(bAdd, oEvent) {
371
- if (oEvent) {
372
- oEvent.stopPropagation();
373
- oEvent.preventDefault();
374
- }
376
+ // When the detail popover is opened the overlay should be selected
377
+ ChangeIndicator.prototype.onDetailPopoverOpened = function(oEvent) {
378
+ oEvent.preventDefault();
379
+ this._setHoverStyleClasses(true);
380
+ };
381
+
382
+ ChangeIndicator.prototype.onIndicatorBrowserInteraction = function(bAdd, oEvent) {
383
+ oEvent.stopPropagation();
384
+ oEvent.preventDefault();
385
+ this._setHoverStyleClasses(bAdd);
386
+ };
387
+
388
+ ChangeIndicator.prototype._setHoverStyleClasses = function(bAdd) {
375
389
  var oOverlay = Core.byId(this.getOverlayId());
376
390
  if (oOverlay.getMetadata().getName() !== "sap.ui.dt.ElementOverlay") {
377
391
  return;
@@ -381,7 +395,7 @@ sap.ui.define([
381
395
  this[sFunctionName]("sapUiRtaHover");
382
396
  };
383
397
 
384
- ChangeIndicator.prototype._openDetailPopover = function() {
398
+ ChangeIndicator.prototype._toggleDetailPopover = function() {
385
399
  if (!this.getAggregation("_popover")) {
386
400
  //store the tabindex (tabindex will be removed on opening the popover)
387
401
  this._iOldTabIndex = this.getDomRef().getAttribute("tabindex");
@@ -394,13 +408,16 @@ sap.ui.define([
394
408
  this.setAggregation("_popover", oPopover);
395
409
  oPopover.setModel(this._oDetailModel, "details");
396
410
  oPopover.openBy(this);
411
+ this.fireDetailPopoverOpened();
397
412
  }.bind(this));
398
413
  } else {
399
414
  if (this.getAggregation("_popover").isOpen()) {
400
415
  return this.getAggregation("_popover").close();
401
416
  }
402
417
  this.getAggregation("_popover").openBy(this);
418
+ this.fireDetailPopoverOpened();
403
419
  }
420
+ return undefined;
404
421
  };
405
422
 
406
423
  ChangeIndicator.prototype._showDependentElements = function(oEvent) {
@@ -6,7 +6,7 @@
6
6
  showHeader="false"
7
7
  placement="Bottom"
8
8
  id="popover">
9
- <SegmentedButton selectedKey="satellite" width="420px" selectionChange=".onVersioningCategoryChange">
9
+ <SegmentedButton selectedKey="{visualizationModel>/changeState}" width="420px" selectionChange=".onVersioningCategoryChange">
10
10
  <items>
11
11
  <SegmentedButtonItem
12
12
  text="{i18n>BUT_CHANGEVISUALIZATION_VERSIONING_ALL}"
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
40
40
  * @author SAP SE
41
41
  * @since 1.86.0
42
- * @version 1.113.0
42
+ * @version 1.115.0
43
43
  * @private
44
44
  */
45
45
  var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
@@ -113,6 +113,7 @@ sap.ui.define([
113
113
  */
114
114
  ChangeIndicatorRegistry.prototype.getSelectorsWithRegisteredChanges = function () {
115
115
  var oChangeIndicators = {};
116
+ var sPreviousAffectedElementId;
116
117
 
117
118
  function addSelector (sSelectorId, sAffectedElementId, oChangeIndicatorData, bDependent) {
118
119
  if (oChangeIndicators[sSelectorId] === undefined) {
@@ -122,11 +123,13 @@ sap.ui.define([
122
123
  {
123
124
  id: oChangeIndicatorData.change.getId(),
124
125
  dependent: bDependent,
125
- affectedElementId: sAffectedElementId,
126
+ affectedElementId: sAffectedElementId || sPreviousAffectedElementId,
127
+ displayElementsKey: oChangeIndicatorData.visualizationInfo.displayElementIds.toString(),
126
128
  descriptionPayload: oChangeIndicatorData.visualizationInfo.descriptionPayload || {}
127
129
  },
128
130
  _omit(oChangeIndicatorData, ["visualizationInfo"])
129
131
  ));
132
+ sPreviousAffectedElementId = sAffectedElementId || sPreviousAffectedElementId;
130
133
  }
131
134
 
132
135
  values(this._oRegisteredChanges)
@@ -135,11 +138,6 @@ sap.ui.define([
135
138
  .forEach(function (sId, iIndex) {
136
139
  addSelector(sId, oChangeIndicatorData.visualizationInfo.affectedElementIds[iIndex], oChangeIndicatorData, false);
137
140
  });
138
-
139
- oChangeIndicatorData.visualizationInfo.dependentElementIds
140
- .forEach(function (sId) {
141
- addSelector(sId, sId, oChangeIndicatorData, true);
142
- });
143
141
  });
144
142
 
145
143
  return oChangeIndicators;
@@ -211,7 +209,7 @@ sap.ui.define([
211
209
  } else if (aDraftChangesList && aDraftChangesList.includes(oChange.getId())) {
212
210
  aChangeStates = [ChangeStates.DRAFT];
213
211
  } else {
214
- aChangeStates = [ChangeStates.ACTIVATED];
212
+ aChangeStates = [ChangeStates.ALL];
215
213
  }
216
214
 
217
215
  this._oRegisteredChanges[oChange.getId()] = {
@@ -242,12 +240,17 @@ sap.ui.define([
242
240
  return getInfoFromChangeHandler(oAppComponent, oChange)
243
241
  .then(function(oInfoFromChangeHandler) {
244
242
  var mVisualizationInfo = oInfoFromChangeHandler || {};
245
- var aAffectedElementIds = getSelectorIds(mVisualizationInfo.affectedControls || oChange.getSelector && [oChange.getSelector()] || []);
243
+ var aChangeSelectors = oChange.getSelector && oChange.getSelector() && [oChange.getSelector()];
244
+ var aAffectedElementSelectors = mVisualizationInfo.affectedControls || aChangeSelectors || [];
245
+ // If there is an original selector (e.g. control is inside a template),
246
+ // the indicator should be displayed on the host control (change selector)
247
+ var oChangeOriginalSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
248
+ var aDisplayElementSelectors = oChangeOriginalSelector ? aChangeSelectors : aAffectedElementSelectors;
246
249
 
247
250
  return {
248
- affectedElementIds: aAffectedElementIds,
251
+ affectedElementIds: getSelectorIds(aAffectedElementSelectors),
249
252
  dependentElementIds: getSelectorIds(mVisualizationInfo.dependentControls) || [],
250
- displayElementIds: getSelectorIds(mVisualizationInfo.displayControls) || aAffectedElementIds,
253
+ displayElementIds: getSelectorIds(mVisualizationInfo.displayControls || getSelectorIds(aDisplayElementSelectors)),
251
254
  updateRequired: mVisualizationInfo.updateRequired,
252
255
  descriptionPayload: mVisualizationInfo.descriptionPayload || {}
253
256
  };
@@ -255,7 +258,11 @@ sap.ui.define([
255
258
  }
256
259
 
257
260
  function getInfoFromChangeHandler(oAppComponent, oChange) {
258
- var oControl = oChange.getSelector && JsControlTreeModifier.bySelector(oChange.getSelector(), oAppComponent);
261
+ var oSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
262
+ if (!oSelector) {
263
+ oSelector = oChange.getSelector && oChange.getSelector();
264
+ }
265
+ var oControl = JsControlTreeModifier.bySelector(oSelector, oAppComponent);
259
266
  if (oControl) {
260
267
  return ChangesWriteAPI.getChangeHandler({
261
268
  changeType: oChange.getChangeType(),
@@ -11,7 +11,7 @@ sap.ui.define([
11
11
 
12
12
  var ChangeStates = {};
13
13
 
14
- ChangeStates.ACTIVATED = "activated";
14
+ ChangeStates.ALL = "all";
15
15
  ChangeStates.DRAFT = "draft";
16
16
  ChangeStates.DIRTY = "dirty";
17
17
 
@@ -12,6 +12,7 @@ sap.ui.define([
12
12
  "sap/ui/core/util/reflection/JsControlTreeModifier",
13
13
  "sap/ui/core/Control",
14
14
  "sap/ui/dt/OverlayRegistry",
15
+ "sap/ui/dt/OverlayUtil",
15
16
  "sap/ui/dt/ElementUtil",
16
17
  "sap/ui/fl/write/api/PersistenceWriteAPI",
17
18
  "sap/ui/fl/Layer",
@@ -30,6 +31,7 @@ sap.ui.define([
30
31
  JsControlTreeModifier,
31
32
  Control,
32
33
  OverlayRegistry,
34
+ OverlayUtil,
33
35
  ElementUtil,
34
36
  PersistenceWriteAPI,
35
37
  Layer,
@@ -53,7 +55,7 @@ sap.ui.define([
53
55
  }
54
56
  }
55
57
 
56
- function _isOverlayVisible(oOverlay) {
58
+ function _isOverlayInvisible(oOverlay) {
57
59
  return !oOverlay || !oOverlay.getDomRef() || !oOverlay.isVisible();
58
60
  }
59
61
 
@@ -65,7 +67,7 @@ sap.ui.define([
65
67
  * @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
66
68
  * @author SAP SE
67
69
  * @since 1.84.0
68
- * @version 1.113.0
70
+ * @version 1.115.0
69
71
  * @private
70
72
  */
71
73
  var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
@@ -106,9 +108,10 @@ sap.ui.define([
106
108
  }), "i18n");
107
109
 
108
110
  this._oChangeVisualizationModel = new JSONModel({
109
- active: this.getIsActive()
111
+ active: this.getIsActive(),
112
+ changeState: ChangeStates.ALL
110
113
  });
111
- this._oChangeVisualizationModel.setDefaultBindingMode("OneWay");
114
+ this._oChangeVisualizationModel.setDefaultBindingMode("TwoWay");
112
115
  this._sSelectedChangeCategory = ChangeCategories.ALL;
113
116
  this._bSetModeChanged = false;
114
117
 
@@ -176,7 +179,11 @@ sap.ui.define([
176
179
  ChangeVisualization.prototype._determineChangeVisibility = function(aRegisteredIndependentChanges, aAllRelevantChanges, sVisualizedChangeState) {
177
180
  function filterRelevantChanges(aChanges) {
178
181
  return aChanges.filter(function(oChange) {
179
- if (!sVisualizedChangeState || sVisualizedChangeState === "all" || oChange.changeStates.includes(sVisualizedChangeState)) {
182
+ if (
183
+ !sVisualizedChangeState ||
184
+ sVisualizedChangeState === ChangeStates.ALL ||
185
+ oChange.changeStates.includes(sVisualizedChangeState)
186
+ ) {
180
187
  return true;
181
188
  }
182
189
  return false;
@@ -206,7 +213,7 @@ sap.ui.define([
206
213
 
207
214
  if (!aAllRelevantChangeIds.includes(oChange.change.getId())) {
208
215
  aHiddenChanges.push(oChange);
209
- } else if (_isOverlayVisible(oOverlay)) {
216
+ } else if (_isOverlayInvisible(oOverlay)) {
210
217
  aHiddenChanges.push(oChange);
211
218
  } else {
212
219
  aVisualizedChanges.push(oChange);
@@ -492,13 +499,14 @@ sap.ui.define([
492
499
  ChangeVisualization.prototype._updateChangeIndicators = function() {
493
500
  var oSelectors = this._oChangeIndicatorRegistry.getSelectorsWithRegisteredChanges();
494
501
  var oIndicators = {};
502
+ this._mDisplayElementsKeyMap = {};
495
503
  Object.keys(oSelectors).forEach(function(sSelectorId) {
496
504
  var aChangesOnIndicator = oSelectors[sSelectorId];
497
505
  var aRelevantChanges = this._filterRelevantChanges(oSelectors[sSelectorId]);
498
506
  var oOverlay = OverlayRegistry.getOverlay(sSelectorId);
499
507
  if (!oOverlay) {
500
508
  // When the selector has no Overlay, check if there is a relevant container Overlay
501
- // e.g. when a SmartForm group is removed
509
+ // e.g. change on a SmartForm group (Selector: parent Form; Relevant Container: SmartForm)
502
510
  aChangesOnIndicator.some(function(oChange) {
503
511
  var oElementOverlay = OverlayRegistry.getOverlay(oChange.affectedElementId);
504
512
  var oRelevantContainer = oElementOverlay && oElementOverlay.getRelevantContainer();
@@ -509,7 +517,7 @@ sap.ui.define([
509
517
  return false;
510
518
  });
511
519
  }
512
- if (_isOverlayVisible(oOverlay)) {
520
+ if (_isOverlayInvisible(oOverlay)) {
513
521
  // Change is not visible
514
522
  return undefined;
515
523
  }
@@ -524,6 +532,14 @@ sap.ui.define([
524
532
  var sOverlayId = oOverlay.getId();
525
533
  if (!oChangeIndicator) {
526
534
  this._createChangeIndicator(oOverlay, sSelectorId);
535
+ // Assumption: all changes on an indicator affect the same elements
536
+ var sDisplayElementsKey = aChangesOnIndicator[0].displayElementsKey;
537
+ // This map is built to collect indicators with the same display elements (e.g. OP Section & AnchorBar)
538
+ if (!this._mDisplayElementsKeyMap[sDisplayElementsKey]) {
539
+ this._mDisplayElementsKeyMap[sDisplayElementsKey] = [sSelectorId];
540
+ } else {
541
+ this._mDisplayElementsKeyMap[sDisplayElementsKey].push(sSelectorId);
542
+ }
527
543
  } else if (oChangeIndicator.getOverlayId() !== sOverlayId) {
528
544
  // Overlay id might change, e.g. during undo/redo of dirty changes
529
545
  oChangeIndicator.setOverlayId(sOverlayId);
@@ -531,6 +547,8 @@ sap.ui.define([
531
547
  return undefined;
532
548
  }.bind(this));
533
549
 
550
+ this._registerIndicatorBrowserEvents();
551
+
534
552
  if (
535
553
  !deepEqual(
536
554
  oIndicators,
@@ -543,6 +561,46 @@ sap.ui.define([
543
561
  }
544
562
  };
545
563
 
564
+ // Multiple indicators can refer to the same control (e.g. OP Section + AnchorBar),
565
+ // so when one of them is hovered/focused the other must also react to show the connection between them
566
+ ChangeVisualization.prototype._registerIndicatorBrowserEvents = function() {
567
+ Object.keys(this._mDisplayElementsKeyMap).forEach(function(sDisplayElementsKey) {
568
+ var aIndicators = this._mDisplayElementsKeyMap[sDisplayElementsKey].map(function(sSelectorId) {
569
+ return this._oChangeIndicatorRegistry.getChangeIndicator(sSelectorId);
570
+ }.bind(this));
571
+
572
+ function onIndicatorInteraction(bActivate, oEvent) {
573
+ aIndicators.forEach(function(oIndicator) {
574
+ if (oIndicator.getVisible()) {
575
+ oIndicator.onIndicatorBrowserInteraction(bActivate, oEvent);
576
+ }
577
+ });
578
+ }
579
+
580
+ // When the detail popover is opened all connected overlays should be selected
581
+ function onDetailPopoverOpened(oEvent) {
582
+ aIndicators.forEach(function(oIndicator) {
583
+ if (oIndicator.getVisible()) {
584
+ oIndicator.onDetailPopoverOpened(oEvent);
585
+ }
586
+ });
587
+ }
588
+
589
+ aIndicators.forEach(function(oIndicator) {
590
+ oIndicator.attachBrowserEvent("mouseover", onIndicatorInteraction.bind(this, true));
591
+ oIndicator.attachBrowserEvent("focusin", onIndicatorInteraction.bind(this, true));
592
+ oIndicator.attachBrowserEvent("mouseout", onIndicatorInteraction.bind(this, false));
593
+ oIndicator.attachBrowserEvent("focusout", onIndicatorInteraction.bind(this, false));
594
+ oIndicator.attachDetailPopoverOpened(onDetailPopoverOpened.bind(this));
595
+
596
+ var oOverlay = Core.byId(oIndicator.getOverlayId());
597
+ // De-selection of connected overlays must happen when the hover/focus leaves the overlay
598
+ oOverlay.attachBrowserEvent("mouseout", onIndicatorInteraction.bind(this, false));
599
+ oOverlay.attachBrowserEvent("focusout", onIndicatorInteraction.bind(this, false));
600
+ });
601
+ }.bind(this));
602
+ };
603
+
546
604
  ChangeVisualization.prototype._filterRelevantChanges = function(aChangeVizInfo) {
547
605
  if (!Array.isArray(aChangeVizInfo)) {
548
606
  return aChangeVizInfo;
@@ -559,7 +617,7 @@ sap.ui.define([
559
617
  )
560
618
  && (
561
619
  !oRootData.changeState
562
- || oRootData.changeState === "all"
620
+ || oRootData.changeState === ChangeStates.ALL
563
621
  || oChangeVizInfo.changeStates.includes(oRootData.changeState)
564
622
  )
565
623
  );
@@ -3,7 +3,7 @@
3
3
  xmlns:sap.m="sap.m">
4
4
  <sap.m:Dialog class="sapUiRtaConfirmationDialog" verticalScrolling="false" title="{/titleText}" icon="{/icon}">
5
5
  <layout:VerticalLayout width="100%">
6
- <commons:TextView class="sapUiRtaConfirmationDialogText" text="{/messageText}" />
6
+ <sap.m:Text class="sapUiRtaConfirmationDialogText" text="{/messageText}" />
7
7
  </layout:VerticalLayout>
8
8
  <sap.m:beginButton>
9
9
  <sap.m:Button class="sapUiRtaConfirmationDialogRemoveButton" text="{/removeText}" press="removeField" />