@openui5/sap.ui.rta 1.128.0 → 1.130.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 (168) hide show
  1. package/THIRDPARTY.txt +2 -2
  2. package/package.json +6 -6
  3. package/src/sap/ui/rta/.library +1 -1
  4. package/src/sap/ui/rta/Client.js +1 -1
  5. package/src/sap/ui/rta/RuntimeAuthoring.js +36 -10
  6. package/src/sap/ui/rta/Utils.js +1 -1
  7. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  8. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
  9. package/src/sap/ui/rta/appVariant/Feature.js +2 -2
  10. package/src/sap/ui/rta/appVariant/Utils.js +3 -3
  11. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  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 +2 -2
  15. package/src/sap/ui/rta/command/Annotation.js +1 -1
  16. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  17. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  18. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  19. package/src/sap/ui/rta/command/Combine.js +1 -1
  20. package/src/sap/ui/rta/command/CommandFactory.js +10 -8
  21. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantConfigure.js +31 -14
  23. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  24. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +14 -15
  25. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  26. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  27. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  28. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  29. package/src/sap/ui/rta/command/FlexCommand.js +8 -5
  30. package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
  31. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  32. package/src/sap/ui/rta/command/Move.js +1 -1
  33. package/src/sap/ui/rta/command/Property.js +1 -1
  34. package/src/sap/ui/rta/command/Remove.js +1 -1
  35. package/src/sap/ui/rta/command/Rename.js +1 -1
  36. package/src/sap/ui/rta/command/Resize.js +1 -1
  37. package/src/sap/ui/rta/command/Reveal.js +1 -1
  38. package/src/sap/ui/rta/command/Settings.js +1 -1
  39. package/src/sap/ui/rta/command/Split.js +1 -1
  40. package/src/sap/ui/rta/command/Stack.js +1 -1
  41. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  42. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +6 -4
  43. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +7 -5
  44. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +5 -3
  46. package/src/sap/ui/rta/enablement/TestDelegate.js +4 -3
  47. package/src/sap/ui/rta/enablement/elementActionTest.js +9 -6
  48. package/src/sap/ui/rta/library.js +2 -2
  49. package/src/sap/ui/rta/messagebundle.properties +43 -1
  50. package/src/sap/ui/rta/messagebundle_ar.properties +21 -0
  51. package/src/sap/ui/rta/messagebundle_bg.properties +21 -0
  52. package/src/sap/ui/rta/messagebundle_ca.properties +21 -0
  53. package/src/sap/ui/rta/messagebundle_cnr.properties +22 -1
  54. package/src/sap/ui/rta/messagebundle_cs.properties +21 -0
  55. package/src/sap/ui/rta/messagebundle_cy.properties +21 -0
  56. package/src/sap/ui/rta/messagebundle_da.properties +22 -1
  57. package/src/sap/ui/rta/messagebundle_de.properties +21 -0
  58. package/src/sap/ui/rta/messagebundle_el.properties +21 -0
  59. package/src/sap/ui/rta/messagebundle_en.properties +21 -0
  60. package/src/sap/ui/rta/messagebundle_en_GB.properties +21 -0
  61. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +14 -2
  62. package/src/sap/ui/rta/messagebundle_es.properties +21 -0
  63. package/src/sap/ui/rta/messagebundle_es_MX.properties +21 -0
  64. package/src/sap/ui/rta/messagebundle_et.properties +21 -0
  65. package/src/sap/ui/rta/messagebundle_fi.properties +21 -0
  66. package/src/sap/ui/rta/messagebundle_fr.properties +21 -0
  67. package/src/sap/ui/rta/messagebundle_fr_CA.properties +22 -1
  68. package/src/sap/ui/rta/messagebundle_hi.properties +21 -0
  69. package/src/sap/ui/rta/messagebundle_hr.properties +21 -0
  70. package/src/sap/ui/rta/messagebundle_hu.properties +21 -0
  71. package/src/sap/ui/rta/messagebundle_id.properties +22 -1
  72. package/src/sap/ui/rta/messagebundle_it.properties +21 -0
  73. package/src/sap/ui/rta/messagebundle_iw.properties +21 -0
  74. package/src/sap/ui/rta/messagebundle_ja.properties +21 -0
  75. package/src/sap/ui/rta/messagebundle_kk.properties +21 -0
  76. package/src/sap/ui/rta/messagebundle_ko.properties +21 -0
  77. package/src/sap/ui/rta/messagebundle_lt.properties +21 -0
  78. package/src/sap/ui/rta/messagebundle_lv.properties +21 -0
  79. package/src/sap/ui/rta/messagebundle_mk.properties +23 -2
  80. package/src/sap/ui/rta/messagebundle_ms.properties +21 -0
  81. package/src/sap/ui/rta/messagebundle_nl.properties +21 -0
  82. package/src/sap/ui/rta/messagebundle_no.properties +21 -0
  83. package/src/sap/ui/rta/messagebundle_pl.properties +21 -0
  84. package/src/sap/ui/rta/messagebundle_pt.properties +21 -0
  85. package/src/sap/ui/rta/messagebundle_pt_PT.properties +21 -0
  86. package/src/sap/ui/rta/messagebundle_ro.properties +22 -1
  87. package/src/sap/ui/rta/messagebundle_ru.properties +21 -0
  88. package/src/sap/ui/rta/messagebundle_sh.properties +22 -1
  89. package/src/sap/ui/rta/messagebundle_sk.properties +21 -0
  90. package/src/sap/ui/rta/messagebundle_sl.properties +21 -0
  91. package/src/sap/ui/rta/messagebundle_sr.properties +22 -1
  92. package/src/sap/ui/rta/messagebundle_sv.properties +21 -0
  93. package/src/sap/ui/rta/messagebundle_th.properties +21 -0
  94. package/src/sap/ui/rta/messagebundle_tr.properties +21 -0
  95. package/src/sap/ui/rta/messagebundle_uk.properties +22 -1
  96. package/src/sap/ui/rta/messagebundle_vi.properties +22 -1
  97. package/src/sap/ui/rta/messagebundle_zh_CN.properties +21 -0
  98. package/src/sap/ui/rta/messagebundle_zh_TW.properties +21 -0
  99. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  100. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  101. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  102. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -20
  103. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  104. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  105. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  106. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  107. package/src/sap/ui/rta/plugin/Plugin.js +2 -3
  108. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  109. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  110. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  111. package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
  112. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  113. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  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 +1 -1
  118. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +0 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  120. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +70 -69
  121. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  122. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  123. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +9 -7
  124. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -1
  125. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  126. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -3
  127. package/src/sap/ui/rta/service/Action.js +4 -3
  128. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  129. package/src/sap/ui/rta/service/Outline.js +5 -9
  130. package/src/sap/ui/rta/service/Property.js +10 -11
  131. package/src/sap/ui/rta/service/Selection.js +1 -1
  132. package/src/sap/ui/rta/service/SupportTools.js +104 -45
  133. package/src/sap/ui/rta/themes/base/ChangeVisualization.less +2 -16
  134. package/src/sap/ui/rta/themes/base/WhatsNew.less +7 -0
  135. package/src/sap/ui/rta/themes/base/library.source.less +2 -1
  136. package/src/sap/ui/rta/themes/sap_hcb/ChangeVisualization.less +0 -1
  137. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +8 -0
  138. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +8 -1
  139. package/src/sap/ui/rta/toolbar/Adaptation.js +9 -2
  140. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  141. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  142. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  143. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  144. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  145. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +20 -18
  146. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +1 -1
  147. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  148. package/src/sap/ui/rta/toolbar/translation/Translation.js +3 -3
  149. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  150. package/src/sap/ui/rta/util/PluginManager.js +2 -2
  151. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  152. package/src/sap/ui/rta/util/ReloadManager.js +25 -2
  153. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  154. package/src/sap/ui/rta/util/ServiceManager.js +2 -2
  155. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -8
  156. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +10 -10
  157. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +11 -13
  158. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +59 -25
  159. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +111 -0
  160. package/src/sap/ui/rta/util/whatsNew/WhatsNewDialog.fragment.xml +81 -0
  161. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +82 -0
  162. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +75 -0
  163. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +73 -0
  164. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +138 -0
  165. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/AdvancedSettingsImage.png +0 -0
  166. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/FullIframe.png +0 -0
  167. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/MiniMenu.png +0 -0
  168. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/whatsNewImages/WhatsNewOverview.png +0 -0
