@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
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @namespace sap.ui.rta.util.ReloadManager
31
31
  * @alias sap.ui.rta.util.ReloadManager
32
32
  * @since 1.104
33
- * @version 1.128.0
33
+ * @version 1.130.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -80,7 +80,7 @@ sap.ui.define([
80
80
  return "MSG_RELOAD_WITH_PERSONALIZATION_AND_VIEWS";
81
81
  }
82
82
 
83
- if (oReloadInfo.initialDraftGotActivated) {
83
+ if (oReloadInfo.initialDraftGotActivated || oReloadInfo.activeVersionNotSelected) {
84
84
  return "MSG_RELOAD_ACTIVATED_DRAFT";
85
85
  }
86
86
 
@@ -181,6 +181,29 @@ sap.ui.define([
181
181
  return !!window.sessionStorage.getItem(`sap.ui.rta.restart.${sLayer}`);
182
182
  };
183
183
 
184
+ /**
185
+ * Sets a flag in sessionStorage to indicate that the "What's New" dialog should not be shown after rta reload.
186
+ */
187
+ ReloadManager.setDontShowWhatsNewAfterReload = () => {
188
+ window.sessionStorage.setItem(`sap.ui.rta.whatsNew`, true);
189
+ };
190
+
191
+ /**
192
+ * Checks if the "What's New" dialog should be shown rta after reload.
193
+ *
194
+ * @returns {boolean} Returns true if the "What's New" dialog should be shown, false otherwise.
195
+ */
196
+ ReloadManager.getDontShowWhatsNewAfterReload = () => {
197
+ return window.sessionStorage.getItem(`sap.ui.rta.whatsNew`);
198
+ };
199
+
200
+ /**
201
+ * Removes the flag from sessionStorage that indicates the "What's New" dialog should not be shown after reload.
202
+ */
203
+ ReloadManager.removeDontShowWhatsNewAfterReload = () => {
204
+ window.sessionStorage.removeItem(`sap.ui.rta.whatsNew`);
205
+ };
206
+
184
207
  /**
185
208
  * Triggers the reload of the page. Can either be a soft reload inside the FLP or a hard reload.
186
209
  *
@@ -19,7 +19,7 @@ function(
19
19
  *
20
20
  * @extends sap.ui.core.EventBus
21
21
  * @author SAP SE
22
- * @version 1.128.0
22
+ * @version 1.130.0
23
23
  * @private
24
24
  * @since 1.56.0
25
25
  * @alias sap.ui.rta.util.ServiceEventBus
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  *
28
28
  * @extends sap.ui.base.ManagedObject
29
29
  * @author SAP SE
30
- * @version 1.128.0
30
+ * @version 1.130.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.121
@@ -73,7 +73,7 @@ sap.ui.define([
73
73
 
74
74
  ServiceManager.prototype.getServices = function() {
75
75
  // without this changing the property would also change the default Value
76
- return Object.assign({}, this.getProperty("services"));
76
+ return { ...this.getProperty("services") };
77
77
  };
78
78
 
79
79
  /**
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
47
47
  * @author SAP SE
48
48
  * @since 1.84.0
49
- * @version 1.128.0
49
+ * @version 1.130.0
50
50
  * @private
51
51
  */
52
52
  const ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -133,13 +133,6 @@ sap.ui.define([
133
133
  if (sTooltip) {
134
134
  oRm.attr("title", sTooltip);
135
135
  }
136
- if (oControl.getChanges().length > 4) {
137
- oRm.class("sapUiRtaChangeIndicatorColorDark");
138
- } else if (oControl.getChanges().length > 1) {
139
- oRm.class("sapUiRtaChangeIndicatorColorMedium");
140
- } else {
141
- oRm.class("sapUiRtaChangeIndicatorColorLight");
142
- }
143
136
  oRm.openEnd();
144
137
  if (sTooltip) {
145
138
  oRm.openStart("span", `${oControl.getId()}-tooltip`);
@@ -22,6 +22,16 @@
22
22
  enabled="{visualizationModel>/hasDirtyChanges}"/>
23
23
  </items>
24
24
  </SegmentedButton>
25
+ <List
26
+ class="sapUiRtaChangesList"
27
+ items="{visualizationModel>/changeCategories/}">
28
+ <StandardListItem
29
+ title="{visualizationModel>title}"
30
+ counter="{visualizationModel>count}"
31
+ type="{= ${visualizationModel>count} > 0 ? 'Active' : 'Inactive'}"
32
+ icon="{visualizationModel>icon}"
33
+ press=".onChangeCategorySelection"/>
34
+ </List>
25
35
  <MessageStrip
26
36
  text="{visualizationModel>/popupInfoMessage}"
27
37
  type="Information"
@@ -33,15 +43,5 @@
33
43
  href="https://ui5.sap.com/#/topic/35274280504f42cd87cc4fd3d403ca91.html#loio35274280504f42cd87cc4fd3d403ca91/visualization"/>
34
44
  </link>
35
45
  </MessageStrip>
36
- <List
37
- class="sapUiRtaChangesList"
38
- items="{visualizationModel>/changeCategories/}">
39
- <StandardListItem
40
- title="{visualizationModel>title}"
41
- counter="{visualizationModel>count}"
42
- type="{= ${visualizationModel>count} > 0 ? 'Active' : 'Inactive'}"
43
- icon="{visualizationModel>icon}"
44
- press=".onChangeCategorySelection"/>
45
- </List>
46
46
  </Popover>
47
47
  </core:FragmentDefinition>
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
38
38
  * @author SAP SE
39
39
  * @since 1.86.0
40
- * @version 1.128.0
40
+ * @version 1.130.0
41
41
  * @private
42
42
  */
43
43
  const ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
@@ -81,7 +81,7 @@ sap.ui.define([
81
81
  */
82
82
  ChangeIndicatorRegistry.prototype.getAllRegisteredChanges = function() {
83
83
  return values(this._oRegisteredChanges || {}).map(function(oChange) {
84
- return Object.assign({}, oChange);
84
+ return { ...oChange };
85
85
  });
86
86
  };
87
87
 
@@ -101,7 +101,7 @@ sap.ui.define([
101
101
  * @returns {object} Registered change
102
102
  */
103
103
  ChangeIndicatorRegistry.prototype.getRegisteredChange = function(sChangeId) {
104
- return this._oRegisteredChanges[sChangeId] && Object.assign({}, this._oRegisteredChanges[sChangeId]);
104
+ return this._oRegisteredChanges[sChangeId] && { ...this._oRegisteredChanges[sChangeId] };
105
105
  };
106
106
 
107
107
  /**
@@ -118,16 +118,14 @@ sap.ui.define([
118
118
  if (oChangeIndicators[sSelectorId] === undefined) {
119
119
  oChangeIndicators[sSelectorId] = [];
120
120
  }
121
- oChangeIndicators[sSelectorId].push(Object.assign(
122
- {
123
- id: oChangeIndicatorData.change.getId(),
124
- dependent: bDependent,
125
- affectedElementId: sAffectedElementId || sPreviousAffectedElementId,
126
- displayElementsKey: oChangeIndicatorData.visualizationInfo.displayElementIds.toString(),
127
- descriptionPayload: oChangeIndicatorData.visualizationInfo.descriptionPayload || {}
128
- },
129
- _omit(oChangeIndicatorData, ["visualizationInfo"])
130
- ));
121
+ oChangeIndicators[sSelectorId].push({
122
+ id: oChangeIndicatorData.change.getId(),
123
+ dependent: bDependent,
124
+ affectedElementId: sAffectedElementId || sPreviousAffectedElementId,
125
+ displayElementsKey: oChangeIndicatorData.visualizationInfo.displayElementIds.toString(),
126
+ descriptionPayload: oChangeIndicatorData.visualizationInfo.descriptionPayload || {},
127
+ ..._omit(oChangeIndicatorData, ["visualizationInfo"])
128
+ });
131
129
  sPreviousAffectedElementId = sAffectedElementId || sPreviousAffectedElementId;
132
130
  }
133
131
 
@@ -84,7 +84,7 @@ sap.ui.define([
84
84
  * @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
85
85
  * @author SAP SE
86
86
  * @since 1.84.0
87
- * @version 1.128.0
87
+ * @version 1.130.0
88
88
  * @private
89
89
  */
90
90
  const ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
@@ -323,9 +323,15 @@ sap.ui.define([
323
323
  return this._oTextBundle.getText(sLabelKey, [iChangesCount]);
324
324
  };
325
325
 
326
- ChangeVisualization.prototype._getChangeCategoryButton = function(sChangeCategoryName) {
326
+ ChangeVisualization.prototype._getChangeCategoryButtonText = function(sChangeCategoryName) {
327
327
  const sButtonKey = `BTN_CHANGEVISUALIZATION_OVERVIEW_${sChangeCategoryName.toUpperCase()}`;
328
- return this._oTextBundle.getText(sButtonKey);
328
+ const sBaseText = this._oTextBundle.getText(sButtonKey);
329
+ const sVisualizedChangeState = this._oChangeVisualizationModel.getData().changeState;
330
+ if (sVisualizedChangeState === ChangeStates.ALL) {
331
+ return sBaseText;
332
+ }
333
+ const sStateText = this._oTextBundle.getText(`BUT_CHANGEVISUALIZATION_VERSIONING_${sVisualizedChangeState.toUpperCase()}`);
334
+ return `${sBaseText} (${sStateText})`;
329
335
  };
330
336
 
331
337
  ChangeVisualization.prototype.openChangeCategorySelectionPopover = function(oEvent) {
@@ -369,6 +375,7 @@ sap.ui.define([
369
375
  ChangeVisualization.prototype.onChangeCategorySelection = function(oEvent) {
370
376
  const sSelectedChangeCategory = oEvent.getSource().getBindingContext("visualizationModel").getObject().key;
371
377
  this._selectChangeCategory(sSelectedChangeCategory);
378
+ this.getPopover()?.close();
372
379
  };
373
380
 
374
381
  ChangeVisualization.prototype.onVersioningCategoryChange = function(oEvent) {
@@ -379,7 +386,7 @@ sap.ui.define([
379
386
  ChangeVisualization.prototype._selectChangeCategory = function(sSelectedChangeCategory) {
380
387
  this._sSelectedChangeCategory = sSelectedChangeCategory;
381
388
 
382
- const sChangeCategoryText = this._getChangeCategoryButton(sSelectedChangeCategory);
389
+ const sChangeCategoryText = this._getChangeCategoryButtonText(sSelectedChangeCategory);
383
390
 
384
391
  this._updateVisualizationModel({
385
392
  changeCategory: sSelectedChangeCategory,
@@ -393,8 +400,12 @@ sap.ui.define([
393
400
  ChangeVisualization.prototype._selectChangeState = function(sSelectedChangeState) {
394
401
  this._sSelectedChangeState = sSelectedChangeState;
395
402
 
403
+ const sSelectedChangeCategory = this._oChangeVisualizationModel.getData().changeCategory;
404
+ const sChangeCategoryText = this._getChangeCategoryButtonText(sSelectedChangeCategory);
405
+
396
406
  this._updateVisualizationModel({
397
- changeState: sSelectedChangeState
407
+ changeState: sSelectedChangeState,
408
+ changeCategoryText: sChangeCategoryText
398
409
  });
399
410
 
400
411
  this._updateChangeIndicators();
@@ -515,11 +526,10 @@ sap.ui.define([
515
526
  };
516
527
 
517
528
  ChangeVisualization.prototype._updateVisualizationModel = function(oData) {
518
- this._oChangeVisualizationModel.setData(Object.assign(
519
- {},
520
- this._oChangeVisualizationModel.getData(),
521
- oData
522
- ));
529
+ this._oChangeVisualizationModel.setData({
530
+ ...this._oChangeVisualizationModel.getData(),
531
+ ...oData
532
+ });
523
533
  };
524
534
 
525
535
  ChangeVisualization.prototype._updateChangeIndicators = function() {
@@ -616,30 +626,38 @@ sap.ui.define([
616
626
  this._oChangeIndicatorRegistry.registerChangeIndicator(sSelectorId, oChangeIndicator);
617
627
  };
618
628
 
619
- ChangeVisualization.prototype._setFocusedIndicator = function() {
629
+ ChangeVisualization.prototype._setFocusedIndicator = async function() {
620
630
  // Sort the Indicators according XY-Position
621
631
  // Set the tabindex according the sorting
622
632
  // Focus the first visible indicator
623
- this._oChangeIndicatorRegistry.waitForIndicatorRendering()
624
- .then(() => {
625
- const aVisibleIndicators = this._oChangeIndicatorRegistry.getChangeIndicators().filter((oIndicator) => {
626
- // As setting the focus happens asynchronously after rendering,
627
- // the overlay can be gone by the time this code is executed
628
- return oIndicator.getVisible() && OverlayRegistry.getOverlay(oIndicator.getOverlayId());
629
- })
630
- .sort(function(oIndicator1, oIndicator2) {
633
+ await this._oChangeIndicatorRegistry.waitForIndicatorRendering();
634
+ const aVisibleIndicators = [];
635
+ this._oChangeIndicatorRegistry.getChangeIndicators().forEach((oIndicator) => {
636
+ const oOverlay = OverlayRegistry.getOverlay(oIndicator.getOverlayId());
637
+ // As setting the focus happens asynchronously after rendering,
638
+ // the overlay can be gone by the time this code is executed
639
+ if (!oOverlay) {
640
+ return;
641
+ }
642
+ if (oIndicator.getVisible()) {
643
+ oOverlay.setFocusable(true);
644
+ aVisibleIndicators.push(oIndicator);
645
+ } else {
646
+ oOverlay.setFocusable(false);
647
+ }
648
+ });
649
+
650
+ if (aVisibleIndicators.length > 0) {
651
+ aVisibleIndicators.sort(function(oIndicator1, oIndicator2) {
631
652
  const iDeltaY = oIndicator1.getPosY() - oIndicator2.getPosY();
632
653
  const iDeltaX = oIndicator1.getPosX() - oIndicator2.getPosX();
633
654
  // Only consider x value if y is the same
634
655
  return iDeltaY || iDeltaX;
635
656
  });
636
-
637
- if (aVisibleIndicators.length === 0) {
638
- return;
639
- }
640
-
641
657
  const aVisibleIndicatorsOnScrollPosition = [];
642
658
  aVisibleIndicators.forEach(function(oIndicator, iIndex) {
659
+ const oOverlay = OverlayRegistry.getOverlay(oIndicator.getOverlayId());
660
+ oOverlay.setFocusable(true);
643
661
  oIndicator.getDomRef().tabIndex = iIndex + 2;
644
662
  // Indicators with posY < 0 are outside of the current scroll position
645
663
  if (oIndicator.getPosY() > 0) {
@@ -653,7 +671,7 @@ sap.ui.define([
653
671
  } else {
654
672
  aVisibleIndicators[0].focus();
655
673
  }
656
- });
674
+ }
657
675
  };
658
676
 
659
677
  ChangeVisualization.prototype._toggleRootOverlayClickHandler = function(bEnable) {
@@ -685,6 +703,17 @@ sap.ui.define([
685
703
  this.oMenuButton = oToolbar.getControl("toggleChangeVisualizationMenuButton");
686
704
  this.oRootOverlay = OverlayRegistry.getOverlay(oRootControl);
687
705
  this.setVersionsModel(oToolbar);
706
+ // When the visualization is started, the focusable overlays are stored to be reset when the visualization is stopped
707
+ this.aFocusableOverlays ||= OverlayRegistry.getOverlays().filter(function(oOverlay) {
708
+ return oOverlay.getFocusable();
709
+ });
710
+
711
+ const fnSetOverlayFocusability = (bFocusable) => {
712
+ this.aFocusableOverlays.forEach(function(oOverlay) {
713
+ oOverlay.setFocusable(bFocusable);
714
+ });
715
+ };
716
+
688
717
  if (this.oVersionsModel && this.oVersionsModel.getData().versioningEnabled) {
689
718
  this._updateVisualizationModel({
690
719
  versioningAvailable: this.oVersionsModel.getData().versioningEnabled,
@@ -698,15 +727,20 @@ sap.ui.define([
698
727
  });
699
728
  }
700
729
 
730
+ // Clean up when the visualization is no longer active
701
731
  if (this.getIsActive()) {
702
732
  this.setIsActive(false);
703
733
  this._toggleRootOverlayClickHandler(false);
734
+ fnSetOverlayFocusability(true);
735
+ delete this.aFocusableOverlays;
704
736
  return;
705
737
  }
738
+ fnSetOverlayFocusability(false);
706
739
  this._toggleRootOverlayClickHandler(true);
707
740
  if (!this.getRootControlId()) {
708
741
  this.setRootControlId(oRootControl);
709
742
  }
743
+
710
744
  this.setIsActive(true);
711
745
  // show all change visualizations at startup
712
746
  this._updateChangeRegistry()
@@ -0,0 +1,111 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/m/library",
9
+ "sap/ui/base/ManagedObject",
10
+ "sap/ui/core/Element",
11
+ "sap/ui/core/Fragment",
12
+ "sap/ui/fl/write/api/FeaturesAPI",
13
+ "sap/ui/model/json/JSONModel",
14
+ "sap/ui/model/resource/ResourceModel",
15
+ "sap/ui/rta/util/ReloadManager",
16
+ "sap/ui/rta/util/whatsNew/WhatsNewUtils"
17
+ ], function(
18
+ mLibrary,
19
+ ManagedObject,
20
+ Element,
21
+ Fragment,
22
+ FeaturesAPI,
23
+ JSONModel,
24
+ ResourceModel,
25
+ ReloadManager,
26
+ WhatsNewUtils
27
+ ) {
28
+ "use strict";
29
+
30
+ const oURLHelper = mLibrary.URLHelper;
31
+
32
+ /**
33
+ * @class Constructor for a new sap.ui.rta.util.whatsNew.WhatsNew
34
+ * @extends sap.ui.base.ManagedObject
35
+ * @author SAP SE
36
+ * @version 1.130.0
37
+ * @constructor
38
+ * @since 1.129
39
+ * @private
40
+ * @ui5-restricted sap.ui.rta
41
+ */
42
+ const WhatsNew = ManagedObject.extend("sap.ui.rta.util.whatsNew.WhatsNew", {
43
+ metadata: {
44
+ properties: {
45
+ dontShowAgainFeatureIds: { type: "array", defaultValue: [] },
46
+ layer: { type: "string", defaultValue: "" }
47
+ },
48
+ aggregations: {
49
+ whatsNewDialog: { type: "sap.m.Dialog", multiple: false }
50
+ }
51
+ }
52
+ });
53
+
54
+ WhatsNew.prototype.setDontShowAgainFeatureIds = async function(aDontShowAgainFeatureIds) {
55
+ this.setProperty("dontShowAgainFeatureIds", aDontShowAgainFeatureIds);
56
+ this.aUnseenFeatures = await WhatsNewUtils.getFilteredFeatures(aDontShowAgainFeatureIds, this.getLayer());
57
+ };
58
+
59
+ WhatsNew.prototype.initializeWhatsNewDialog = async function() {
60
+ const aDontShowAgainFeatureIds = await FeaturesAPI.getSeenFeatureIds({ layer: this.getLayer() });
61
+ await this.setDontShowAgainFeatureIds(aDontShowAgainFeatureIds);
62
+ if (this.aUnseenFeatures.length === 0 || this.getLayer() !== "CUSTOMER") {
63
+ return;
64
+ }
65
+ const oWhatsNewDialogModel = new JSONModel();
66
+ oWhatsNewDialogModel.setData({ featureCollection: this.aUnseenFeatures });
67
+ if (!this.oWhatsNewDialog) {
68
+ await this.createWhatsNewDialog(oWhatsNewDialogModel);
69
+ }
70
+ ReloadManager.setDontShowWhatsNewAfterReload();
71
+ this.oWhatsNewDialog.open();
72
+ };
73
+
74
+ WhatsNew.prototype.createWhatsNewDialog = async function(oWhatsNewDialogModel) {
75
+ const oRTAResourceModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
76
+ this.oWhatsNewDialog = await Fragment.load({
77
+ name: "sap.ui.rta.util.whatsNew.WhatsNewDialog",
78
+ controller: this
79
+ });
80
+ this.oWhatsNewDialog.setModel(oRTAResourceModel, "i18n");
81
+ this.oWhatsNewDialog.setModel(oWhatsNewDialogModel, "whatsNewModel");
82
+ };
83
+
84
+ WhatsNew.prototype.closeWhatsNewDialog = function() {
85
+ if (this.oWhatsNewDialog) {
86
+ const oDontShowAgainCheckbox = Element.getElementById("whatsNewDialog_DontShowAgain");
87
+ if (oDontShowAgainCheckbox.getSelected()) {
88
+ const aUnseenFeatureIds = this.aUnseenFeatures.map((oUnseenFeature) => oUnseenFeature.featureId);
89
+ const aSeenFeatureIds = [...this.getDontShowAgainFeatureIds(), ...aUnseenFeatureIds];
90
+ const mPropertyBag = { layer: this.getLayer(), seenFeatureIds: aSeenFeatureIds };
91
+ FeaturesAPI.setSeenFeatureIds(mPropertyBag);
92
+ }
93
+ this.oWhatsNewDialog.close();
94
+ }
95
+ };
96
+
97
+ WhatsNew.prototype.onLearnMorePress = function() {
98
+ const sActivePageId = Element.getElementById("sapWhatsNewDialogCarousel").getActivePage();
99
+ const sLearnMoreUrl = WhatsNewUtils.getLearnMoreURL(sActivePageId, this.aUnseenFeatures);
100
+ oURLHelper.redirect(sLearnMoreUrl, true);
101
+ };
102
+
103
+ WhatsNew.prototype.destroy = function(...aArgs) {
104
+ ManagedObject.prototype.destroy.apply(this, aArgs);
105
+ if (this.oWhatsNewDialog) {
106
+ this.oWhatsNewDialog.destroy();
107
+ }
108
+ };
109
+
110
+ return WhatsNew;
111
+ });
@@ -0,0 +1,81 @@
1
+ <core:FragmentDefinition
2
+ xmlns:core="sap.ui.core"
3
+ xmlns="sap.m"
4
+ xmlns:grid="sap.ui.layout.cssgrid"
5
+ xmlns:f="sap.f"
6
+ xmlns:util="sap.ui.fl.util">
7
+ <Dialog
8
+ id="sapUiRtaWhatsNewDialog"
9
+ title="{i18n>TIT_WHATS_NEW_DIALOG}"
10
+ contentWidth="50rem"
11
+ contentHeight="33rem"
12
+ horizontalScrolling="false">
13
+ <content>
14
+ <Carousel
15
+ id="sapWhatsNewDialogCarousel"
16
+ loop="true"
17
+ pages="{path: 'whatsNewModel>/featureCollection', templateShareable: false}"
18
+ height="33rem"
19
+ width="100%">
20
+ <pages>
21
+ <Page enableScrolling="true" showHeader="false">
22
+ <VBox height="100%" width="100%">
23
+ <Title text="{whatsNewModel>title}" class="sapUiMediumMarginTop sapUiLargeMarginBegin sapUiTinyMarginBottom" level="H3"/>
24
+ <f:Card width="44rem" height="24rem" class="sapUiLargeMarginBeginEnd sapUiSmallMarginBottom">
25
+ <f:content>
26
+ <Page showHeader="false" backgroundDesign="Transparent">
27
+ <VBox items="{path: 'whatsNewModel>information', templateShareable: false}" class="sapUiSmallMargin">
28
+ <HBox alignItems="Center" class="sapUiTinyMargin">
29
+ <FormattedText
30
+ visible="{= (${whatsNewModel>image} === null ? true : false) &amp;&amp; (${whatsNewModel>text} !== null ? true : false)}"
31
+ htmlText="{whatsNewModel>text}"
32
+ />
33
+ <Image
34
+ src= "{whatsNewModel>image}"
35
+ visible="{= (${whatsNewModel>image} !== null ? true : false) &amp;&amp; (${whatsNewModel>text} === null ? true : false)}"
36
+ class="whatsNewImage"
37
+ width="100%"
38
+ />
39
+ <grid:CSSGrid
40
+ visible="{= (${whatsNewModel>image} !== null ? true : false) &amp;&amp; (${whatsNewModel>text} !== null ? true : false)}"
41
+ gridTemplateColumns="2fr 3fr"
42
+ gridGap="1rem">
43
+ <Image
44
+ src= "{whatsNewModel>image}"
45
+ class="whatsNewImage"
46
+ width="100%"/>
47
+ <HBox alignItems="Center">
48
+ <FormattedText htmlText="{whatsNewModel>text}"/>
49
+ </HBox>
50
+ </grid:CSSGrid>
51
+ </HBox>
52
+ </VBox>
53
+ </Page>
54
+ </f:content>
55
+ </f:Card>
56
+ </VBox>
57
+ </Page>
58
+ </pages>
59
+ </Carousel>
60
+ </content>
61
+ <footer>
62
+ <Toolbar>
63
+ <content>
64
+ <CheckBox
65
+ id="whatsNewDialog_DontShowAgain"
66
+ text="{i18n>TXT_DONT_SHOW_AGAIN_WHATS_NEW_DIALOG}">
67
+ </CheckBox>
68
+ <ToolbarSpacer />
69
+ <Button
70
+ id="sapUiRtaWhatsNewDialog_LearnMore"
71
+ text="{i18n>BTN_LEARN_MORE_WHATS_NEW_DIALOG}"
72
+ press=".onLearnMorePress"/>
73
+ <Button
74
+ id="sapUiRtaWhatsNewDialog_ButtonClose"
75
+ text="{i18n>BTN_CLOSE_FEEDBACK_DIALOG}"
76
+ press=".closeWhatsNewDialog"/>
77
+ </content>
78
+ </Toolbar>
79
+ </footer>
80
+ </Dialog>
81
+ </core:FragmentDefinition>
@@ -0,0 +1,82 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/m/library",
9
+ "sap/ui/core/Fragment",
10
+ "sap/ui/model/json/JSONModel",
11
+ "sap/ui/model/resource/ResourceModel",
12
+ "sap/ui/rta/util/whatsNew/WhatsNewUtils"
13
+ ], function(
14
+ mLibrary,
15
+ Fragment,
16
+ JSONModel,
17
+ ResourceModel,
18
+ WhatsNewUtils
19
+ ) {
20
+ "use strict";
21
+ const WhatsNewOverview = {};
22
+ const oURLHelper = mLibrary.URLHelper;
23
+ let oWhatsNewOverviewDialog;
24
+ let aWhatsNewOverviewContent;
25
+
26
+ async function getWhatsNewOverviewContent() {
27
+ const aFeatures = await WhatsNewUtils.getFilteredFeatures([]);
28
+ return [...aFeatures].reverse();
29
+ }
30
+
31
+ WhatsNewOverview.openWhatsNewOverviewDialog = async function() {
32
+ const oWhatsNewDialogModel = new JSONModel();
33
+ aWhatsNewOverviewContent = await getWhatsNewOverviewContent();
34
+ oWhatsNewDialogModel.setData({ featureCollection: aWhatsNewOverviewContent });
35
+ oWhatsNewDialogModel.setProperty("overviewActive", true);
36
+ if (!oWhatsNewOverviewDialog) {
37
+ await WhatsNewOverview.createWhatsNewOverviewDialog(oWhatsNewDialogModel);
38
+ }
39
+ oWhatsNewOverviewDialog.open();
40
+
41
+ return oWhatsNewOverviewDialog;
42
+ };
43
+
44
+ WhatsNewOverview.createWhatsNewOverviewDialog = async function(oWhatsNewDialogModel) {
45
+ const oRTAResourceModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
46
+ oWhatsNewOverviewDialog = await Fragment.load(
47
+ {
48
+ name: "sap.ui.rta.util.whatsNew.WhatsNewOverviewDialog",
49
+ controller: WhatsNewOverview
50
+ }
51
+ );
52
+ oWhatsNewOverviewDialog.setModel(oRTAResourceModel, "i18n");
53
+ oWhatsNewOverviewDialog.setModel(oWhatsNewDialogModel, "whatsNewModel");
54
+ };
55
+
56
+ WhatsNewOverview.closeWhatsNewOverviewDialog = function() {
57
+ if (oWhatsNewOverviewDialog) {
58
+ oWhatsNewOverviewDialog.close();
59
+ }
60
+ };
61
+
62
+ WhatsNewOverview.backToOverview = function() {
63
+ var oContext = oWhatsNewOverviewDialog.getBindingContext("whatsNewModel");
64
+ oContext.setProperty("overviewActive", true);
65
+ };
66
+
67
+ WhatsNewOverview.onSelectListItem = function(oEvent) {
68
+ const oSelectedItem = oEvent.getSource();
69
+ const oContext = oSelectedItem.getBindingContext("whatsNewModel");
70
+ const sPath = oContext.getPath();
71
+ oContext.setProperty("overviewActive", false);
72
+ oWhatsNewOverviewDialog.bindElement({ path: sPath, model: "whatsNewModel" });
73
+ };
74
+
75
+ WhatsNewOverview.onLearnMorePress = function(oEvent) {
76
+ const sPath = oEvent.getSource().getBindingContext("whatsNewModel").getPath();
77
+ const sLearnMoreUrl = WhatsNewUtils.getLearnMoreURL(sPath, aWhatsNewOverviewContent);
78
+ oURLHelper.redirect(sLearnMoreUrl, true);
79
+ };
80
+
81
+ return WhatsNewOverview;
82
+ });