@openui5/sap.ui.rta 1.104.0 → 1.105.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 (151) hide show
  1. package/.reuse/dep5 +1 -1
  2. package/THIRDPARTY.txt +1 -1
  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 +12 -6
  7. package/src/sap/ui/rta/Utils.js +1 -1
  8. package/src/sap/ui/rta/api/startAdaptation.js +2 -2
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +2 -2
  10. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  11. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +5 -3
  12. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  13. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  14. package/src/sap/ui/rta/command/AddXML.js +1 -1
  15. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  16. package/src/sap/ui/rta/command/AppDescriptorCommand.js +8 -3
  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 +1 -1
  21. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  23. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  24. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
  25. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
  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 +1 -1
  30. package/src/sap/ui/rta/command/LREPSerializer.js +11 -8
  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 +3 -3
  41. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  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/enablement/elementActionTest.js +1 -1
  47. package/src/sap/ui/rta/library.js +2 -2
  48. package/src/sap/ui/rta/messagebundle_ar.properties +13 -1
  49. package/src/sap/ui/rta/messagebundle_bg.properties +13 -1
  50. package/src/sap/ui/rta/messagebundle_ca.properties +13 -1
  51. package/src/sap/ui/rta/messagebundle_cs.properties +13 -1
  52. package/src/sap/ui/rta/messagebundle_cy.properties +13 -1
  53. package/src/sap/ui/rta/messagebundle_da.properties +13 -1
  54. package/src/sap/ui/rta/messagebundle_de.properties +13 -1
  55. package/src/sap/ui/rta/messagebundle_el.properties +13 -1
  56. package/src/sap/ui/rta/messagebundle_en.properties +13 -1
  57. package/src/sap/ui/rta/messagebundle_en_GB.properties +13 -1
  58. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
  59. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +13 -1
  60. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +13 -1
  61. package/src/sap/ui/rta/messagebundle_es.properties +13 -1
  62. package/src/sap/ui/rta/messagebundle_es_MX.properties +13 -1
  63. package/src/sap/ui/rta/messagebundle_et.properties +13 -1
  64. package/src/sap/ui/rta/messagebundle_fi.properties +13 -1
  65. package/src/sap/ui/rta/messagebundle_fr.properties +13 -1
  66. package/src/sap/ui/rta/messagebundle_fr_CA.properties +13 -1
  67. package/src/sap/ui/rta/messagebundle_hi.properties +13 -1
  68. package/src/sap/ui/rta/messagebundle_hr.properties +13 -1
  69. package/src/sap/ui/rta/messagebundle_hu.properties +13 -1
  70. package/src/sap/ui/rta/messagebundle_id.properties +13 -1
  71. package/src/sap/ui/rta/messagebundle_it.properties +13 -1
  72. package/src/sap/ui/rta/messagebundle_iw.properties +13 -1
  73. package/src/sap/ui/rta/messagebundle_ja.properties +13 -1
  74. package/src/sap/ui/rta/messagebundle_kk.properties +13 -1
  75. package/src/sap/ui/rta/messagebundle_ko.properties +13 -1
  76. package/src/sap/ui/rta/messagebundle_lt.properties +13 -1
  77. package/src/sap/ui/rta/messagebundle_lv.properties +13 -1
  78. package/src/sap/ui/rta/messagebundle_ms.properties +13 -1
  79. package/src/sap/ui/rta/messagebundle_nl.properties +13 -1
  80. package/src/sap/ui/rta/messagebundle_no.properties +13 -1
  81. package/src/sap/ui/rta/messagebundle_pl.properties +13 -1
  82. package/src/sap/ui/rta/messagebundle_pt.properties +13 -1
  83. package/src/sap/ui/rta/messagebundle_pt_PT.properties +13 -1
  84. package/src/sap/ui/rta/messagebundle_ro.properties +13 -1
  85. package/src/sap/ui/rta/messagebundle_ru.properties +13 -1
  86. package/src/sap/ui/rta/messagebundle_sh.properties +13 -1
  87. package/src/sap/ui/rta/messagebundle_sk.properties +13 -1
  88. package/src/sap/ui/rta/messagebundle_sl.properties +13 -1
  89. package/src/sap/ui/rta/messagebundle_sv.properties +13 -1
  90. package/src/sap/ui/rta/messagebundle_th.properties +13 -1
  91. package/src/sap/ui/rta/messagebundle_tr.properties +13 -1
  92. package/src/sap/ui/rta/messagebundle_uk.properties +13 -1
  93. package/src/sap/ui/rta/messagebundle_vi.properties +13 -1
  94. package/src/sap/ui/rta/messagebundle_zh_CN.properties +13 -1
  95. package/src/sap/ui/rta/messagebundle_zh_TW.properties +13 -1
  96. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  97. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  98. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  99. package/src/sap/ui/rta/plugin/CompVariant.js +2 -2
  100. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -15
  101. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  102. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  103. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  104. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  105. package/src/sap/ui/rta/plugin/EasyRemove.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/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.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/iframe/AddIFrame.js +1 -1
  123. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  124. package/src/sap/ui/rta/service/Action.js +1 -1
  125. package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
  126. package/src/sap/ui/rta/service/Outline.js +1 -1
  127. package/src/sap/ui/rta/service/Property.js +1 -1
  128. package/src/sap/ui/rta/service/Selection.js +1 -1
  129. package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
  130. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  131. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  132. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  133. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  134. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  135. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  136. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  137. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  138. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  139. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  140. package/src/sap/ui/rta/util/ReloadManager.js +3 -2
  141. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  142. package/src/sap/ui/rta/util/adaptationStarter.js +2 -2
  143. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +80 -48
  144. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +100 -55
  145. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +21 -101
  146. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +2 -2
  147. package/src/sap/ui/rta/util/changeVisualization/categories/CombineVisualization.js +2 -2
  148. package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +3 -3
  149. package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +2 -2
  150. package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +2 -2
  151. package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +8 -3
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * Provides Rename handling functionality
58
58
  *
