@openui5/sap.ui.rta 1.136.2 → 1.138.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 (176) hide show
  1. package/REUSE.toml +0 -28
  2. package/THIRDPARTY.txt +0 -24
  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 +33 -17
  7. package/src/sap/ui/rta/Utils.js +1 -1
  8. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  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/AnnotationCommand.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 +1 -1
  20. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  21. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  23. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  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/ExtendControllerCommand.js +1 -1
  27. package/src/sap/ui/rta/command/FlexCommand.js +2 -3
  28. package/src/sap/ui/rta/command/LREPSerializer.js +2 -85
  29. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  30. package/src/sap/ui/rta/command/ManifestCommand.js +1 -1
  31. package/src/sap/ui/rta/command/Move.js +1 -1
  32. package/src/sap/ui/rta/command/Property.js +1 -1
  33. package/src/sap/ui/rta/command/Remove.js +1 -1
  34. package/src/sap/ui/rta/command/Rename.js +1 -1
  35. package/src/sap/ui/rta/command/Resize.js +1 -1
  36. package/src/sap/ui/rta/command/Reveal.js +1 -1
  37. package/src/sap/ui/rta/command/Settings.js +1 -1
  38. package/src/sap/ui/rta/command/Split.js +1 -1
  39. package/src/sap/ui/rta/command/Stack.js +115 -87
  40. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  41. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  42. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  43. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  44. package/src/sap/ui/rta/command/manifest/AddLibrary.js +1 -1
  45. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  46. package/src/sap/ui/rta/library.js +2 -2
  47. package/src/sap/ui/rta/messagebundle.properties +12 -60
  48. package/src/sap/ui/rta/messagebundle_ar.properties +6 -31
  49. package/src/sap/ui/rta/messagebundle_bg.properties +7 -32
  50. package/src/sap/ui/rta/messagebundle_ca.properties +7 -32
  51. package/src/sap/ui/rta/messagebundle_cnr.properties +6 -31
  52. package/src/sap/ui/rta/messagebundle_cs.properties +6 -31
  53. package/src/sap/ui/rta/messagebundle_cy.properties +7 -32
  54. package/src/sap/ui/rta/messagebundle_da.properties +7 -32
  55. package/src/sap/ui/rta/messagebundle_de.properties +5 -30
  56. package/src/sap/ui/rta/messagebundle_el.properties +7 -32
  57. package/src/sap/ui/rta/messagebundle_en.properties +7 -32
  58. package/src/sap/ui/rta/messagebundle_en_GB.properties +7 -32
  59. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +8 -32
  60. package/src/sap/ui/rta/messagebundle_es.properties +7 -32
  61. package/src/sap/ui/rta/messagebundle_es_MX.properties +7 -32
  62. package/src/sap/ui/rta/messagebundle_et.properties +7 -32
  63. package/src/sap/ui/rta/messagebundle_fi.properties +7 -32
  64. package/src/sap/ui/rta/messagebundle_fr.properties +7 -32
  65. package/src/sap/ui/rta/messagebundle_fr_CA.properties +7 -32
  66. package/src/sap/ui/rta/messagebundle_hi.properties +6 -31
  67. package/src/sap/ui/rta/messagebundle_hr.properties +7 -32
  68. package/src/sap/ui/rta/messagebundle_hu.properties +7 -32
  69. package/src/sap/ui/rta/messagebundle_id.properties +7 -32
  70. package/src/sap/ui/rta/messagebundle_it.properties +7 -32
  71. package/src/sap/ui/rta/messagebundle_iw.properties +7 -32
  72. package/src/sap/ui/rta/messagebundle_ja.properties +7 -32
  73. package/src/sap/ui/rta/messagebundle_kk.properties +14 -39
  74. package/src/sap/ui/rta/messagebundle_ko.properties +7 -32
  75. package/src/sap/ui/rta/messagebundle_lt.properties +7 -32
  76. package/src/sap/ui/rta/messagebundle_lv.properties +7 -32
  77. package/src/sap/ui/rta/messagebundle_mk.properties +7 -32
  78. package/src/sap/ui/rta/messagebundle_ms.properties +7 -32
  79. package/src/sap/ui/rta/messagebundle_nl.properties +6 -31
  80. package/src/sap/ui/rta/messagebundle_no.properties +7 -32
  81. package/src/sap/ui/rta/messagebundle_pl.properties +7 -32
  82. package/src/sap/ui/rta/messagebundle_pt.properties +7 -32
  83. package/src/sap/ui/rta/messagebundle_pt_PT.properties +7 -32
  84. package/src/sap/ui/rta/messagebundle_ro.properties +7 -32
  85. package/src/sap/ui/rta/messagebundle_ru.properties +7 -32
  86. package/src/sap/ui/rta/messagebundle_sh.properties +6 -31
  87. package/src/sap/ui/rta/messagebundle_sk.properties +7 -32
  88. package/src/sap/ui/rta/messagebundle_sl.properties +7 -32
  89. package/src/sap/ui/rta/messagebundle_sr.properties +6 -31
  90. package/src/sap/ui/rta/messagebundle_sv.properties +7 -32
  91. package/src/sap/ui/rta/messagebundle_th.properties +7 -32
  92. package/src/sap/ui/rta/messagebundle_tr.properties +7 -32
  93. package/src/sap/ui/rta/messagebundle_uk.properties +7 -32
  94. package/src/sap/ui/rta/messagebundle_vi.properties +7 -32
  95. package/src/sap/ui/rta/messagebundle_zh_CN.properties +7 -32
  96. package/src/sap/ui/rta/messagebundle_zh_TW.properties +7 -32
  97. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  98. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +1 -1
  99. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  100. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  101. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  102. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  103. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  104. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  105. package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +1 -1
  106. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  107. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  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/Resize.js +1 -1
  111. package/src/sap/ui/rta/plugin/Selection.js +14 -7
  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 +11 -1
  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/annotations/AnnotationChangeDialog.fragment.xml +16 -3
  121. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +1 -1
  122. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +1 -1
  123. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +3 -3
  124. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  125. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +2 -2
  126. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  127. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +23 -6
  128. package/src/sap/ui/rta/plugin/rename/Rename.js +1 -1
  129. package/src/sap/ui/rta/plugin/rename/RenameDialog.js +1 -1
  130. package/src/sap/ui/rta/service/Action.js +1 -1
  131. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  132. package/src/sap/ui/rta/service/Outline.js +1 -1
  133. package/src/sap/ui/rta/service/Property.js +1 -1
  134. package/src/sap/ui/rta/service/Selection.js +1 -1
  135. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  136. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +4 -2
  137. package/src/sap/ui/rta/toolbar/Adaptation.js +15 -3
  138. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  139. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  140. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  141. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  142. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  143. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  144. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  145. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  146. package/src/sap/ui/rta/util/Animation.js +4 -6
  147. package/src/sap/ui/rta/util/BindingsExtractor.js +44 -53
  148. package/src/sap/ui/rta/util/PluginManager.js +6 -6
  149. package/src/sap/ui/rta/util/PopupManager.js +90 -109
  150. package/src/sap/ui/rta/util/ReloadManager.js +53 -98
  151. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  152. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  153. package/src/sap/ui/rta/util/adaptationStarter.js +59 -80
  154. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +3 -3
  155. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  156. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  157. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -4
  158. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
  159. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +5 -7
  160. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +9 -9
  161. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +5 -5
  162. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +8 -8
  163. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +5 -5
  164. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +5 -5
  165. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +2 -2
  166. package/src/sap/ui/rta/util/guidedTour/GuidedTour.js +1 -1
  167. package/src/sap/ui/rta/util/hasStableId.js +11 -19
  168. package/src/sap/ui/rta/util/showMessageBox.js +15 -15
  169. package/src/sap/ui/rta/util/validateFlexEnabled.js +35 -34
  170. package/src/sap/ui/rta/util/validateStableIds.js +22 -31
  171. package/src/sap/ui/rta/util/validateText.js +7 -7
  172. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +33 -7
  173. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverview.js +2 -6
  174. package/src/sap/ui/rta/util/whatsNew/WhatsNewOverviewDialog.fragment.xml +1 -0
  175. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +4 -4
  176. package/src/sap/ui/rta/util/whatsNew/whatsNewContent/WhatsNewFeatures.js +8 -22
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  ) {
16
16
  "use strict";
17
17
 
18
- var MoveVisualization = {};
18
+ const MoveVisualization = {};
19
19
 
20
20
  /**
21
21
  * Creates a localized description and button text for move changes based on the provided
@@ -29,17 +29,17 @@ sap.ui.define([
29
29
  * @returns {object} Localized description text and button text
30
30
  */
31
31
  MoveVisualization.getDescription = function(mPayload, sLabel, mPropertyBag) {
32
- var oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
33
- var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [ChangeVisualizationUtils.shortenString(sLabel)]);
34
- var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [sLabel]);
35
- var sButtonText;
36
- var oAppComponent = mPropertyBag.appComponent;
32
+ const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
33
+ let sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [ChangeVisualizationUtils.shortenString(sLabel)]);
34
+ let sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [sLabel]);
35
+ let sButtonText;
36
+ const oAppComponent = mPropertyBag.appComponent;
37
37
 
