@openui5/sap.ui.rta 1.101.0 → 1.102.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 (221) hide show
  1. package/THIRDPARTY.txt +1 -1
  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 +130 -83
  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 +2 -2
  9. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +0 -17
  10. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n.properties +0 -4
  11. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ar.properties +0 -2
  12. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_bg.properties +0 -2
  13. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ca.properties +0 -2
  14. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_cs.properties +0 -2
  15. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_cy.properties +0 -2
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_da.properties +0 -2
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_de.properties +0 -2
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_el.properties +0 -2
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en.properties +0 -2
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_GB.properties +0 -2
  21. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_sappsd.properties +0 -2
  22. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saprigi.properties +0 -2
  23. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_en_US_saptrc.properties +0 -2
  24. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_es.properties +0 -2
  25. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_es_MX.properties +0 -2
  26. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_et.properties +0 -2
  27. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fi.properties +0 -2
  28. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr.properties +0 -2
  29. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +0 -2
  30. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hi.properties +0 -2
  31. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hr.properties +0 -2
  32. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hu.properties +0 -2
  33. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_id.properties +0 -2
  34. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_it.properties +0 -2
  35. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_iw.properties +0 -2
  36. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ja.properties +0 -2
  37. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_kk.properties +0 -2
  38. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ko.properties +0 -2
  39. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_lt.properties +0 -2
  40. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_lv.properties +0 -2
  41. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ms.properties +0 -2
  42. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_nl.properties +0 -2
  43. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_no.properties +0 -2
  44. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_pl.properties +0 -2
  45. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_pt.properties +0 -2
  46. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_pt_PT.properties +0 -2
  47. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ro.properties +0 -2
  48. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ru.properties +0 -2
  49. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sh.properties +0 -2
  50. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sk.properties +0 -2
  51. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sl.properties +0 -2
  52. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sv.properties +0 -2
  53. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_th.properties +0 -2
  54. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_tr.properties +0 -2
  55. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_uk.properties +0 -2
  56. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_vi.properties +0 -2
  57. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_zh_CN.properties +0 -2
  58. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_zh_TW.properties +0 -2
  59. package/src/sap/ui/rta/appVariant/manageApps/webapp/view/ManageApps.view.xml +0 -1
  60. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  61. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  62. package/src/sap/ui/rta/command/AddXML.js +1 -1
  63. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  64. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  65. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  66. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  67. package/src/sap/ui/rta/command/Combine.js +1 -1
  68. package/src/sap/ui/rta/command/CommandFactory.js +5 -2
  69. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  70. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  71. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  72. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  73. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  74. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  75. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  76. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  77. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  78. package/src/sap/ui/rta/command/LREPSerializer.js +3 -3
  79. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  80. package/src/sap/ui/rta/command/Move.js +1 -1
  81. package/src/sap/ui/rta/command/Property.js +1 -1
  82. package/src/sap/ui/rta/command/Remove.js +1 -1
  83. package/src/sap/ui/rta/command/Rename.js +1 -1
  84. package/src/sap/ui/rta/command/Resize.js +1 -1
  85. package/src/sap/ui/rta/command/Reveal.js +1 -1
  86. package/src/sap/ui/rta/command/Settings.js +1 -1
  87. package/src/sap/ui/rta/command/Split.js +1 -1
  88. package/src/sap/ui/rta/command/Stack.js +1 -1
  89. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  90. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +82 -0
  91. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  92. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  93. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  94. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  95. package/src/sap/ui/rta/library.js +2 -2
  96. package/src/sap/ui/rta/messagebundle.properties +11 -1
  97. package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
  98. package/src/sap/ui/rta/messagebundle_bg.properties +7 -2
  99. package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
  100. package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
  101. package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
  102. package/src/sap/ui/rta/messagebundle_da.properties +5 -0
  103. package/src/sap/ui/rta/messagebundle_de.properties +5 -0
  104. package/src/sap/ui/rta/messagebundle_el.properties +5 -0
  105. package/src/sap/ui/rta/messagebundle_en.properties +5 -0
  106. package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
  107. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
  108. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
  109. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +5 -0
  110. package/src/sap/ui/rta/messagebundle_es.properties +5 -0
  111. package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
  112. package/src/sap/ui/rta/messagebundle_et.properties +5 -0
  113. package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
  114. package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
  115. package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
  116. package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
  117. package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
  118. package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
  119. package/src/sap/ui/rta/messagebundle_id.properties +5 -0
  120. package/src/sap/ui/rta/messagebundle_it.properties +5 -0
  121. package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
  122. package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
  123. package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
  124. package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
  125. package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
  126. package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
  127. package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
  128. package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
  129. package/src/sap/ui/rta/messagebundle_no.properties +5 -0
  130. package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
  131. package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
  132. package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
  133. package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
  134. package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
  135. package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
  136. package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
  137. package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
  138. package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
  139. package/src/sap/ui/rta/messagebundle_th.properties +5 -0
  140. package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
  141. package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
  142. package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
  143. package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
  144. package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
  145. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  146. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  147. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  148. package/src/sap/ui/rta/plugin/CompVariant.js +85 -66
  149. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  150. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  151. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  152. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  153. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  154. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  155. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  156. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  157. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  158. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  159. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  160. package/src/sap/ui/rta/plugin/RenameHandler.js +3 -1
  161. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  162. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  163. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  164. package/src/sap/ui/rta/plugin/Split.js +1 -1
  165. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  166. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  167. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  168. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +20 -10
  169. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  170. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  171. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  172. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  173. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  174. package/src/sap/ui/rta/service/Action.js +1 -1
  175. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  176. package/src/sap/ui/rta/service/Outline.js +1 -1
  177. package/src/sap/ui/rta/service/Property.js +1 -1
  178. package/src/sap/ui/rta/service/Selection.js +1 -1
  179. package/src/sap/ui/rta/themes/base/AddIFrame.less +37 -29
  180. package/src/sap/ui/rta/themes/base/ChangeVisualization.less +65 -62
  181. package/src/sap/ui/rta/themes/base/ContextMenu.less +25 -0
  182. package/src/sap/ui/rta/themes/base/Dialogs.less +79 -0
  183. package/src/sap/ui/rta/themes/base/FieldRepository.less +14 -61
  184. package/src/sap/ui/rta/themes/base/Overlay.less +52 -104
  185. package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +7 -1
  186. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +178 -36
  187. package/src/sap/ui/rta/themes/base/Toolbar.base.less +23 -154
  188. package/src/sap/ui/rta/themes/base/Toolbar.fiori.less +2 -21
  189. package/src/sap/ui/rta/themes/base/Toolbar.personalization.less +3 -14
  190. package/src/sap/ui/rta/themes/base/Toolbar.standalone.less +0 -9
  191. package/src/sap/ui/rta/themes/base/library.source.less +2 -0
  192. package/src/sap/ui/rta/themes/sap_hcb/ChangeVisualization.less +7 -0
  193. package/src/sap/ui/rta/themes/sap_hcb/ContextMenu.less +5 -0
  194. package/src/sap/ui/rta/themes/sap_hcb/Dialogs.less +28 -0
  195. package/src/sap/ui/rta/themes/sap_hcb/FieldRepository.less +18 -0
  196. package/src/sap/ui/rta/themes/sap_hcb/Overlay.less +52 -12
  197. package/src/sap/ui/rta/themes/sap_hcb/Toolbar.adaptation.less +38 -0
  198. package/src/sap/ui/rta/themes/sap_hcb/Toolbar.base.less +14 -2
  199. package/src/sap/ui/rta/themes/sap_hcb/Toolbar.personalization.less +8 -2
  200. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +5 -2
  201. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +29 -14
  202. package/src/sap/ui/rta/toolbar/Adaptation.js +65 -22
  203. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  204. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  205. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  206. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  207. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  208. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  209. package/src/sap/ui/rta/toolbar/VersionHistory.fragment.xml +2 -1
  210. package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +20 -17
  211. package/src/sap/ui/rta/toolbar/translation/Translation.js +104 -98
  212. package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +4 -2
  213. package/src/sap/ui/rta/util/PluginManager.js +2 -2
  214. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  215. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  216. package/src/sap/ui/rta/util/adaptationStarter.js +102 -80
  217. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +9 -3
  218. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +1 -1
  219. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -6
  220. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +23 -10
  221. package/src/sap/ui/rta/themes/sap_hcb/Toolbar.standalone.less +0 -9