59
59
  * @author SAP SE
60
- * @version 1.104.0
60
+ * @version 1.105.0
61
61
  *
62
62
  * @constructor
63
63
  * @private
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @class
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  * @author SAP SE
30
- * @version 1.104.0
30
+ * @version 1.105.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.101
@@ -30,7 +30,7 @@ function (
30
30
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
31
31
  * @extends sap.ui.rta.plugin.Plugin
32
32
  * @author SAP SE
33
- * @version 1.104.0
33
+ * @version 1.105.0
34
34
  * @constructor
35
35
  * @private
36
36
  * @since 1.34
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The Settings allows trigger change of settings operations on the overlay
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.104.0
28
+ * @version 1.105.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.44
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @class
24
24
  * @extends sap.ui.rta.plugin.Plugin
25
25
  * @author SAP SE
26
- * @version 1.104.0
26
+ * @version 1.105.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.ui.rta.plugin.Plugin
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.104.0
36
+ * @version 1.105.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.104.0
35
+ * @version 1.105.0
36
36
  * @private
37
37
  * @since 1.94
38
38
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @class Context - Dialog for available Fields in Runtime Authoring
33
33
  * @extends sap.ui.base.ManagedObject
34
34
  * @author SAP SE
35
- * @version 1.104.0
35
+ * @version 1.105.0
36
36
  * @constructor
37
37
  * @private
38
38
  * @since 1.44
@@ -75,7 +75,7 @@ sap.ui.define([
75
75
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
76
76
  * @extends sap.ui.rta.plugin.Plugin
77
77
  * @author SAP SE
78
- * @version 1.104.0
78
+ * @version 1.105.0
79
79
  * @constructor
80
80
  * @private
81
81
  * @since 1.44
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * Helper object containing methods for the AdditionalElements plugin
16
16
  *
17
17
  * @author SAP SE
18
- * @version 1.104.0
18
+ * @version 1.105.0
19
19
  * @private
20
20
  * @since 1.94
21
21
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * Helper object to build the RTA commands resulting from the AdditionalElements Plugin
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.104.0
28
+ * @version 1.105.0
29
29
  * @private
30
30
  * @since 1.94
31
31
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -110,7 +110,7 @@ sap.ui.define([
110
110
  * @class The AddIFrame allows trigger AddIFrame operations on the overlay.
111
111
  * @extends sap.ui.rta.plugin.BaseCreate
112
112
  * @author SAP SE
113
- * @version 1.104.0
113
+ * @version 1.105.0
114
114
  * @constructor
115
115
  * @private
116
116
  * @since 1.75
@@ -113,7 +113,7 @@ sap.ui.define([
113
113
  * @class Context - Dialog for IFrame settings in Runtime Authoring
114
114
  * @extends sap.ui.base.ManagedObject
115
115
  * @author SAP SE
116
- * @version 1.104.0
116
+ * @version 1.105.0
117
117
  * @constructor
118
118
  * @private
119
119
  * @since 1.78
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @author SAP SE
26
26
  * @experimental Since 1.58
27
27
  * @since 1.58
28
- * @version 1.104.0
28
+ * @version 1.105.0
29
29
  * @private
30
30
  * @ui5-restricted
31
31
  *
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @author SAP SE
32
32
  * @experimental Since 1.58
33
33
  * @since 1.58
34
- * @version 1.104.0
34
+ * @version 1.105.0
35
35
  * @private
36
36
  * @ui5-restricted
37
37
  */
@@ -96,20 +96,19 @@ sap.ui.define([
96
96
  sModuleName += "/changes/";
97
97
  sModuleName += sCodeRef.replace(/\.js/g, "");
98
98
  var oChangeSpecificData = {
99
- content: {
100
- codeRef: sCodeRef
101
- },
102
- selector: {
103
- controllerName: sControllerName
104
- },
99
+ codeRef: sCodeRef,
100
+ controllerName: sControllerName,
105
101
  changeType: "codeExt",
102
+ layer: oFlexSettings.layer,
106
103
  namespace: oFlexSettings.namespace,
107
- moduleName: sModuleName
104
+ reference: sReference,
105
+ moduleName: sModuleName,
106
+ generator: "rta.service.ControllerExtension"
108
107
  };
109
108
 
110
109
  var oPreparedChange = ChangesWriteAPI.create({changeSpecificData: oChangeSpecificData, selector: oAppComponent});
111
110
  PersistenceWriteAPI.add({change: oPreparedChange, selector: oAppComponent});
112
- return oPreparedChange.getDefinition();
111
+ return oPreparedChange.convertToFileContent();
113
112
  },
114
113
 
115
114
  /**
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @author SAP SE
43
43
  * @experimental Since 1.56
44
44
  * @since 1.56
45
- * @version 1.104.0
45
+ * @version 1.105.0
46
46
  * @private
47
47
  * @ui5-restricted
48
48
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @author SAP SE
29
29
  * @experimental Since 1.58
30
30
  * @since 1.58
31
- * @version 1.104.0
31
+ * @version 1.105.0
32
32
  * @private
33
33
  * @ui5-restricted
34
34
  */
@@ -15,7 +15,7 @@ sap.ui.define(function () {
15
15
  * @author SAP SE
16
16
  * @experimental Since 1.58
17
17
  * @since 1.58
18
- * @version 1.104.0
18
+ * @version 1.105.0
19
19
  * @private
20
20
  * @ui5-restricted
21
21
  */
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.ui.rta.toolbar.Base
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.104.0
36
+ * @version 1.105.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.m.HBox
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.104.0
30
+ * @version 1.105.0
31
31
  *
32
32
  * @constructor
33
33
  * @private
@@ -32,7 +32,7 @@ function(
32
32
  * @extends sap.ui.rta.toolbar.Adaptation
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.104.0
35
+ * @version 1.105.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.104.0
23
+ * @version 1.105.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.m.OverflowToolbarButton
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.104.0
26
+ * @version 1.105.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -22,7 +22,7 @@ function(
22
22
  * @extends sap.ui.rta.toolbar.Base
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.104.0
25
+ * @version 1.105.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.104.0
23
+ * @version 1.105.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @class
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.104.0
56
+ * @version 1.105.0
57
57
  *
58
58
  * @constructor
59
59
  * @private
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @class
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.104.0
39
+ * @version 1.105.0
40
40
  *
41
41
  * @constructor
42
42
  * @private
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  * Constructor for a new sap.ui.rta.util.PluginManager
69
69
  * @extends sap.ui.base.ManagedObject
70
70
  * @author SAP SE
71
- * @version 1.104.0
71
+ * @version 1.105.0
72
72
  * @constructor
73
73
  * @private
74
74
  * @since 1.86
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * Constructor for a new sap.ui.rta.util.PopupManager
43
43
  * @extends sap.ui.base.ManagedObject
44
44
  * @author SAP SE
45
- * @version 1.104.0
45
+ * @version 1.105.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @since 1.48
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @namespace sap.ui.rta.util.ReloadManager
31
31
  * @alias sap.ui.rta.util.ReloadManager
32
32
  * @since 1.104
33
- * @version 1.104.0
33
+ * @version 1.105.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -132,7 +132,8 @@ sap.ui.define([
132
132
  if (oReloadInfo.isDraftAvailable) {
133
133
  VersionsAPI.loadDraftForApplication({
134
134
  control: oReloadInfo.selector,
135
- layer: oReloadInfo.layer
135
+ layer: oReloadInfo.layer,
136
+ allContexts: oReloadInfo.allContexts
136
137
  });
137
138
  } else {
138
139
  VersionsAPI.loadVersionForApplication({
@@ -19,7 +19,7 @@ function(
19
19
  *
20
20
  * @extends sap.ui.core.EventBus
21
21
  * @author SAP SE
22
- * @version 1.104.0
22
+ * @version 1.105.0
23
23
  * @private
24
24
  * @since 1.56.0
25
25
  * @alias sap.ui.rta.util.ServiceEventBus
@@ -1,5 +1,5 @@
1
- /*
2
- * ! OpenUI5
1
+ /*!
2
+ * OpenUI5
3
3
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
@@ -8,7 +8,6 @@ sap.ui.define([
8
8
  "sap/ui/core/Fragment",
9
9
  "sap/ui/model/json/JSONModel",
10
10
  "sap/ui/core/Control",
11
- "sap/m/Text",
12
11
  "sap/ui/core/format/DateFormat",
13
12
  "sap/ui/events/KeyCodes",
14
13
  "sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory",
@@ -20,7 +19,6 @@ sap.ui.define([
20
19
  Fragment,
21
20
  JSONModel,
22
21
  Control,
23
- Text,
24
22
  DateFormat,
25
23
  KeyCodes,
26
24
  getVisualizationCategory,
@@ -48,7 +46,7 @@ sap.ui.define([
48
46
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
49
47
  * @author SAP SE
50
48
  * @since 1.84.0
51
- * @version 1.104.0
49
+ * @version 1.105.0
52
50
  * @private
53
51
  */
54
52
  var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -168,6 +166,84 @@ sap.ui.define([
168
166
  }
169
167
  }
170
168
 
169
+ function getTexts(mChangeInformation, oRtaResourceBundle, sOverlayId) {
170
+ var oAffectedElement = Core.byId(mChangeInformation.affectedElementId);
171
+ var mPayload = Object.keys(mChangeInformation.payload || {}).reduce(function(mPayload, sKey) {
172
+ var vOriginalValue = mChangeInformation.payload[sKey];
173
+ var bIsBinding = FlUtils.isBinding(vOriginalValue);
174
+ var vValue = bIsBinding
175
+ ? resolveBinding(vOriginalValue, oAffectedElement)
176
+ : vOriginalValue;
177
+ mPayload[sKey] = vValue;
178
+ return mPayload;
179
+ }, {});
180
+
181
+ var mPropertyBag = { appComponent: FlUtils.getAppComponentForControl(oAffectedElement) };
182
+ var oOverlay = Core.byId(sOverlayId);
183
+ var oVisualizationUtil = getVisualizationCategory(mChangeInformation);
184
+ var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
185
+ var oDescription = oVisualizationUtil && oVisualizationUtil.getDescription(mPayload, sElementLabel, mPropertyBag);
186
+ sElementLabel = sElementLabel && "'" + sElementLabel + "'";
187
+ var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
188
+ var sChangeTextKey = (
189
+ "TXT_CHANGEVISUALIZATION_CHANGE_"
190
+ + mChangeInformation.commandName.toUpperCase()
191
+ );
192
+
193
+ var sDescriptionText;
194
+ var sDescriptionTooltip;
195
+ // for settings commands if available description and tooltip should be taken as is from the change handler
196
+ if (mPayload.description && mChangeInformation.commandName === "settings") {
197
+ sDescriptionText = mPayload.description;
198
+ sDescriptionTooltip = mPayload.descriptionTooltip || "";
199
+ } else {
200
+ if (oDescription) {
201
+ sDescriptionText = oDescription.descriptionText;
202
+ sDescriptionTooltip = oDescription.descriptionTooltip;
203
+ } else {
204
+ sDescriptionText = oRtaResourceBundle.getText(sChangeTextKey, sShortenedElementLabel);
205
+ sDescriptionTooltip = oRtaResourceBundle.getText(sChangeTextKey, sElementLabel);
206
+ }
207
+ sDescriptionTooltip = sDescriptionText.length < sDescriptionTooltip.length ? sDescriptionTooltip : null;
208
+ }
209
+ var sDetailButtonText = oDescription && oDescription.buttonText;
210
+
211
+ return {
212
+ description: sDescriptionText,
213
+ tooltip: sDescriptionTooltip,
214
+ buttonText: sDetailButtonText
215
+ };
216
+ }
217
+
218
+ function getDates(mChangeInformation, oRtaResourceBundle) {
219
+ var sCreationDate = mChangeInformation.change.getCreation();
220
+ var oDate = new Date(sCreationDate);
221
+ var sFallbackDate = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CREATED_IN_SESSION_DATE");
222
+
223
+ return {
224
+ fullDate: sCreationDate ? DateFormat.getDateTimeInstance().format(oDate) : sFallbackDate,
225
+ relativeDate: sCreationDate ? DateFormat.getDateTimeInstance({ relative: "true" }).format(oDate) : sFallbackDate
226
+ };
227
+ }
228
+
229
+ function formatChangesModelItem(sOverlayId, mChangeInformation) {
230
+ var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
231
+ var oTexts = getTexts(mChangeInformation, oRtaResourceBundle, sOverlayId);
232
+ var oDates = getDates(mChangeInformation, oRtaResourceBundle);
233
+
234
+
235
+ return {
236
+ id: mChangeInformation.id,
237
+ change: mChangeInformation,
238
+ description: oTexts.description,
239
+ descriptionTooltip: oTexts.tooltip,
240
+ fullDate: oDates.fullDate,
241
+ relativeDate: oDates.relativeDate,
242
+ detailButtonText: oTexts.buttonText,
243
+ icon: CATEGORY_ICONS[mChangeInformation.commandCategory]
244
+ };
245
+ }
246
+
171
247
  ChangeIndicator.prototype.init = function() {
172
248
  this._iOldTabIndex = 0;
173
249
  handleBrowserEventsOnElement.call(this, this, "attachBrowserEvent");
@@ -254,7 +330,7 @@ sap.ui.define([
254
330
 
255
331
  ChangeIndicator.prototype.setChanges = function(aChanges) {
256
332
  this.setProperty("changes", aChanges);
257
- this._oDetailModel.setData((aChanges || []).reverse().map(this._formatChangesModelItem.bind(this)));
333
+ this._oDetailModel.setData((aChanges || []).reverse().map(formatChangesModelItem.bind(this, this.getOverlayId())));
258
334
  };
259
335
 
260
336
  ChangeIndicator.prototype._onSelect = function(oEvent) {
@@ -287,50 +363,6 @@ sap.ui.define([
287
363
  this[sFunctionName]("sapUiRtaHover");
288
364
  };
289
365
 
290
- ChangeIndicator.prototype._formatChangesModelItem = function(mChangeInformation) {
291
- var oAffectedElement = Core.byId(mChangeInformation.affectedElementId);
292
- var mPayload = Object.keys(mChangeInformation.payload || {}).reduce(function(mPayload, sKey) {
293
- var vOriginalValue = mChangeInformation.payload[sKey];
294
- var bIsBinding = FlUtils.isBinding(vOriginalValue);
295
- var vValue = bIsBinding
296
- ? resolveBinding(vOriginalValue, oAffectedElement)
297
- : vOriginalValue;
298
- mPayload[sKey] = vValue;
299
- return mPayload;
300
- }, {});
301
-
302
- var mPropertyBag = { appComponent: FlUtils.getAppComponentForControl(oAffectedElement) };
303
- var oOverlay = Core.byId(this.getOverlayId());
304
- var sElementLabel = oOverlay.getDesignTimeMetadata().getLabel(oAffectedElement);
305
- var oVisualizationUtil = getVisualizationCategory(mChangeInformation.commandName);
306
- var oDescription = oVisualizationUtil && oVisualizationUtil.getDescription(mPayload, sElementLabel, mPropertyBag);
307
- var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
308
- sElementLabel = sElementLabel && "'" + sElementLabel + "'";
309
- var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
310
- var sChangeTextKey = (
311
- "TXT_CHANGEVISUALIZATION_CHANGE_"
312
- + mChangeInformation.commandName.toUpperCase()
313
- );
314
- var sDescriptionText = oDescription ? oDescription.descriptionText : oRtaResourceBundle.getText(sChangeTextKey, sShortenedElementLabel);
315
- var sDescriptionTooltip = oDescription ? oDescription.descriptionTooltip : oRtaResourceBundle.getText(sChangeTextKey, sElementLabel);
316
- var sCreationDate = mChangeInformation.change.getCreation();
317
- var oDate = new Date(sCreationDate);
318
- var sFallbackDate = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CREATED_IN_SESSION_DATE");
319
- var sFullDate = sCreationDate ? DateFormat.getDateTimeInstance().format(oDate) : sFallbackDate;
320
- var sRelativeDate = sCreationDate ? DateFormat.getDateTimeInstance({ relative: "true" }).format(oDate) : sFallbackDate;
321
- var sDetailButtonText = oDescription && oDescription.buttonText;
322
- return {
323
- id: mChangeInformation.id,
324
- change: mChangeInformation,
325
- description: sDescriptionText,
326
- descriptionTooltip: sDescriptionTooltip && sDescriptionText.length < sDescriptionTooltip.length ? sDescriptionTooltip : null,
327
- fullDate: sFullDate,
328
- relativeDate: sRelativeDate,
329
- detailButtonText: sDetailButtonText,
330
- icon: CATEGORY_ICONS[mChangeInformation.commandCategory]
331
- };
332
- };
333
-
334
366
  ChangeIndicator.prototype._openDetailPopover = function() {
335
367
  if (!this.getAggregation("_popover")) {
336
368
  //store the tabindex (tabindex will be removed on opening the popover)