38
- var sSourceId = (
38
+ const sSourceId = (
39
39
  mPayload.sourceContainer
40
40
  && JsControlTreeModifier.getControlIdBySelector(mPayload.sourceContainer, oAppComponent)
41
41
  );
42
- var sTargetId = (
42
+ const sTargetId = (
43
43
  mPayload.targetContainer
44
44
  && JsControlTreeModifier.getControlIdBySelector(mPayload.targetContainer, oAppComponent)
45
45
  );
@@ -13,7 +13,7 @@ sap.ui.define([
13
13
  ) {
14
14
  "use strict";
15
15
 
16
- var RenameVisualization = {};
16
+ const RenameVisualization = {};
17
17
 
18
18
  /**
19
19
  * Creates a localized description for rename changes based on the provided
@@ -26,18 +26,18 @@ sap.ui.define([
26
26
  * @returns {object} Localized description
27
27
  */
28
28
  RenameVisualization.getDescription = function(mPayload, sFallbackLabel) {
29
- var oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
30
- var sKey = mPayload.originalLabel
29
+ const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
30
+ const sKey = mPayload.originalLabel
31
31
  ? "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_FROM_TO"
32
32
  : "TXT_CHANGEVISUALIZATION_CHANGE_RENAME_TO";
33
- var sDescriptionText = oRtaResourceBundle.getText(
33
+ const sDescriptionText = oRtaResourceBundle.getText(
34
34
  sKey,
35
35
  [
36
36
  ChangeVisualizationUtils.shortenString(mPayload.newLabel) || sFallbackLabel,
37
37
  ChangeVisualizationUtils.shortenString(mPayload.originalLabel)
38
38
  ]
39
39
  );
40
- var sDescriptionTooltip = oRtaResourceBundle.getText(
40
+ const sDescriptionTooltip = oRtaResourceBundle.getText(
41
41
  sKey,
42
42
  [
43
43
  mPayload.newLabel || sFallbackLabel,
@@ -13,7 +13,7 @@ sap.ui.define([
13
13
  ) {
14
14
  "use strict";
15
15
 
16
- var SplitVisualization = {};
16
+ const SplitVisualization = {};
17
17
 
18
18
  /**
19
19
  * Creates a localized description and button text for split changes based on the provided
@@ -24,10 +24,10 @@ sap.ui.define([
24
24
  * @returns {object} Localized description text and button text
25
25
  */
26
26
  SplitVisualization.getDescription = function(mPayload, sLabel) {
27
- var oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
28
- var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [ChangeVisualizationUtils.shortenString(sLabel)]);
29
- var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [sLabel]);
30
- var sButtonText = oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_SPLIT");
27
+ const oRtaResourceBundle = Lib.getResourceBundleFor("sap.ui.rta");
28
+ const sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [ChangeVisualizationUtils.shortenString(sLabel)]);
29
+ const sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [sLabel]);
30
+ const sButtonText = oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_SPLIT");
31
31
  return { descriptionText: sDescriptionText, descriptionTooltip: sDescriptionTooltip, buttonText: sButtonText};
32
32
  };
33
33
 
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  ) {
20
20
  "use strict";
21
21
 
22
- var mCommands = {
22
+ const mCommands = {
23
23
  rename: RenameVisualization,
24
24
  move: MoveVisualization,
25
25
  combine: CombineVisualization,
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  };
29
29
 
30
30
  return function(mIndicatorInformation) {
31
- var sCommandName = mIndicatorInformation.commandName;
31
+ let sCommandName = mIndicatorInformation.commandName;
32
32
 
33
33
  // Settings commands can be assigned to existing categories
34
34
  // (e.g. "move" to display the "Show Source" button)
@@ -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.2
30
+ * @version 1.138.0
31
31
  * @constructor
32
32
  * @since 1.136
33
33
  * @private
@@ -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.2
34
+ * @version 1.138.0
37
35
  * @constructor
38
36
  * @since 1.129
39
37
  * @private
@@ -51,6 +49,25 @@ 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());
@@ -63,15 +80,14 @@ sap.ui.define([
63
80
  return;
64
81
  }
65
82
  const oWhatsNewDialogModel = new JSONModel();
66
- const aVisibleFeatures = this.aUnseenFeatures.filter((oFeature) => !aExcludeFeatureIds.includes(oFeature.featureId));
67
- if (aVisibleFeatures.length === 0) {
83
+ this.aUnseenFeatures = this.aUnseenFeatures.filter((oFeature) => !aExcludeFeatureIds.includes(oFeature.featureId));
84
+ if (this.aUnseenFeatures.length === 0) {
68
85
  return;
69
86
  }
70
- oWhatsNewDialogModel.setData({ featureCollection: aVisibleFeatures });
87
+ oWhatsNewDialogModel.setData({ featureCollection: this.aUnseenFeatures });
71
88
  if (!this.oWhatsNewDialog) {
72
89
  await this.createWhatsNewDialog(oWhatsNewDialogModel);
73
90
  }
74
- ReloadManager.setDontShowWhatsNewAfterReload();
75
91
  this.oWhatsNewDialog.open();
76
92
  };
77
93
 
@@ -83,6 +99,16 @@ sap.ui.define([
83
99
  });
84
100
  this.oWhatsNewDialog.setModel(oRTAResourceModel, "i18n");
85
101
  this.oWhatsNewDialog.setModel(oWhatsNewDialogModel, "whatsNewModel");
102
+
103
+ // Dynamically enable/disable the Learn More button based on the current carousel page
104
+ const oCarousel = Element.getElementById("sapWhatsNewDialogCarousel");
105
+ if (oCarousel) {
106
+ oCarousel.attachEvent("pageChanged", () => {
107
+ updateLearnMoreButton.call(this, oCarousel);
108
+ });
109
+ // Initial state
110
+ updateLearnMoreButton.call(this, oCarousel);
111
+ }
86
112
  };
87
113
 
88
114
  WhatsNew.prototype.closeWhatsNewDialog = function() {