@@ -5,11 +5,13 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/base/Log",
8
9
  "sap/ui/core/Element",
9
10
  "sap/ui/core/util/reflection/JsControlTreeModifier",
10
11
  "sap/ui/dt/OverlayRegistry",
11
12
  "sap/ui/fl/write/api/ChangesWriteAPI"
12
13
  ], function(
14
+ Log,
13
15
  Element,
14
16
  JsControlTreeModifier,
15
17
  OverlayRegistry,
@@ -28,17 +30,33 @@ sap.ui.define([
28
30
  * @name sap.ui.rta.service.SupportTools
29
31
  * @author SAP SE
30
32
  * @since 1.106
31
- * @version 1.128.0
33
+ * @version 1.130.0
32
34
  * @private
33
35
  * @ui5-restricted
34
36
  */
35
37
 
36
- var sHighlightClass = "sapUiFlexibilitySupportExtension_Selected";
38
+ const sHighlightClass = "sapUiFlexibilitySupportExtension_Selected";
39
+ const sGlobalVariableName = "ui5flex$temp";
40
+ window[sGlobalVariableName] = {}; // Container for all temp. variables
41
+ const aTempVariables = window[sGlobalVariableName];
42
+ let nTempVarCount = 0;
43
+
44
+ /**
45
+ * Logs a message to the console
46
+ * @param {string} sMessage - Message to be logged
47
+ * @param {object} oVariable - Variable containing Object to be logged
48
+ */
49
+ function logToConsole(sMessage, oVariable) {
50
+ console.log(`Flextention: ${sMessage}`); // eslint-disable-line no-console
51
+ if (oVariable) {
52
+ console.log(oVariable); // eslint-disable-line no-console
53
+ }
54
+ }
37
55
 
38
56
  function getPluginChangeHandler(oPlugin, oElementOverlay, oRta) {
39
- var oAction = oPlugin.getAction(oElementOverlay);
57
+ const oAction = oPlugin.getAction(oElementOverlay);
40
58
  if (oAction && oAction.changeType) {
41
- var oElement = oAction.changeOnRelevantContainer
59
+ const oElement = oAction.changeOnRelevantContainer
42
60
  ? oElementOverlay.getRelevantContainer()
43
61
  : oElementOverlay.getElement();
44
62
  return ChangesWriteAPI.getChangeHandler({
@@ -68,10 +86,10 @@ sap.ui.define([
68
86
  }
69
87
 
70
88
  function getPluginByName(oRta, sPluginName) {
71
- var bIsSibling = isPluginForSibling(sPluginName);
72
- var oAllPlugins = oRta.getPlugins();
89
+ const bIsSibling = isPluginForSibling(sPluginName);
90
+ const oAllPlugins = oRta.getPlugins();
73
91
  return Object.values(oAllPlugins).find(function(oPlugin) {
74
- var sName = oPlugin._retrievePluginName
92
+ const sName = oPlugin._retrievePluginName
75
93
  ? oPlugin._retrievePluginName(bIsSibling)
76
94
  : oPlugin.getMetadata().getName();
77
95
  return sName === sPluginName;
@@ -82,10 +100,10 @@ sap.ui.define([
82
100
  * Removes the highlighting of a non-selectable overlay
83
101
  */
84
102
  function removeSelectionHighlight() {
85
- var aHighlightedDom = document.getElementsByClassName(sHighlightClass);
86
- if (aHighlightedDom.length > 0) {
87
- aHighlightedDom[0].classList.remove(sHighlightClass);
88
- }
103
+ const aHighlightedDom = document.getElementsByClassName(sHighlightClass);
104
+ if (aHighlightedDom.length > 0) {
105
+ aHighlightedDom[0].classList.remove(sHighlightClass);
106
+ }
89
107
  }
90
108
 
91
109
  /*
@@ -102,11 +120,11 @@ sap.ui.define([
102
120
  * @returns {Promise<object|null>} Resolves with the overlay info
103
121
  */
104
122
  async function getOverlayInfo(oRta, mPayload) {
105
- var oOverlay = Element.getElementById(mPayload.overlayId);
123
+ const oOverlay = Element.getElementById(mPayload.overlayId);
106
124
  if (!oOverlay) {
107
125
  return null;
108
126
  }
109
- var oElement = oOverlay.getElement();
127
+ const oElement = oOverlay.getElement();
110
128
 
111
129
  // remove previous selection highlighting on clicking in the app
112
130
  if (oOverlay.getSelectable()) {
@@ -120,8 +138,8 @@ sap.ui.define([
120
138
  });
121
139
 
122
140
  const aPlugins = await Promise.all(aEditableByPlugins.map(async function(sPluginName) {
123
- var oInstance = getPluginByName(oRta, sPluginName);
124
- var bIsSibling = isPluginForSibling(sPluginName);
141
+ const oInstance = getPluginByName(oRta, sPluginName);
142
+ const bIsSibling = isPluginForSibling(sPluginName);
125
143
 
126
144
  const oChangeHandler = await getPluginChangeHandler(oInstance, oOverlay, oRta);
127
145
  return {
@@ -139,19 +157,36 @@ sap.ui.define([
139
157
  };
140
158
  }
141
159
 
142
- /*
160
+ /**
143
161
  * Prints the change handler to the console
144
- *
145
162
  * @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
146
163
  * @param {object} mPayload - Property Bag
147
- * @param {string} mPayload.overlayId
148
- * @param {string} mPayload.pluginName
164
+ * @param {string} mPayload.overlayId - ID of the Overlay
165
+ * @param {string} mPayload.pluginName - Name of the Plugin
149
166
  */
150
- function printChangeHandler(oRta, mPayload) {
151
- var oOverlay = Element.getElementById(mPayload.overlayId);
152
- var oPlugin = getPluginByName(oRta, mPayload.pluginName);
153
- getPluginChangeHandler(oPlugin, oOverlay, oRta)
154
- .then(console.log); // eslint-disable-line no-console
167
+ async function printChangeHandler(oRta, mPayload) {
168
+ const oOverlay = Element.getElementById(mPayload.overlayId);
169
+ const oPlugin = getPluginByName(oRta, mPayload.pluginName);
170
+ const oChangeHandler = await getPluginChangeHandler(oPlugin, oOverlay, oRta);
171
+ if (oPlugin) {
172
+ try {
173
+ const sPluginId = oPlugin.getId();
174
+ const sTempVariableName = aTempVariables[sPluginId] && aTempVariables[sPluginId].savedAs || `ui5flex$${nTempVarCount++}`;
175
+ aTempVariables[sPluginId] = {
176
+ description: `ChangeHandler for Plugin: ${sPluginId} - ${mPayload.pluginName}`,
177
+ changeHandler: oChangeHandler,
178
+ savedAs: sTempVariableName
179
+ };
180
+ const oVariable = aTempVariables[sPluginId];
181
+ window[sTempVariableName] = aTempVariables[sPluginId];
182
+ const sMessage = `ChangeHandler copied to global var ${sTempVariableName}, all vars are collected in global var ${sGlobalVariableName}`;
183
+ logToConsole(sMessage, oVariable);
184
+ } catch (oError) {
185
+ // Ignore errors
186
+ }
187
+ } else {
188
+ logToConsole("ChangeHandler could not be logged", undefined);
189
+ }
155
190
  }
156
191
 
157
192
  /*
@@ -163,7 +198,7 @@ sap.ui.define([
163
198
  */
164
199
  function closeContextMenu(oRta) {
165
200
  if (document.getElementsByClassName("sapUiDtContextMenu").length > 0) {
166
- var oContextMenu = oRta.getPlugins().contextMenu;
201
+ const oContextMenu = oRta.getPlugins().contextMenu;
167
202
  oContextMenu.oContextMenuControl.close();
168
203
  }
169
204
  }
@@ -179,7 +214,7 @@ sap.ui.define([
179
214
  */
180
215
  function changeOverlaySelection(oRta, mPayload) {
181
216
  // set new focus and enforce collecting overlay info data
182
- var oOverlay = Element.getElementById(mPayload.overlayId);
217
+ const oOverlay = Element.getElementById(mPayload.overlayId);
183
218
  oOverlay.focus();
184
219
  window.postMessage({
185
220
  type: "getOverlayInfo",
@@ -194,19 +229,18 @@ sap.ui.define([
194
229
  // close the contextmenu in UI-Adaptation
195
230
  closeContextMenu(oRta);
196
231
 
232
+ // remove current selection(s)
233
+ const aSelection = oRta.getSelection();
234
+ aSelection.forEach(function(oSelectedOverlay) {
235
+ oSelectedOverlay.setSelected(false);
236
+ });
237
+
197
238
  // set new selection (selectable overlays)
198
239
  if (oOverlay.getSelectable()) {
199
240
  oOverlay.setSelected(true);
200
- } else {
201
- // remove current selection(s)
202
- var aSelection = oRta.getSelection();
203
- aSelection.forEach(function(oSelectedOverlay) {
204
- oSelectedOverlay.setSelected(false);
205
- });
241
+ } else if (oOverlay.getDomRef()) {
206
242
  // highlight unselectable overlay
207
- if (oOverlay.getDomRef()) {
208
- oOverlay.getDomRef().classList.add("sapUiFlexibilitySupportExtension_Selected");
209
- }
243
+ oOverlay.getDomRef().classList.add("sapUiFlexibilitySupportExtension_Selected");
210
244
  }
211
245
  }
212
246
 
@@ -218,12 +252,12 @@ sap.ui.define([
218
252
  */
219
253
  function collectOverlayTableData() {
220
254
  // create an array with all relevant overlays (no aggregation overlays)
221
- var aAllOverlays = OverlayRegistry.getOverlays();
222
- var aRelevantOverlayList = [];
255
+ const aAllOverlays = OverlayRegistry.getOverlays();
256
+ const aRelevantOverlayList = [];
223
257
  aAllOverlays.forEach(function(oOverlay) {
224
258
  if (!oOverlay.isA("sap.ui.dt.AggregationOverlay")) {
225
- var sParentId = oOverlay.getParentElementOverlay()?.getId();
226
- var aChildren = oOverlay.getChildren().map(function(oChild) {
259
+ const sParentId = oOverlay.getParentElementOverlay()?.getId();
260
+ const aChildren = oOverlay.getChildren().map(function(oChild) {
227
261
  return oChild.getId();
228
262
  });
229
263
  aRelevantOverlayList.push({
@@ -240,13 +274,38 @@ sap.ui.define([
240
274
  return aRelevantOverlayList;
241
275
  }
242
276
 
277
+ /**
278
+ * Prints the design time metadata to the console
279
+ * @param {sap.ui.rta.RuntimeAuthoring} oRta - Instance of the RuntimeAuthoring class
280
+ * @param {object} mPayload - Property Bag
281
+ * @param {string} mPayload.overlayId - ID of the Overlay
282
+ */
243
283
  function printDesignTimeMetadata(oRta, mPayload) {
244
- var oOverlay = Element.getElementById(mPayload.overlayId);
245
- console.log(oOverlay.getDesignTimeMetadata().getData()); // eslint-disable-line no-console
284
+ const oOverlay = Element.getElementById(mPayload.overlayId);
285
+ const oMetaData = oOverlay.getDesignTimeMetadata().getData();
286
+ if (oMetaData) {
287
+ try {
288
+ const sMetaDataId = oOverlay.getDesignTimeMetadata().getId();
289
+ const sTempVariableName = aTempVariables[sMetaDataId] && aTempVariables[sMetaDataId].savedAs || `ui5flex$${nTempVarCount++}`;
290
+ aTempVariables[sMetaDataId] = {
291
+ description: `DesignTimeMetaData: ${sMetaDataId} for Overlay: ${mPayload.overlayId}`,
292
+ metaData: oMetaData,
293
+ savedAs: sTempVariableName
294
+ };
295
+ const oVariable = aTempVariables[sMetaDataId];
296
+ window[sTempVariableName] = aTempVariables[sMetaDataId];
297
+ const sMessage = `MetaData copied to global var ${sTempVariableName}, all vars are collected in global var ${sGlobalVariableName}`;
298
+ logToConsole(sMessage, oVariable);
299
+ } catch (oError) {
300
+ // Ignore errors
301
+ }
302
+ } else {
303
+ logToConsole("DesignTimeMetaData could not be logged", undefined);
304
+ }
246
305
  }
247
306
 
248
307
  // List of supported handlers
249
- var mHandlers = {
308
+ const mHandlers = {
250
309
  getOverlayInfo: {
251
310
  handler: getOverlayInfo,
252
311
  returnMessageType: "overlayInfo",
@@ -316,13 +375,13 @@ sap.ui.define([
316
375
  return;
317
376
  }
318
377
 
319
- var aHandler = Object.entries(mHandlers).find(function(aEntry) {
378
+ const aHandler = Object.entries(mHandlers).find(function(aEntry) {
320
379
  return (
321
380
  aEntry[0] === oEvent.data.type
322
381
  && aEntry[1].id === oEvent.data.id
323
382
  );
324
383
  });
325
- var mHandler = aHandler && aHandler[1];
384
+ const mHandler = aHandler && aHandler[1];
326
385
 
327
386
  if (mHandler) {
328
387
  Promise.resolve(mHandler.handler(oRta, oEvent.data.content))
@@ -339,7 +398,7 @@ sap.ui.define([
339
398
  }
340
399
 
341
400
  return function(oRta) {
342
- var fnOnMessageReceivedBound = onMessageReceived.bind(null, oRta);
401
+ const fnOnMessageReceivedBound = onMessageReceived.bind(null, oRta);
343
402
  window.addEventListener("message", fnOnMessageReceivedBound);
344
403
  oRta.attachEventOnce("stop", onRtaStop);
345
404
  onRtaStart();
@@ -1,7 +1,6 @@
1
1
  /******************************************************************
2
2
  Style of the RTA Change Visualization - base theme
3
3
  *******************************************************************/
4
- @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight: @sapUiChartPaletteSequentialHue1Light1; //#4880cb
5
4
  @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium: @sapUiChartPaletteSequentialHue1Dark1; //#1b57a7
6
5
  @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark: @sapUiChartPaletteSequentialHue11Dark2; //#0e4186
7
6
  @_sap_ui_rta_ChangeVisualization_OverlayBoxShadow: @sapUiUx3ToolPopupShadow; //0px 6px 12px 0px fade(black, 30);
@@ -16,21 +15,8 @@
16
15
  margin-left: 0.25rem;
17
16
  transition: width 0.3s, height 0.3s, box-shadow 0.3s;
18
17
  cursor: pointer;
19
-
20
- &.sapUiRtaChangeIndicatorColorLight {
21
- background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight;
22
- opacity: 0.6;
23
- }
24
-
25
- &.sapUiRtaChangeIndicatorColorMedium {
26
- background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium;
27
- opacity: 0.75;
28
- }
29
-
30
- &.sapUiRtaChangeIndicatorColorDark {
31
- background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark;
32
- opacity: 0.75;
33
- }
18
+ background-color: @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium;
19
+ opacity: 0.75;
34
20
 
35
21
  &.sapUiRtaChangeIndicatorVerticallyCentered {
36
22
  top: 50%;
@@ -0,0 +1,7 @@
1
+ /******************************************************************
2
+ Style of the RTA WhatsNew Dialog/Overview - base Theme
3
+ *******************************************************************/
4
+
5
+ .whatsNewImage {
6
+ border-radius: 1rem;
7
+ }
@@ -18,4 +18,5 @@
18
18
  @import "Toolbar.adaptation.less";
19
19
  @import "Toolbar.base.less";
20
20
  @import "Toolbar.fiori.less";
21
- @import "Toolbar.standalone.less";
21
+ @import "Toolbar.standalone.less";
22
+ @import "WhatsNew.less";
@@ -1,7 +1,6 @@
1
1
  /******************************************************************
2
2
  Style of the RTA Change Visualization - HCB theme
3
3
  *******************************************************************/
4
- @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorLight: lighten(@sapUiPositiveText, 10%); //#bbddbb
5
4
  @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorMedium: @sapUiCriticalText; //#ffab1d
6
5
  @_sap_ui_rta_ChangeVisualization_ChangeIndicatorColorDark: lighten(@sapUiChart8, 20%); //#dd8ec9
7
6
  @_sap_ui_rta_ChangeVisualization_OverlayOutline: @sapUiContentHelpColor; // #03b803
@@ -72,5 +72,13 @@
72
72
  visible="{= (${controls>/restore/visible} &amp;&amp; ((${controls>/modeSwitcher} === 'visualization') || (${controls>/modeSwitcher} === 'adaptation')))}"
73
73
  press=".restore"
74
74
  text="{i18n>BTN_RESTORE}" />
75
+ <MenuItem
76
+ id="sapUiRta_newFeaturesOverview"
77
+ icon="sap-icon://newspaper"
78
+ enabled="{controls>/newFeaturesOverview/enabled}"
79
+ visible="{controls>/newFeaturesOverview/visible}"
80
+ text="{i18n>BTN_WHATS_NEW_DIALOG_OVERVIEW}"
81
+ press=".openWhatsNewOverviewDialog"
82
+ ariaHasPopup="Dialog"/>
75
83
  </Menu>
76
84
  </core:FragmentDefinition>
@@ -109,7 +109,14 @@
109
109
  <Button
110
110
  id="sapUiRta_actionsMenu"
111
111
  icon="sap-icon://menu2"
112
- visible="{= ${controls>/modeSwitcher} === 'adaptation' &amp;&amp; (${controls>/translation/visible} || ${controls>/appVariantMenu/visible} || ${controls>/restore/visible})}"
112
+ visible="{=
113
+ ${controls>/modeSwitcher} === 'adaptation'
114
+ &amp;&amp; (
115
+ ${controls>/translation/visible}
116
+ || ${controls>/appVariantMenu/visible}
117
+ || ${controls>/restore/visible}
118
+ || ${controls>/newFeaturesOverview/visible}
119
+ )}"
113
120
  enabled="{controls>/actionsMenuButton/enabled}"
114
121
  type="Transparent"
115
122
  tooltip="{i18n>BTN_MENU}"
@@ -23,6 +23,7 @@ sap.ui.define([
23
23
  "sap/ui/rta/toolbar/contextBased/SaveAsAdaptation",
24
24
  "sap/ui/rta/toolbar/translation/Translation",
25
25
  "sap/ui/rta/toolbar/versioning/Versioning",
26
+ "sap/ui/rta/util/whatsNew/WhatsNewOverview",
26
27
  "sap/ui/rta/Utils"
27
28
  ], function(
28
29
  AdaptationRenderer,
@@ -43,6 +44,7 @@ sap.ui.define([
43
44
  SaveAsAdaptation,
44
45
  Translation,
45
46
  Versioning,
47
+ WhatsNewOverview,
46
48
  Utils
47
49
  ) {
48
50
  "use strict";
@@ -55,7 +57,7 @@ sap.ui.define([
55
57
  * @extends sap.ui.rta.toolbar.Base
56
58
  *
57
59
  * @author SAP SE
58
- * @version 1.128.0
60
+ * @version 1.130.0
59
61
  *
60
62
  * @constructor
61
63
  * @private
@@ -254,7 +256,8 @@ sap.ui.define([
254
256
  overviewForDeveloper: onOverviewForDeveloperPressed.bind(this),
255
257
  restore: this.eventHandler.bind(this, "Restore"),
256
258
  formatSaveAsEnabled,
257
- saveAs: onSaveAsPressed.bind(this)
259
+ saveAs: onSaveAsPressed.bind(this),
260
+ openWhatsNewOverviewDialog
258
261
  }
259
262
  }).then(function(oMenu) {
260
263
  oMenu.addStyleClass(Utils.getRtaStyleClassName());
@@ -472,6 +475,10 @@ sap.ui.define([
472
475
  AppVariantFeature.onGetOverview(true, this.getRtaInformation().flexSettings.layer);
473
476
  }
474
477
 
478
+ function openWhatsNewOverviewDialog() {
479
+ WhatsNewOverview.openWhatsNewOverviewDialog();
480
+ }
481
+
475
482
  Adaptation.prototype.getControl = function(sName) {
476
483
  var oControl = Element.getElementById(`${this.getId()}_fragment--sapUiRta_${sName}`);
477
484
  // Control is inside the ActionsMenu
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.m.HBox
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.128.0
36
+ * @version 1.130.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -32,7 +32,7 @@ function(
32
32
  * @extends sap.ui.rta.toolbar.Adaptation
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.128.0
35
+ * @version 1.130.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.128.0
23
+ * @version 1.130.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.m.OverflowToolbarButton
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.128.0
26
+ * @version 1.130.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.128.0
23
+ * @version 1.130.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -8,6 +8,7 @@
8
8
  sap.ui.define([
9
9
  "sap/base/i18n/Localization",
10
10
  "sap/base/util/restricted/_isEqual",
11
+ "sap/base/util/restricted/_union",
11
12
  "sap/base/Log",
12
13
  "sap/ui/base/ManagedObject",
13
14
  "sap/ui/core/Fragment",
@@ -22,6 +23,7 @@ sap.ui.define([
22
23
  ], function(
23
24
  Localization,
24
25
  _isEqual,
26
+ _union,
25
27
  Log,
26
28
  ManagedObject,
27
29
  Fragment,
@@ -263,43 +265,43 @@ sap.ui.define([
263
265
  }
264
266
 
265
267
  function onDropSelectedAdaptation(oEvent) {
266
- var oDraggedItem = oEvent.getParameter("draggedControl");
267
- var oDraggedItemContext = oDraggedItem.getBindingContext("contextBased");
268
+ const oDraggedItem = oEvent.getParameter("draggedControl");
269
+ const oDraggedItemContext = oDraggedItem.getBindingContext("contextBased");
268
270
  if (!oDraggedItemContext) {
269
271
  return;
270
272
  }
271
273
 
272
- var iNewRank = oRanking.Default;
273
- var oDroppedItem = oEvent.getParameter("droppedControl");
274
+ let iNewRank = oRanking.Default;
275
+ const oDroppedItem = oEvent.getParameter("droppedControl");
274
276
 
275
277
  if (oDroppedItem instanceof ColumnListItem) {
276
278
  // get the dropped row data
277
- var sDropPosition = oEvent.getParameter("dropPosition");
278
- var oDroppedItemContext = oDroppedItem.getBindingContext("contextBased");
279
- var iDroppedItemRank = oDroppedItemContext.getProperty("rank");
280
- var oDroppedTable = oDroppedItem.getParent();
281
- var iDroppedItemIndex = oDroppedTable.indexOfItem(oDroppedItem);
279
+ const sDropPosition = oEvent.getParameter("dropPosition");
280
+ const oDroppedItemContext = oDroppedItem.getBindingContext("contextBased");
281
+ const iDroppedItemRank = oDroppedItemContext.getProperty("rank");
282
+ const oDroppedTable = oDroppedItem.getParent();
283
+ const iDroppedItemIndex = oDroppedTable.indexOfItem(oDroppedItem);
282
284
  if (oDroppedItemContext === oDraggedItemContext) {
283
285
  return;
284
286
  }
285
287
  // find the new index of the dragged row depending on the drop position
286
- var iNewItemIndex = iDroppedItemIndex + (sDropPosition === "After" ? 1 : -1);
287
- var oNewItem = oDroppedTable.getItems()[iNewItemIndex];
288
+ const iNewItemIndex = iDroppedItemIndex + (sDropPosition === "After" ? 1 : -1);
289
+ const oNewItem = oDroppedTable.getItems()[iNewItemIndex];
288
290
  if (!oNewItem || iNewItemIndex === -1) {
289
291
  // dropped before the first row or after the last row
290
292
  iNewRank = iNewItemIndex === -1 ? 0.5 : oRanking[sDropPosition](iDroppedItemRank);
291
293
  } else {
292
294
  // dropped between first and the last row
293
- var oNewItemContext = oNewItem.getBindingContext("contextBased");
295
+ const oNewItemContext = oNewItem.getBindingContext("contextBased");
294
296
  iNewRank = oRanking.Between(iDroppedItemRank, oNewItemContext.getProperty("rank"));
295
297
  }
296
298
  }
297
299
  // set the rank property and update the model to refresh the bindings
298
300
  this.oAdaptationsModel.setProperty("rank", iNewRank, oDraggedItemContext);
299
301
  sortByRank(this.oAdaptationsModel);
300
- var oAllUpdatedAdaptations = Object.assign(
301
- this.oAdaptationsModel.getProperty("/allAdaptations"),
302
- this.oAdaptationsModel.getProperty("/adaptations")
302
+ const oAllUpdatedAdaptations = _union(
303
+ this.oAdaptationsModel.getProperty("/adaptations"),
304
+ this.oAdaptationsModel.getProperty("/allAdaptations")
303
305
  );
304
306
  this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
305
307
  enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
@@ -372,9 +374,9 @@ sap.ui.define([
372
374
  parameters: {priorities: aAdaptationPriorities}
373
375
  });
374
376
  }.bind(this)).then(function() {
375
- var oAllUpdatedAdaptations = Object.assign(
376
- this.oAdaptationsModel.getProperty("/allAdaptations"),
377
- this.oAdaptationsModel.getProperty("/adaptations")
377
+ const oAllUpdatedAdaptations = _union(
378
+ this.oAdaptationsModel.getProperty("/adaptations"),
379
+ this.oAdaptationsModel.getProperty("/allAdaptations")
378
380
  );
379
381
  this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
380
382
  onCloseDialog.call(this);
@@ -7,7 +7,7 @@
7
7
  draggable="true"
8
8
  contentWidth="830px"
9
9
  contentHeight="450px"
10
- setHorizontalScrolling="false"
10
+ horizontalScrolling="false"
11
11
  title="{i18n>MANAGE_ADAPTATIONS_DIALOG_HEADER}">
12
12
  <Table id="manageAdaptationsTable"
13
13
  showNoData="false"
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @class
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.128.0
48
+ * @version 1.130.0
49
49
  *
50
50
  * @constructor
51
51
  * @private
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @class
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.128.0
56
+ * @version 1.130.0
57
57
  *
58
58
  * @constructor
59
59
  * @private
@@ -176,12 +176,12 @@ sap.ui.define([
176
176
  }
177
177
 
178
178
  function getInitialTranslationModelData() {
179
- return Object.assign({}, {
179
+ return {
180
180
  sourceLanguage: "",
181
181
  sourceLanguages: [],
182
182
  downloadChangedTexts: false,
183
183
  file: undefined
184
- });
184
+ };
185
185
  }
186
186
 
187
187
  Translation.prototype.openDownloadTranslationDialog = function(mPropertyBag) {
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @class
39
39
  *
40
40
  * @author SAP SE
41
- * @version 1.128.0
41
+ * @version 1.130.0
42
42
  *
43
43
  * @constructor
44
44
  * @private
@@ -62,7 +62,7 @@ sap.ui.define([
62
62
  * Constructor for a new sap.ui.rta.util.PluginManager
63
63
  * @extends sap.ui.base.ManagedObject
64
64
  * @author SAP SE
65
- * @version 1.128.0
65
+ * @version 1.130.0
66
66
  * @constructor
67
67
  * @private
68
68
  * @since 1.86
@@ -211,7 +211,7 @@ sap.ui.define([
211
211
  }
212
212
  }
213
213
 
214
- return Object.assign({}, this._mDefaultPlugins);
214
+ return { ...this._mDefaultPlugins };
215
215
  };
216
216
 
217
217
  /**
@@ -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.128.0
45
+ * @version 1.130.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @since 1.48