@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
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @class Constructor for a new sap.ui.rta.util.guidedTour.GuidedTour
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
  * @since 1.136
33
33
  * @private
@@ -99,6 +99,13 @@ sap.ui.define([
99
99
  }
100
100
  }
101
101
 
102
+ function restorePopoverModality() {
103
+ // If the affected control was a Popover, we need to restore the modal state
104
+ if (this._oAffectedControl?.isA("sap.m.Popover")) {
105
+ this._oAffectedControl.setModal(this._oAffectedControlOriginalModalState);
106
+ }
107
+ }
108
+
102
109
  GuidedTour.prototype.autoStart = async function(oTourContent) {
103
110
  const sResponse = await Utils.showMessageBox(
104
111
  "information",
@@ -152,16 +159,23 @@ sap.ui.define([
152
159
  try {
153
160
  for (const sActionSelector of aActionSelectors) {
154
161
  const oActionControl = await waitForElementVisibility.call(this, sActionSelector);
155
- oActionControl.firePress();
162
+ await oActionControl.firePress();
156
163
  }
157
164
 
158
- const oAffectedControl = oStepConfig.waitForElement
165
+ this._oAffectedControl = oStepConfig.waitForElement
159
166
  ? await waitForElementVisibility.call(this, sSelector)
160
167
  : Element.getElementById(sSelector);
161
168
 
162
169
  // Open the popover if the element is visible
163
- if (oAffectedControl && oAffectedControl.getVisible()) {
164
- this._oPopover.openBy(oAffectedControl);
170
+ if (this._oAffectedControl && this._oAffectedControl.getVisible()) {
171
+ // If the affected control is a Popover, we need to open it modal
172
+ // because if the affected control is not modal, it could be closed
173
+ // this would also close the Guided Tour Popover
174
+ if (this._oAffectedControl.isA("sap.m.Popover")) {
175
+ this._oAffectedControlOriginalModalState = this._oAffectedControl.getModal();
176
+ this._oAffectedControl.setModal(true);
177
+ }
178
+ this._oPopover.openBy(this._oAffectedControl);
165
179
  } else {
166
180
  skipStep.call(this);
167
181
  }
@@ -184,6 +198,7 @@ sap.ui.define([
184
198
  };
185
199
 
186
200
  GuidedTour.prototype.onNextPress = function() {
201
+ restorePopoverModality.call(this);
187
202
  this.setProperty("forwardDirection", true);
188
203
  this._oPopover.close();
189
204
  const nCurrentStep = this.getCurrentStep();
@@ -200,6 +215,7 @@ sap.ui.define([
200
215
  };
201
216
 
202
217
  GuidedTour.prototype.onPreviousPress = function() {
218
+ restorePopoverModality.call(this);
203
219
  this.setProperty("forwardDirection", false);
204
220
  this._oPopover.close();
205
221
  const nCurrentStep = this.getCurrentStep();
@@ -225,6 +241,7 @@ sap.ui.define([
225
241
  };
226
242
 
227
243
  GuidedTour.prototype.onClosePress = async function() {
244
+ restorePopoverModality.call(this);
228
245
  this._oPopover.close();
229
246
  this.fireTourClosed();
230
247
  this.destroy();
@@ -36,7 +36,7 @@
36
36
  <OverflowToolbar>
37
37
  <ToolbarSpacer/>
38
38
  <Button
39
- id="previewsButton"
39
+ id="previousButton"
40
40
  text="{i18n>BTN_GUIDED_TOUR_PREV}"
41
41
  visible="{= !${/isFirstStep}}"
42
42
  press=".onPreviousPress" />
@@ -129,7 +129,7 @@ sap.ui.define([
129
129
  title: oTextResources.getText("TIT_TOUR_GENERAL_STEP_VERSIONS_DROPDOWN_TITLE"),
130
130
  description: oTextResources.getText("TXT_TOUR_GENERAL_STEP_VERSIONS_DROPDOWN_DESCRIPTION"),
131
131
  listContent: [],
132
- markerSelector: "sapUIRta_toolbar_fragment--sapUiRta_versionHistoryDialog--originalVersionList",
132
+ markerSelector: "sapUIRta_toolbar_fragment--sapUiRta_versionHistoryDialog--popover",
133
133
  waitForElement: true,
134
134
  actionSelectors: ["sapUIRta_toolbar_fragment--sapUiRta_versionButton"]
135
135
  },
@@ -16,15 +16,15 @@ sap.ui.define([
16
16
  "use strict";
17
17
 
18
18
  function isCloneFromAggregationBinding(oControl) {
19
- var {sParentAggregationName} = oControl;
20
- var oParent = oControl.getParent();
19
+ const {sParentAggregationName} = oControl;
20
+ const oParent = oControl.getParent();
21
21
 
22
22
  if (oParent && sParentAggregationName) {
23
- var oBindingInfo = oParent.getBindingInfo(sParentAggregationName);
23
+ const oBindingInfo = oParent.getBindingInfo(sParentAggregationName);
24
24
  if (oBindingInfo) {
25
25
  if (
26
26
  oBindingInfo.template
27
- && oControl instanceof oBindingInfo.template.getMetadata().getClass()
27
+ && oControl.isA(oBindingInfo.template.getMetadata().getClass())
28
28
  ) {
29
29
  return oBindingInfo.template;
30
30
  }
@@ -47,31 +47,23 @@ sap.ui.define([
47
47
  }
48
48
 
49
49
  if (typeof oElementOverlay.data("hasStableId") !== "boolean") {
50
- var aStableElements = oElementOverlay.getDesignTimeMetadata().getStableElements(oElementOverlay);
51
- var bUnstable = false;
50
+ const aStableElements = oElementOverlay.getDesignTimeMetadata().getStableElements(oElementOverlay);
51
+ let bUnstable = false;
52
52
 
53
53
  if (aStableElements.length > 0) {
54
54
  if (isCloneFromAggregationBinding(oElementOverlay.getElement())) {
55
55
  bUnstable = aStableElements.some(function(vStableElement) {
56
- var vControl;
57
- var oAppComponent;
58
- var bUnstable = false;
59
-
60
- if (isPlainObject(vStableElement)) {
61
- vControl = vStableElement.id;
62
- oAppComponent = vStableElement.appComponent;
63
- } else {
64
- vControl = vStableElement;
65
- }
56
+ const vControl = isPlainObject(vStableElement) ? vStableElement.id : vStableElement;
57
+ const oAppComponent = isPlainObject(vStableElement) && vStableElement.appComponent;
66
58
 
67
59
  // 1. First we check control as is, as getStableElements() may already return a control from the template
68
60
  bUnstable = !FlUtils.checkControlId(vControl, oAppComponent);
69
61
 
70
62
  // 2. If it's unstable, we try to detect the corresponding control in the template manually
71
63
  if (bUnstable) {
72
- var oControl = ElementUtil.getElementInstance(vControl);
64
+ const oControl = ElementUtil.getElementInstance(vControl);
73
65
  if (ElementUtil.getElementInstance(vControl)) {
74
- var mLocationInTemplate = ElementUtil.getAggregationInformation(oControl);
66
+ const mLocationInTemplate = ElementUtil.getAggregationInformation(oControl);
75
67
  bUnstable = !FlUtils.checkControlId(ElementUtil.extractTemplateId(mLocationInTemplate), oAppComponent);
76
68
  }
77
69
  }
@@ -80,7 +72,7 @@ sap.ui.define([
80
72
  });
81
73
  } else {
82
74
  bUnstable = aStableElements.some(function(vStableElement) {
83
- var vControl = vStableElement.id || vStableElement;
75
+ const vControl = vStableElement.id || vStableElement;
84
76
  return !FlUtils.checkControlId(vControl, vStableElement.appComponent);
85
77
  });
86
78
  }
@@ -17,20 +17,20 @@ sap.ui.define([
17
17
  ) {
18
18
  "use strict";
19
19
 
20
- var sLinkRegex = "\\[(.*?)\\]\\((.*?)\\)";
20
+ const sLinkRegex = "\\[(.*?)\\]\\((.*?)\\)";
21
21
 
22
22
  function hasLinks(sMessage) {
23
- var vResult = getLinks(sMessage);
23
+ const vResult = getLinks(sMessage);
24
24
  return Array.isArray(vResult) && vResult.length > 0;
25
25
  }
26
26
 
27
27
  function isLink(sText) {
28
- var oRegex = new RegExp(`^${sLinkRegex}$`);
28
+ const oRegex = new RegExp(`^${sLinkRegex}$`);
29
29
  return Array.isArray(oRegex.exec(sText));
30
30
  }
31
31
 
32
32
  function extractLink(sLink) {
33
- var aMatch = new RegExp(sLinkRegex).exec(sLink);
33
+ const aMatch = new RegExp(sLinkRegex).exec(sLink);
34
34
  return {
35
35
  text: aMatch[1],
36
36
  href: aMatch[2]
@@ -38,16 +38,16 @@ sap.ui.define([
38
38
  }
39
39
 
40
40
  function getLinks(sMessage) {
41
- var oRegExp = new RegExp(sLinkRegex, "g");
41
+ const oRegExp = new RegExp(sLinkRegex, "g");
42
42
  return sMessage.match(oRegExp);
43
43
  }
44
44
 
45
45
  function convertIntoControls(aSymbols) {
46
- var oLayout = new HorizontalLayout({
46
+ const oLayout = new HorizontalLayout({
47
47
  allowWrapping: true,
48
48
  content: aSymbols.map(function(sSymbol) {
49
49
  if (isLink(sSymbol)) {
50
- var mLink = extractLink(sSymbol);
50
+ const mLink = extractLink(sSymbol);
51
51
  return new Link({
52
52
  text: mLink.text,
53
53
  href: mLink.href,
@@ -69,19 +69,19 @@ sap.ui.define([
69
69
  }
70
70
 
71
71
  function getSymbols(sMessage) {
72
- var aSymbols = [sMessage];
73
- var aLinks = getLinks(sMessage);
72
+ const aSymbols = [sMessage];
73
+ const aLinks = getLinks(sMessage);
74
74
 
75
75
  aLinks.forEach(function(sLink) {
76
- var i = 0;
76
+ let i = 0;
77
77
  while (i < aSymbols.length) {
78
- var sSymbol = aSymbols[i];
78
+ const sSymbol = aSymbols[i];
79
79
 
80
80
  if (isLink(sSymbol)) {
81
81
  i++;
82
82
  } else {
83
- var aParts = sSymbol.split(sLink);
84
- var aInsert = [];
83
+ const aParts = sSymbol.split(sLink);
84
+ const aInsert = [];
85
85
 
86
86
  aParts.forEach(function(sPart, iIndex, aOriginal) { // eslint-disable-line no-loop-func
87
87
  aInsert.push(sPart);
@@ -111,10 +111,10 @@ sap.ui.define([
111
111
  * @param {string} [sMessageType="show"] - Decides the type of the MessageBox that should be shown with (see different types at {@link sap.m.MessageBox})
112
112
  */
113
113
  return function showMessageBox(sMessage, mOptions, sMessageType) {
114
- var vMessage;
114
+ let vMessage;
115
115
 
116
116
  if (hasLinks(sMessage)) {
117
- var aSymbols = getSymbols(sMessage);
117
+ const aSymbols = getSymbols(sMessage);
118
118
  vMessage = convertIntoControls(aSymbols);
119
119
  } else {
120
120
  vMessage = sMessage;
@@ -24,13 +24,14 @@ sap.ui.define([
24
24
  DtUtil
25
25
  ) {
26
26
  "use strict";
27
+
27
28
  return function(oRta) {
28
- var mMessageBoxShow = {};
29
- var aPendingOverlaysToValidate = [];
30
- var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
29
+ const mMessageBoxShow = {};
30
+ let aPendingOverlaysToValidate = [];
31
+ const oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
31
32
 
32
- function _displayMessage(oRta, oComponent, sText, sIconType, sTitle) {
33
- var sComponentId = oComponent.getId();
33
+ function displayMessage(oRta, oComponent, sText, sIconType, sTitle) {
34
+ const sComponentId = oComponent.getId();
34
35
  if (!mMessageBoxShow[sComponentId]) {
35
36
  showMessageBox(
36
37
  oRta._getTextResources().getText(sText),
@@ -41,16 +42,16 @@ sap.ui.define([
41
42
  },
42
43
  "show"
43
44
  );
44
- _setMessageBoxShow(sComponentId, true);
45
+ setMessageBoxShow(sComponentId, true);
45
46
  }
46
47
  }
47
48
 
48
- function _setMessageBoxShow(sComponentId, bValue) {
49
+ function setMessageBoxShow(sComponentId, bValue) {
49
50
  mMessageBoxShow[sComponentId] = bValue;
50
51
  }
51
52
 
52
- function _isValidApp(oComponent) {
53
- var oManifest = oComponent.getManifest();
53
+ function isValidApp(oComponent) {
54
+ const oManifest = oComponent.getManifest();
54
55
 
55
56
  return (
56
57
  ObjectPath.get(["sap.app", "id"], oManifest) !== "sap.ui.documentation.sdk"
@@ -59,7 +60,7 @@ sap.ui.define([
59
60
  );
60
61
  }
61
62
 
62
- function _isTestEnvironment() {
63
+ function isTestEnvironment() {
63
64
  return (
64
65
  "QUnit" in window
65
66
  || (
@@ -69,28 +70,28 @@ sap.ui.define([
69
70
  );
70
71
  }
71
72
 
72
- function _isControlAvailable(oControl) {
73
+ function isControlAvailable(oControl) {
73
74
  return oControl && !oControl._bIsBeingDestroyed;
74
75
  }
75
76
 
76
- function _handleModeChanged(oEvent) {
77
- var sNewMode = oEvent.getParameters().mode;
77
+ function handleModeChanged(oEvent) {
78
+ const sNewMode = oEvent.getParameters().mode;
78
79
  if (sNewMode === "adaptation") {
79
- var oRta = oEvent.getSource();
80
- var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
81
- aPendingOverlaysToValidate = aPendingOverlaysToValidate.filter(_isControlAvailable);
82
- _handleUnstableIds(oRta, oComponent, aPendingOverlaysToValidate);
80
+ const oRta = oEvent.getSource();
81
+ const oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
82
+ aPendingOverlaysToValidate = aPendingOverlaysToValidate.filter(isControlAvailable);
83
+ handleUnstableIds(oRta, oComponent, aPendingOverlaysToValidate);
83
84
  aPendingOverlaysToValidate = [];
84
85
  }
85
86
  }
86
87
 
87
- function _validateCreatedOverlay(oEvent, oRta) {
88
- var oElementOverlayCreated = oEvent.getParameters().elementOverlay;
88
+ function validateCreatedOverlay(oEvent, oRta) {
89
+ const oElementOverlayCreated = oEvent.getParameters().elementOverlay;
89
90
  if (oRta.getMode() === "adaptation") {
90
- var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
91
+ const oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
91
92
  DtUtil.waitForSynced(oRta._oDesignTime, function(oOverlay) {
92
- if (_isControlAvailable(oOverlay)) {
93
- _handleUnstableIds(oRta, oComponent, [oOverlay]);
93
+ if (isControlAvailable(oOverlay)) {
94
+ handleUnstableIds(oRta, oComponent, [oOverlay]);
94
95
  }
95
96
  })(oElementOverlayCreated);
96
97
  } else {
@@ -98,33 +99,33 @@ sap.ui.define([
98
99
  }
99
100
  }
100
101
 
101
- function _handleUnstableIds(oRta, oComponent, aElementOverlays) {
102
- var aUnstableOverlays = validateStableIds(aElementOverlays, oComponent);
102
+ function handleUnstableIds(oRta, oComponent, aElementOverlays) {
103
+ const aUnstableOverlays = validateStableIds(aElementOverlays, oComponent);
103
104
 
104
105
  if (aUnstableOverlays.length) {
105
106
  aUnstableOverlays.forEach(function(oElementOverlay) {
106
107
  Log.error("Control ID was generated dynamically by SAPUI5. To support SAPUI5 flexibility, a stable control ID is needed to assign the changes to.", oElementOverlay.getElement().getId());
107
108
  });
108
- _displayMessage(oRta, oComponent, "MSG_UNSTABLE_ID_FOUND", "ERROR", "HEADER_ERROR");
109
+ displayMessage(oRta, oComponent, "MSG_UNSTABLE_ID_FOUND", "ERROR", "HEADER_ERROR");
109
110
  }
110
111
  }
111
112
 
112
113
  oRta.attachEventOnce("stop", function() {
113
- _setMessageBoxShow(oComponent.getId(), false);
114
+ setMessageBoxShow(oComponent.getId(), false);
114
115
  });
115
116
 
116
- if (oComponent && _isValidApp(oComponent)) {
117
- var oManifest = oComponent.getManifest();
118
- var vFlexEnabled = ObjectPath.get(["sap.ui5", "flexEnabled"], oManifest);
117
+ if (oComponent && isValidApp(oComponent)) {
118
+ const oManifest = oComponent.getManifest();
119
+ const vFlexEnabled = ObjectPath.get(["sap.ui5", "flexEnabled"], oManifest);
119
120
 
120
121
  if (typeof vFlexEnabled !== "boolean") {
121
- if (!_isTestEnvironment()) {
122
- _displayMessage(oRta, oComponent, "MSG_NO_FLEX_ENABLED_FLAG", "WARNING", "HEADER_WARNING");
122
+ if (!isTestEnvironment()) {
123
+ displayMessage(oRta, oComponent, "MSG_NO_FLEX_ENABLED_FLAG", "WARNING", "HEADER_WARNING");
123
124
  }
124
125
  } else { // flexEnabled === true
125
- oRta.attachEvent("modeChanged", _handleModeChanged);
126
- oRta._oDesignTime.attachEvent("elementOverlayCreated", oRta, _validateCreatedOverlay);
127
- _handleUnstableIds(oRta, oComponent, oRta._oDesignTime.getElementOverlays());
126
+ oRta.attachEvent("modeChanged", handleModeChanged);
127
+ oRta._oDesignTime.attachEvent("elementOverlayCreated", oRta, validateCreatedOverlay);
128
+ handleUnstableIds(oRta, oComponent, oRta._oDesignTime.getElementOverlays());
128
129
  }
129
130
  }
130
131
  };
@@ -7,40 +7,36 @@
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
9
9
  "sap/ui/rta/util/hasStableId",
10
- "sap/ui/core/mvc/View",
11
- "sap/ui/core/Fragment",
12
10
  "sap/ui/dt/OverlayUtil",
13
11
  "sap/base/util/isPlainObject"
14
12
  ], function(
15
13
  ObjectPath,
16
14
  hasStableId,
17
- View,
18
- Fragment,
19
15
  OverlayUtil,
20
16
  isPlainObject
21
17
  ) {
22
18
  "use strict";
23
19
 
24
20
  function isFioriElementsApp(oComponent) {
25
- var mManifest = oComponent.getManifest();
21
+ const mManifest = oComponent.getManifest();
26
22
 
27
- var isV4 = !!ObjectPath.get(["sap.ui5", "dependencies", "libs", "sap.fe.templates"], mManifest);
28
- var isV2 = !!ObjectPath.get(["sap.ui.generic.app"], mManifest);
29
- var isOVP = !!ObjectPath.get(["sap.ovp"], mManifest);
23
+ const isV4 = !!ObjectPath.get(["sap.ui5", "dependencies", "libs", "sap.fe.templates"], mManifest);
24
+ const isV2 = !!ObjectPath.get(["sap.ui.generic.app"], mManifest);
25
+ const isOVP = !!ObjectPath.get(["sap.ovp"], mManifest);
30
26
  return isV2 || isV4 || isOVP;
31
27
  }
32
28
 
33
29
  function getFioriElementsExtensions(oComponent) {
34
- var oManifest = oComponent.getManifest();
30
+ const oManifest = oComponent.getManifest();
35
31
 
36
- var mViewExtensions = ObjectPath.get(["sap.ui5", "extends", "extensions", "sap.ui.viewExtensions"], oManifest);
32
+ const mViewExtensions = ObjectPath.get(["sap.ui5", "extends", "extensions", "sap.ui.viewExtensions"], oManifest);
37
33
 
38
- var aViewExtensions = [];
34
+ const aViewExtensions = [];
39
35
 
40
36
  if (isPlainObject(mViewExtensions)) {
41
37
  Object.keys(mViewExtensions).forEach(function(sViewExtensionGroupName) {
42
38
  if (sViewExtensionGroupName.startsWith("sap.suite.ui.generic.template")) {
43
- var mViewExtensionGroup = mViewExtensions[sViewExtensionGroupName];
39
+ const mViewExtensionGroup = mViewExtensions[sViewExtensionGroupName];
44
40
 
45
41
  Object.keys(mViewExtensionGroup).forEach(function(sViewExtensionName) {
46
42
  aViewExtensions.push(mViewExtensionGroup[sViewExtensionName]);
@@ -53,20 +49,19 @@ sap.ui.define([
53
49
  }
54
50
 
55
51
  function getExtensionOverlays(aExtensionList, aElementOverlays) {
56
- var aExtensionOverlays = [];
52
+ const aExtensionOverlays = [];
57
53
 
58
- for (var i = 0, l = aElementOverlays.length; i < l; i++) {
59
- var oElementOverlay = aElementOverlays[i];
60
- var oElement = oElementOverlay.getElement();
61
- var bIsExtensionOverlay = aExtensionList.some(function(mViewExtension) { // eslint-disable-line no-loop-func
62
- var ClassDeclaration = sap.ui.require(mViewExtension.className.replace(/\./g, "/"));
63
- var sExtensionName;
64
- var sElementName;
54
+ for (let i = 0, l = aElementOverlays.length; i < l; i++) {
55
+ const oElementOverlay = aElementOverlays[i];
56
+ const oElement = oElementOverlay.getElement();
57
+ const bIsExtensionOverlay = aExtensionList.some(function(mViewExtension) { // eslint-disable-line no-loop-func
58
+ let sExtensionName;
59
+ let sElementName;
65
60
 
66
- if (oElement instanceof View) {
61
+ if (oElement.isA("sap.ui.core.mvc.View")) {
67
62
  sElementName = oElement.getViewName();
68
63
  sExtensionName = mViewExtension.viewName;
69
- } else if (oElement instanceof Fragment) {
64
+ } else if (oElement.isA("sap.ui.core.Fragment")) {
70
65
  sElementName = oElement.getFragmentName();
71
66
  } else {
72
67
  // viewName/fragmentName are essential for proper element detection
@@ -74,7 +69,7 @@ sap.ui.define([
74
69
  }
75
70
 
76
71
  return (
77
- oElement instanceof ClassDeclaration
72
+ oElement.isA(mViewExtension.className)
78
73
  && sElementName === sExtensionName
79
74
  );
80
75
  });
@@ -89,7 +84,7 @@ sap.ui.define([
89
84
  }
90
85
  }
91
86
 
92
- var aRelevantOverlays = [];
87
+ const aRelevantOverlays = [];
93
88
 
94
89
  aExtensionOverlays.forEach(function(oElementOverlay) {
95
90
  OverlayUtil.iterateOverlayElementTree(oElementOverlay, function(oElementOverlay) {
@@ -101,12 +96,10 @@ sap.ui.define([
101
96
  }
102
97
 
103
98
  return function(aElementOverlays, oComponent) {
104
- var aResult = [];
105
-
106
- var aRelevantOverlays = aElementOverlays.slice(0);
99
+ let aRelevantOverlays = aElementOverlays.slice(0);
107
100
 
108
101
  if (isFioriElementsApp(oComponent)) {
109
- var aExtensionList = getFioriElementsExtensions(oComponent);
102
+ const aExtensionList = getFioriElementsExtensions(oComponent);
110
103
 
111
104
  aRelevantOverlays = (
112
105
  aExtensionList.length
@@ -115,13 +108,11 @@ sap.ui.define([
115
108
  );
116
109
  }
117
110
 
118
- aResult = aRelevantOverlays.filter(function(oElementOverlay) {
111
+ return aRelevantOverlays.filter(function(oElementOverlay) {
119
112
  return (
120
113
  !oElementOverlay.getDesignTimeMetadata().markedAsNotAdaptable()
121
114
  && !hasStableId(oElementOverlay)
122
115
  );
123
116
  });
124
-
125
- return aResult;
126
117
  };
127
118
  });
@@ -12,8 +12,8 @@ sap.ui.define([
12
12
  ) {
13
13
  "use strict";
14
14
 
15
- var sEmptyTextKey = "\xa0";
16
- var oValidators = {
15
+ const sEmptyTextKey = "\xa0";
16
+ const oValidators = {
17
17
  noEmptyText: {
18
18
  validatorFunction(sNewText) {
19
19
  return sNewText !== sEmptyTextKey;
@@ -26,8 +26,8 @@ sap.ui.define([
26
26
  if (sOldText === sNewText) {
27
27
  throw Error("sameTextError");
28
28
  }
29
- var oBindingParserResult;
30
- var bError;
29
+ let oBindingParserResult;
30
+ let bError;
31
31
 
32
32
  try {
33
33
  oBindingParserResult = BindingParser.complexParser(sNewText, undefined, true);
@@ -42,11 +42,11 @@ sap.ui.define([
42
42
 
43
43
  return function(sNewText, sOldText, oAction) {
44
44
  checkPreconditionsAndThrowError(sNewText, sOldText);
45
- var sErrorText;
46
- var aValidators = oAction && oAction.validators || [];
45
+ let sErrorText;
46
+ const aValidators = oAction && oAction.validators || [];
47
47
 
48
48
  aValidators.some(function(vValidator) {
49
- var oValidator;
49
+ let oValidator;
50
50
 
51
51
  if (
52
52
  typeof vValidator === "string" && oValidators[vValidator]
@@ -12,7 +12,6 @@ sap.ui.define([
12
12
  "sap/ui/fl/write/api/FeaturesAPI",
13
13
  "sap/ui/model/json/JSONModel",
14
14
  "sap/ui/model/resource/ResourceModel",
15
- "sap/ui/rta/util/ReloadManager",
16
15
  "sap/ui/rta/util/whatsNew/WhatsNewUtils"
17
16
  ], function(
18
17
  mLibrary,
@@ -22,7 +21,6 @@ sap.ui.define([
22
21
  FeaturesAPI,
23
22
  JSONModel,
24
23
  ResourceModel,
25
- ReloadManager,
26
24
  WhatsNewUtils
27
25
  ) {
28
26
  "use strict";
@@ -33,7 +31,7 @@ sap.ui.define([
33
31
  * @class Constructor for a new sap.ui.rta.util.whatsNew.WhatsNew
34
32
  * @extends sap.ui.base.ManagedObject
35
33
  * @author SAP SE
36
- * @version 1.136.4
34
+ * @version 1.139.0
37
35
  * @constructor
38
36
  * @since 1.129
39
37
  * @private
@@ -51,27 +49,44 @@ sap.ui.define([
51
49
  }
52
50
  });
53
51
 
52
+ function updateLearnMoreButton(oCarousel) {
53
+ const sActivePageId = oCarousel.getActivePage();
54
+ const aPages = oCarousel.getPages();
55
+ const oLearnMoreBtn = Element.getElementById("sapUiRtaWhatsNewDialog_LearnMore");
56
+
57
+ // During initialization of the carousel the ActivePageId is not set yet, so we default to the index of the first page
58
+ const iCurrentIndex = sActivePageId
59
+ ? aPages.findIndex(function(oPage) {
60
+ return oPage.getId() === sActivePageId;
61
+ })
62
+ : 0;
63
+
64
+ if (this.aUnseenFeatures[iCurrentIndex] && this.aUnseenFeatures[iCurrentIndex].documentationUrls) {
65
+ oLearnMoreBtn.setEnabled(true);
66
+ } else {
67
+ oLearnMoreBtn.setEnabled(false);
68
+ }
69
+ }
70
+
54
71
  WhatsNew.prototype.setDontShowAgainFeatureIds = async function(aDontShowAgainFeatureIds) {
55
72
  this.setProperty("dontShowAgainFeatureIds", aDontShowAgainFeatureIds);
56
73
  this.aUnseenFeatures = await WhatsNewUtils.getFilteredFeatures(aDontShowAgainFeatureIds, this.getLayer());
57
74
  };
58
75
 
59
- WhatsNew.prototype.initializeWhatsNewDialog = async function(aExcludeFeatureIds = []) {
60
- const aDontShowAgainFeatureIds = await FeaturesAPI.getSeenFeatureIds({ layer: this.getLayer() });
76
+ WhatsNew.prototype.initializeWhatsNewDialog = async function(aDontShowAgainFeatureIds, aExcludeFeatureIds = []) {
61
77
  await this.setDontShowAgainFeatureIds(aDontShowAgainFeatureIds);
62
78
  if (this.aUnseenFeatures.length === 0 || this.getLayer() !== "CUSTOMER") {
63
79
  return;
64
80
  }
65
81
  const oWhatsNewDialogModel = new JSONModel();
66
- const aVisibleFeatures = this.aUnseenFeatures.filter((oFeature) => !aExcludeFeatureIds.includes(oFeature.featureId));
67
- if (aVisibleFeatures.length === 0) {
82
+ this.aUnseenFeatures = this.aUnseenFeatures.filter((oFeature) => !aExcludeFeatureIds.includes(oFeature.featureId));
83
+ if (this.aUnseenFeatures.length === 0) {
68
84
  return;
69
85
  }
70
- oWhatsNewDialogModel.setData({ featureCollection: aVisibleFeatures });
86
+ oWhatsNewDialogModel.setData({ featureCollection: this.aUnseenFeatures });
71
87
  if (!this.oWhatsNewDialog) {
72
88
  await this.createWhatsNewDialog(oWhatsNewDialogModel);
73
89
  }
74
- ReloadManager.setDontShowWhatsNewAfterReload();
75
90
  this.oWhatsNewDialog.open();
76
91
  };
77
92
 
@@ -83,6 +98,16 @@ sap.ui.define([
83
98
  });
84
99
  this.oWhatsNewDialog.setModel(oRTAResourceModel, "i18n");
85
100
  this.oWhatsNewDialog.setModel(oWhatsNewDialogModel, "whatsNewModel");
101
+
102
+ // Dynamically enable/disable the Learn More button based on the current carousel page
103
+ const oCarousel = Element.getElementById("sapWhatsNewDialogCarousel");
104
+ if (oCarousel) {
105
+ oCarousel.attachEvent("pageChanged", () => {
106
+ updateLearnMoreButton.call(this, oCarousel);
107
+ });
108
+ // Initial state
109
+ updateLearnMoreButton.call(this, oCarousel);
110
+ }
86
111
  };
87
112
 
88
113
  WhatsNew.prototype.closeWhatsNewDialog = function() {
@@ -23,14 +23,10 @@ sap.ui.define([
23
23
  let oWhatsNewOverviewDialog;
24
24
  let aWhatsNewOverviewContent;
25
25
 
26
- async function getWhatsNewOverviewContent() {
27
- const aFeatures = await WhatsNewUtils.getFilteredFeatures([]);
28
- return [...aFeatures].reverse();
29
- }
30
-
31
26
  WhatsNewOverview.openWhatsNewOverviewDialog = async function() {
32
27
  const oWhatsNewDialogModel = new JSONModel();
33
- aWhatsNewOverviewContent = await getWhatsNewOverviewContent();
28
+ // Get the unseen features from WhatsNewUtils; newest features are the first in the array
29
+ aWhatsNewOverviewContent = await WhatsNewUtils.getFilteredFeatures([]);
34
30
  oWhatsNewDialogModel.setData({ featureCollection: aWhatsNewOverviewContent });
35
31
  oWhatsNewDialogModel.setProperty("overviewActive", true);
36
32
  if (!oWhatsNewOverviewDialog) {
@@ -61,6 +61,7 @@
61
61
  <ToolbarSpacer />
62
62
  <Button
63
63
  id="sapUiRtaWhatsNewOverviewDialog_LearnMore"
64
+ enabled="{= ${whatsNewModel>documentationUrls} !== null}"
64
65
  visible="{= ${whatsNewModel>overviewActive} === false}"
65
66
  text="{i18n>BTN_LEARN_MORE_WHATS_NEW_DIALOG}"
66
67
  press=".onLearnMorePress"/>