@@ -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.101.0
71
+ * @version 1.102.0
72
72
  * @constructor
73
73
  * @private
74
74
  * @since 1.86
@@ -213,7 +213,7 @@ sap.ui.define([
213
213
  if (
214
214
  oFlexSettings.layer === Layer.CUSTOMER
215
215
  && oSettings
216
- && !oSettings.isVersioningEnabled(oFlexSettings.layer)
216
+ && oSettings.isPublicLayerAvailable()
217
217
  ) {
218
218
  this._mDefaultPlugins["localReset"] = new LocalResetPlugin({
219
219
  commandFactory: this._oCommandFactory
@@ -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.101.0
45
+ * @version 1.102.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @since 1.48
@@ -19,7 +19,7 @@ function(
19
19
  *
20
20
  * @extends sap.ui.core.EventBus
21
21
  * @author SAP SE
22
- * @version 1.101.0
22
+ * @version 1.102.0
23
23
  * @private
24
24
  * @since 1.56.0
25
25
  * @alias sap.ui.rta.util.ServiceEventBus
@@ -4,43 +4,59 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/rta/RuntimeAuthoring",
7
+ "sap/base/Log",
8
8
  "sap/ui/core/Control",
9
- "sap/ui/fl/Utils",
10
- "sap/ui/fl/Layer",
11
- "sap/ui/fl/write/api/FeaturesAPI",
12
9
  "sap/ui/core/UIComponent",
13
- "sap/base/Log",
10
+ "sap/ui/fl/write/api/FeaturesAPI",
14
11
  "sap/ui/fl/write/api/PersistenceWriteAPI",
15
- "sap/ui/rta/util/showMessageBox"
12
+ "sap/ui/fl/Layer",
13
+ "sap/ui/fl/Utils",
14
+ "sap/ui/rta/util/showMessageBox",
15
+ "sap/ui/rta/RuntimeAuthoring"
16
16
  ], function(
17
- RuntimeAuthoring,
17
+ Log,
18
18
  Control,
19
- FlexUtils,
20
- Layer,
21
- FeaturesAPI,
22
19
  UIComponent,
23
- Log,
20
+ FeaturesAPI,
24
21
  PersistenceWriteAPI,
25
- showMessageBox
22
+ Layer,
23
+ FlexUtils,
24
+ showMessageBox,
25
+ RuntimeAuthoring
26
26
  ) {
27
27
  "use strict";
28
28
 
29
29
  function checkKeyUser(sLayer) {
30
30
  if (Layer.CUSTOMER === sLayer) {
31
31
  return FeaturesAPI.isKeyUser()
32
- .then(function (bIsKeyUser) {
32
+ .then(function(bIsKeyUser) {
33
33
  if (!bIsKeyUser) {
34
- throw new Error("Key user rights have not been granted to the current user");
34
+ var oError = Error("Key user rights have not been granted to the current user");
35
+ oError.reason = "isKeyUser";
36
+ throw oError;
35
37
  }
36
38
  });
37
39
  }
38
40
  return Promise.resolve();
39
41
  }
40
42
 
43
+ function checkFlexEnabled(oAppComponent) {
44
+ var oManifest = oAppComponent.getManifest() || {};
45
+ var vFlexEnabled = oManifest["sap.ui5"] && oManifest["sap.ui5"].flexEnabled;
46
+
47
+ if (vFlexEnabled === false) {
48
+ var oError = Error("This app is not enabled for key user adaptation");
49
+ oError.reason = "flexEnabled";
50
+ throw oError;
51
+ }
52
+ }
53
+
41
54
  /**
42
55
  * Starter util for UI adaptation.
43
56
  * With this API you are also able to modify the UI adaptation plugins list and or add some event handler functions to be called on start, failed and stop events.
57
+ * The function also checks for the Key User authorization and the <code>flexEnabled</code> flag in the manifest.
58
+ * If either check is not passed successfully the function returns a rejected Promise.
59
+ *
44
60
  * @param {object} mOptions - Object with properties
45
61
  * @param {sap.ui.core.Control|sap.ui.core.UIComponent} mOptions.rootControl - Control instance to get the AppComponent. This then is used to start UI adaptation.
46
62
  * @param {function} [loadPlugins] - Callback function that enables the modification of the default plugin list of UI adaptation. UI adaptation is passed to this function and it should return a promise
@@ -51,78 +67,84 @@ sap.ui.define([
51
67
  * @private
52
68
  */
53
69
  function adaptationStarter(mOptions, loadPlugins, onStart, onFailed, onStop) {
54
- if (!(mOptions.rootControl instanceof Control) && !(mOptions.rootControl instanceof UIComponent)) {
55
- return Promise.reject(new Error("An invalid root control was passed"));
56
- }
57
-
58
70
  var oRta;
59
- return checkKeyUser(mOptions.flexSettings.layer)
60
- .then(function () {
61
- mOptions.rootControl = FlexUtils.getAppComponentForControl(mOptions.rootControl);
62
71
 
63
- oRta = new RuntimeAuthoring(mOptions);
72
+ return Promise.resolve().then(function() {
73
+ if (!(mOptions.rootControl instanceof Control) && !(mOptions.rootControl instanceof UIComponent)) {
74
+ var oError = Error("An invalid root control was passed");
75
+ oError.reason = "rootControl";
76
+ throw oError;
77
+ }
78
+ mOptions.rootControl = FlexUtils.getAppComponentForControl(mOptions.rootControl);
79
+ })
80
+ .then(checkKeyUser.bind(undefined, mOptions.flexSettings.layer))
81
+ .then(function() {
82
+ return checkFlexEnabled(mOptions.rootControl);
83
+ })
84
+ .then(function() {
85
+ oRta = new RuntimeAuthoring(mOptions);
64
86
 
65
- if (onStart) {
66
- oRta.attachEvent("start", onStart);
67
- }
68
- if (onFailed) {
69
- oRta.attachEvent("failed", onFailed);
70
- }
71
- var fnOnStop = onStop || function () {
72
- oRta.destroy();
73
- };
74
- oRta.attachEvent("stop", fnOnStop);
87
+ if (onStart) {
88
+ oRta.attachEvent("start", onStart);
89
+ }
90
+ if (onFailed) {
91
+ oRta.attachEvent("failed", onFailed);
92
+ }
93
+ var fnOnStop = onStop || function() {
94
+ oRta.destroy();
95
+ };
96
+ oRta.attachEvent("stop", fnOnStop);
75
97
 
76
- if (loadPlugins) {
77
- return loadPlugins(oRta);
78
- }
79
- })
80
- .then(function() {
81
- return oRta.start();
82
- })
83
- .then(function() {
84
- if (mOptions.flexSettings.layer === "CUSTOMER") {
85
- var mPropertyBag = {
86
- oComponent: mOptions.rootControl,
87
- selector: mOptions.rootControl,
88
- invalidateCache: false,
89
- includeVariants: true,
90
- includeCtrlVariants: true,
91
- currentLayer: Layer.CUSTOMER
92
- };
98
+ if (loadPlugins) {
99
+ return loadPlugins(oRta);
100
+ }
101
+ })
102
+ .then(function() {
103
+ return oRta.start();
104
+ })
105
+ .then(function() {
106
+ if (mOptions.flexSettings.layer === "CUSTOMER") {
107
+ var mPropertyBag = {
108
+ oComponent: mOptions.rootControl,
109
+ selector: mOptions.rootControl,
110
+ invalidateCache: false,
111
+ includeVariants: true,
112
+ includeCtrlVariants: true,
113
+ currentLayer: Layer.CUSTOMER
114
+ };
93
115
 
94
- PersistenceWriteAPI.getChangesWarning(mPropertyBag)
95
- .then(function(oWarningMessage) {
96
- if (oWarningMessage.showWarning) {
97
- var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
98
- var oMessageProps = oWarningMessage.warningType === "mixedChangesWarning"
99
- ? {
100
- text: "MSG_ADAPTATION_STARTER_MIXED_CHANGES_WARNING",
101
- title: "TIT_ADAPTATION_STARTER_MIXED_CHANGES_TITLE"
102
- }
103
- : {
104
- text: "MSG_ADAPTATION_STARTER_NO_CHANGES_IN_P_WARNING",
105
- title: "TIT_ADAPTATION_STARTER_NO_CHANGES_IN_P_TITLE"
106
- };
116
+ PersistenceWriteAPI.getChangesWarning(mPropertyBag)
117
+ .then(function(oWarningMessage) {
118
+ if (oWarningMessage.showWarning) {
119
+ var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
120
+ var oMessageProps = oWarningMessage.warningType === "mixedChangesWarning"
121
+ ? {
122
+ text: "MSG_ADAPTATION_STARTER_MIXED_CHANGES_WARNING",
123
+ title: "TIT_ADAPTATION_STARTER_MIXED_CHANGES_TITLE"
124
+ }
125
+ : {
126
+ text: "MSG_ADAPTATION_STARTER_NO_CHANGES_IN_P_WARNING",
127
+ title: "TIT_ADAPTATION_STARTER_NO_CHANGES_IN_P_TITLE"
128
+ };
107
129
 
108
- showMessageBox(
109
- oRtaResourceBundle.getText(oMessageProps.text),
110
- {
111
- title: oRtaResourceBundle.getText(oMessageProps.title)
112
- },
113
- "warning"
114
- );
115
- }
116
- });
117
- }
118
- return oRta;
119
- })
120
- .catch(function(vError) {
121
- if (vError !== "Reload triggered") {
122
- Log.error("UI Adaptation could not be started", vError.message);
123
- }
124
- throw vError;
125
- });
130
+ showMessageBox(
131
+ oRtaResourceBundle.getText(oMessageProps.text),
132
+ {
133
+ title: oRtaResourceBundle.getText(oMessageProps.title)
134
+ },
135
+ "warning"
136
+ );
137
+ }
138
+ });
139
+ }
140
+ return oRta;
141
+ })
142
+ .catch(function(vError) {
143
+ if (vError !== "Reload triggered") {
144
+ Log.error("UI Adaptation could not be started", vError.message);
145
+ }
146
+ throw vError;
147
+ });
126
148
  }
127
149
  return adaptationStarter;
128
150
  });
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
49
49
  * @author SAP SE
50
50
  * @since 1.84.0
51
- * @version 1.101.0
51
+ * @version 1.102.0
52
52
  * @private
53
53
  */
54
54
  var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -142,6 +142,9 @@ sap.ui.define([
142
142
 
143
143
  this._fnHoverTrue = this._toggleHoverStyleClasses.bind(this, true);
144
144
  this._fnHoverFalse = this._toggleHoverStyleClasses.bind(this, false);
145
+ // is needed to prevent that multiple events listeners are attached
146
+ // to the same overlay because setVisible is called multiple times
147
+ this._bEventAttachedToElement = false;
145
148
  }
146
149
  });
147
150
 
@@ -175,10 +178,13 @@ sap.ui.define([
175
178
  var oOverlay = Core.byId(this.getOverlayId());
176
179
  // needed because the change indicator cleanup is only triggered on save and exit
177
180
  if (oOverlay) {
178
- if (bVisible) {
181
+ if (bVisible && !this._bEventAttachedToElement) {
179
182
  handleBrowserEventsOnElement.call(this, oOverlay, "attachBrowserEvent");
180
- } else {
183
+ this._bEventAttachedToElement = true;
184
+ }
185
+ if (!bVisible) {
181
186
  handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
187
+ this._bEventAttachedToElement = false;
182
188
  if (this.getAggregation("_popover")) {
183
189
  this.getAggregation("_popover").destroy();
184
190
  }
@@ -5,7 +5,7 @@
5
5
  <Popover
6
6
  showHeader="false"
7
7
  placement="PreferredTopOrFlip"
8
- class="sapUiRtaPopover">
8
+ class="sapUiRtaPopover sapUiRtaChangeVisualizationPopover">
9
9
  <Table
10
10
  ariaLabelledBy="Changes"
11
11
  items="{details>/}"
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
26
26
  * @author SAP SE
27
27
  * @since 1.86.0
28
- * @version 1.101.0
28
+ * @version 1.102.0
29
29
  * @private
30
30
  */
31
31
  var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
@@ -168,11 +168,6 @@ sap.ui.define([
168
168
  }
169
169
  };
170
170
 
171
- // Only register changes that are valid for visualization
172
- if (oNewChangeInformation.commandCategory === undefined) {
173
- return;
174
- }
175
-
176
171
  this._oChanges[oChange.getId()] = oNewChangeInformation;
177
172
  };
178
173
 
@@ -93,7 +93,7 @@ sap.ui.define([
93
93
  * @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
94
94
  * @author SAP SE
95
95
  * @since 1.84.0
96
- * @version 1.101.0
96
+ * @version 1.102.0
97
97
  * @private
98
98
  */
99
99
  var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
@@ -170,9 +170,7 @@ sap.ui.define([
170
170
 
171
171
  ChangeVisualization.prototype.exit = function() {
172
172
  this._oChangeIndicatorRegistry.destroy();
173
- if (this.oRootOverlay) {
174
- this.oRootOverlay.getDomRef().removeEventListener("click", this._fnOnClickHandler, { capture: true });
175
- }
173
+ this._toggleRootOverlayClickHandler(false);
176
174
  };
177
175
 
178
176
  ChangeVisualization.prototype._reset = function() {
@@ -587,6 +585,25 @@ sap.ui.define([
587
585
  aVisibleIndicators[0].focus();
588
586
  };
589
587
 
588
+ ChangeVisualization.prototype._toggleRootOverlayClickHandler = function (bEnable) {
589
+ var oRootOverlayDomRef = this.oRootOverlay && this.oRootOverlay.getDomRef();
590
+ if (oRootOverlayDomRef) {
591
+ if (bEnable) {
592
+ oRootOverlayDomRef.addEventListener(
593
+ "click",
594
+ this._fnOnClickHandler,
595
+ { capture: true }
596
+ );
597
+ } else {
598
+ oRootOverlayDomRef.removeEventListener(
599
+ "click",
600
+ this._fnOnClickHandler,
601
+ { capture: true }
602
+ );
603
+ }
604
+ }
605
+ };
606
+
590
607
  /**
591
608
  * Triggers the mode switch (on/off).
592
609
  *
@@ -599,14 +616,10 @@ sap.ui.define([
599
616
 
600
617
  if (this.getIsActive()) {
601
618
  this.setIsActive(false);
602
- if (this.oRootOverlay) {
603
- this.oRootOverlay.getDomRef().removeEventListener("click", this._fnOnClickHandler, { capture: true });
604
- }
619
+ this._toggleRootOverlayClickHandler(false);
605
620
  return;
606
621
  }
607
- if (this.oRootOverlay) {
608
- this.oRootOverlay.getDomRef().addEventListener("click", this._fnOnClickHandler, { capture: true });
609
- }
622
+ this._toggleRootOverlayClickHandler(true);
610
623
  if (!this.getRootControlId()) {
611
624
  this.setRootControlId(oRootControl);
612
625
  }
@@ -1,9 +0,0 @@
1
- /* type: standalone */
2
- .sapUiRtaToolbar.type_standalone.color_default .sapMBtn .sapMBtnContent,
3
- .sapUiRtaToolbar.type_standalone.color_default .sapMBtn .sapMBtnTransparent .sapMBtnIcon {
4
- color: inherit;
5
- }
6
- .sapUiRtaToolbar.type_standalone.color_default .sapMBtn.sapMBtnDisabled .sapMBtnContent,
7
- .sapUiRtaToolbar.type_standalone.color_default .sapMBtn.sapMBtnDisabled .sapMBtnIcon {
8
- color: inherit;
9
- }