@openui5/sap.ui.rta 1.96.2 → 1.98.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 (179) hide show
  1. package/.reuse/dep5 +26 -31
  2. package/THIRDPARTY.txt +15 -21
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +2 -2
  5. package/src/sap/ui/rta/Client.js +2 -2
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +187 -139
  7. package/src/sap/ui/rta/Utils.js +2 -2
  8. package/src/sap/ui/rta/api/startAdaptation.js +2 -3
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +3 -3
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +6 -4
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +5 -7
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +5 -12
  14. package/src/sap/ui/rta/appVariant/Feature.js +7 -6
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +3 -2
  16. package/src/sap/ui/rta/appVariant/Utils.js +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  21. package/src/sap/ui/rta/command/AddIFrame.js +2 -2
  22. package/src/sap/ui/rta/command/AddProperty.js +2 -2
  23. package/src/sap/ui/rta/command/AddXML.js +2 -2
  24. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  25. package/src/sap/ui/rta/command/AppDescriptorCommand.js +5 -4
  26. package/src/sap/ui/rta/command/BaseCommand.js +2 -2
  27. package/src/sap/ui/rta/command/BindProperty.js +2 -2
  28. package/src/sap/ui/rta/command/Combine.js +2 -2
  29. package/src/sap/ui/rta/command/CommandFactory.js +2 -2
  30. package/src/sap/ui/rta/command/CompositeCommand.js +6 -6
  31. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  32. package/src/sap/ui/rta/command/ControlVariantSave.js +2 -2
  33. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +2 -2
  34. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +2 -2
  35. package/src/sap/ui/rta/command/ControlVariantSwitch.js +2 -7
  36. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  37. package/src/sap/ui/rta/command/CustomAdd.js +2 -2
  38. package/src/sap/ui/rta/command/FlexCommand.js +2 -2
  39. package/src/sap/ui/rta/command/LREPSerializer.js +12 -4
  40. package/src/sap/ui/rta/command/LocalReset.js +2 -2
  41. package/src/sap/ui/rta/command/Move.js +2 -2
  42. package/src/sap/ui/rta/command/Property.js +2 -2
  43. package/src/sap/ui/rta/command/Remove.js +2 -2
  44. package/src/sap/ui/rta/command/Rename.js +2 -2
  45. package/src/sap/ui/rta/command/Reveal.js +2 -2
  46. package/src/sap/ui/rta/command/Settings.js +2 -2
  47. package/src/sap/ui/rta/command/Split.js +2 -2
  48. package/src/sap/ui/rta/command/Stack.js +16 -22
  49. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
  50. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  51. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  52. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
  53. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  54. package/src/sap/ui/rta/enablement/elementActionTest.js +3 -3
  55. package/src/sap/ui/rta/library.js +3 -3
  56. package/src/sap/ui/rta/messagebundle.properties +38 -19
  57. package/src/sap/ui/rta/messagebundle_ar.properties +20 -10
  58. package/src/sap/ui/rta/messagebundle_bg.properties +20 -10
  59. package/src/sap/ui/rta/messagebundle_ca.properties +19 -9
  60. package/src/sap/ui/rta/messagebundle_cs.properties +20 -10
  61. package/src/sap/ui/rta/messagebundle_cy.properties +20 -10
  62. package/src/sap/ui/rta/messagebundle_da.properties +20 -10
  63. package/src/sap/ui/rta/messagebundle_de.properties +19 -9
  64. package/src/sap/ui/rta/messagebundle_el.properties +20 -10
  65. package/src/sap/ui/rta/messagebundle_en.properties +20 -10
  66. package/src/sap/ui/rta/messagebundle_en_GB.properties +20 -10
  67. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +20 -10
  68. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -14
  69. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +22 -12
  70. package/src/sap/ui/rta/messagebundle_es.properties +20 -10
  71. package/src/sap/ui/rta/messagebundle_es_MX.properties +23 -13
  72. package/src/sap/ui/rta/messagebundle_et.properties +21 -11
  73. package/src/sap/ui/rta/messagebundle_fi.properties +19 -9
  74. package/src/sap/ui/rta/messagebundle_fr.properties +20 -10
  75. package/src/sap/ui/rta/messagebundle_fr_CA.properties +20 -10
  76. package/src/sap/ui/rta/messagebundle_hi.properties +20 -10
  77. package/src/sap/ui/rta/messagebundle_hr.properties +20 -10
  78. package/src/sap/ui/rta/messagebundle_hu.properties +19 -9
  79. package/src/sap/ui/rta/messagebundle_id.properties +24 -14
  80. package/src/sap/ui/rta/messagebundle_it.properties +21 -11
  81. package/src/sap/ui/rta/messagebundle_iw.properties +20 -10
  82. package/src/sap/ui/rta/messagebundle_ja.properties +20 -10
  83. package/src/sap/ui/rta/messagebundle_kk.properties +20 -10
  84. package/src/sap/ui/rta/messagebundle_ko.properties +21 -11
  85. package/src/sap/ui/rta/messagebundle_lt.properties +20 -10
  86. package/src/sap/ui/rta/messagebundle_lv.properties +20 -10
  87. package/src/sap/ui/rta/messagebundle_ms.properties +20 -10
  88. package/src/sap/ui/rta/messagebundle_nl.properties +20 -10
  89. package/src/sap/ui/rta/messagebundle_no.properties +20 -10
  90. package/src/sap/ui/rta/messagebundle_pl.properties +20 -10
  91. package/src/sap/ui/rta/messagebundle_pt.properties +19 -9
  92. package/src/sap/ui/rta/messagebundle_pt_PT.properties +19 -9
  93. package/src/sap/ui/rta/messagebundle_ro.properties +20 -10
  94. package/src/sap/ui/rta/messagebundle_ru.properties +19 -9
  95. package/src/sap/ui/rta/messagebundle_sh.properties +20 -10
  96. package/src/sap/ui/rta/messagebundle_sk.properties +20 -10
  97. package/src/sap/ui/rta/messagebundle_sl.properties +20 -10
  98. package/src/sap/ui/rta/messagebundle_sv.properties +20 -10
  99. package/src/sap/ui/rta/messagebundle_th.properties +25 -15
  100. package/src/sap/ui/rta/messagebundle_tr.properties +20 -10
  101. package/src/sap/ui/rta/messagebundle_uk.properties +23 -13
  102. package/src/sap/ui/rta/messagebundle_vi.properties +20 -10
  103. package/src/sap/ui/rta/messagebundle_zh_CN.properties +20 -10
  104. package/src/sap/ui/rta/messagebundle_zh_TW.properties +20 -10
  105. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  106. package/src/sap/ui/rta/plugin/BaseCreate.js +3 -3
  107. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  108. package/src/sap/ui/rta/plugin/CompVariant.js +1 -1
  109. package/src/sap/ui/rta/plugin/ControlVariant.js +4 -5
  110. package/src/sap/ui/rta/plugin/CreateContainer.js +2 -2
  111. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  112. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  113. package/src/sap/ui/rta/plugin/EasyAdd.js +2 -2
  114. package/src/sap/ui/rta/plugin/EasyRemove.js +2 -2
  115. package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
  116. package/src/sap/ui/rta/plugin/Plugin.js +2 -2
  117. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  118. package/src/sap/ui/rta/plugin/Remove.js +2 -2
  119. package/src/sap/ui/rta/plugin/Rename.js +2 -2
  120. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -15
  121. package/src/sap/ui/rta/plugin/Selection.js +16 -27
  122. package/src/sap/ui/rta/plugin/Settings.js +2 -2
  123. package/src/sap/ui/rta/plugin/Split.js +3 -2
  124. package/src/sap/ui/rta/plugin/Stretch.js +2 -2
  125. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +16 -85
  126. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +1 -68
  128. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +10 -11
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +4 -5
  130. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +18 -48
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +2 -17
  134. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +2 -2
  135. package/src/sap/ui/rta/service/Action.js +2 -2
  136. package/src/sap/ui/rta/service/ControllerExtension.js +6 -7
  137. package/src/sap/ui/rta/service/Outline.js +84 -31
  138. package/src/sap/ui/rta/service/Property.js +2 -4
  139. package/src/sap/ui/rta/service/Receiver.js +1 -1
  140. package/src/sap/ui/rta/service/Selection.js +3 -2
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/themes/base/ChangeVisualization.less +23 -30
  143. package/src/sap/ui/rta/themes/base/OverlayWithScrollbar.less +54 -35
  144. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  145. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  146. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +1 -0
  147. package/src/sap/ui/rta/toolbar/Adaptation.js +13 -13
  148. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  149. package/src/sap/ui/rta/toolbar/Base.js +4 -4
  150. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  151. package/src/sap/ui/rta/toolbar/Fiori.js +2 -2
  152. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  153. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -5
  154. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  155. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  156. package/src/sap/ui/rta/toolbar/translation/DownloadTranslationDialog.fragment.xml +19 -10
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +115 -46
  158. package/src/sap/ui/rta/toolbar/translation/TranslationPopover.fragment.xml +8 -13
  159. package/src/sap/ui/rta/toolbar/translation/UploadTranslationDialog.fragment.xml +41 -0
  160. package/src/sap/ui/rta/util/Animation.js +1 -1
  161. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  162. package/src/sap/ui/rta/util/PluginManager.js +2 -2
  163. package/src/sap/ui/rta/util/PopupManager.js +8 -13
  164. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  165. package/src/sap/ui/rta/util/StylesLoader.js +1 -1
  166. package/src/sap/ui/rta/util/UrlParser.js +1 -1
  167. package/src/sap/ui/rta/util/adaptationStarter.js +42 -4
  168. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -81
  169. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +15 -37
  170. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -3
  171. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +54 -67
  172. package/src/sap/ui/rta/util/changeVisualization/categories/MoveVisualization.js +30 -0
  173. package/src/sap/ui/rta/util/changeVisualization/categories/RenameVisualization.js +4 -3
  174. package/src/sap/ui/rta/util/changeVisualization/categories/SplitVisualization.js +30 -0
  175. package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +10 -4
  176. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  177. package/src/sap/ui/rta/util/showMessageBox.js +5 -4
  178. package/src/sap/ui/rta/util/validateFlexEnabled.js +7 -6
  179. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
@@ -1,95 +1,98 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
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
  */
6
6
 
7
7
  // Provides class sap.ui.rta.RuntimeAuthoring.
8
8
  sap.ui.define([
9
+ "sap/base/strings/capitalize",
10
+ "sap/base/util/UriParameters",
11
+ "sap/base/Log",
12
+ "sap/m/MessageBox",
13
+ "sap/m/MessageToast",
9
14
  "sap/ui/thirdparty/jquery",
10
15
  "sap/ui/base/ManagedObject",
11
- "sap/ui/rta/toolbar/Fiori",
12
- "sap/ui/rta/toolbar/Standalone",
13
- "sap/ui/rta/toolbar/Personalization",
14
- "sap/ui/rta/toolbar/FioriLike",
16
+ "sap/ui/core/BusyIndicator",
15
17
  "sap/ui/dt/DesignTime",
18
+ "sap/ui/dt/DOMUtil",
19
+ "sap/ui/dt/ElementUtil",
16
20
  "sap/ui/dt/Overlay",
17
- "sap/ui/rta/command/Stack",
18
- "sap/ui/rta/command/LREPSerializer",
19
- "sap/ui/rta/Utils",
21
+ "sap/ui/dt/OverlayRegistry",
20
22
  "sap/ui/dt/Util",
21
- "sap/ui/dt/ElementUtil",
22
- "sap/ui/fl/library",
23
- "sap/ui/fl/Utils",
24
- "sap/ui/fl/LayerUtils",
25
- "sap/ui/fl/Layer",
26
- "sap/ui/fl/write/api/ReloadInfoAPI",
23
+ "sap/ui/events/KeyCodes",
24
+ "sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
25
+ "sap/ui/fl/apply/api/SmartVariantManagementApplyAPI",
27
26
  "sap/ui/fl/write/api/FeaturesAPI",
28
- "sap/ui/fl/write/api/VersionsAPI",
29
27
  "sap/ui/fl/write/api/PersistenceWriteAPI",
30
- "sap/m/MessageBox",
31
- "sap/m/MessageToast",
32
- "sap/ui/rta/util/PluginManager",
33
- "sap/ui/rta/util/PopupManager",
34
- "sap/ui/core/BusyIndicator",
35
- "sap/ui/dt/DOMUtil",
36
- "sap/ui/rta/util/StylesLoader",
28
+ "sap/ui/fl/write/api/ReloadInfoAPI",
29
+ "sap/ui/fl/write/api/VersionsAPI",
30
+ "sap/ui/fl/Layer",
31
+ "sap/ui/fl/LayerUtils",
32
+ "sap/ui/fl/library",
33
+ "sap/ui/fl/Utils",
34
+ "sap/ui/model/json/JSONModel",
35
+ "sap/ui/performance/Measurement",
37
36
  "sap/ui/rta/appVariant/Feature",
38
- "sap/ui/Device",
37
+ "sap/ui/rta/command/BaseCommand",
38
+ "sap/ui/rta/command/LREPSerializer",
39
+ "sap/ui/rta/command/Stack",
39
40
  "sap/ui/rta/service/index",
41
+ "sap/ui/rta/toolbar/Fiori",
42
+ "sap/ui/rta/toolbar/FioriLike",
43
+ "sap/ui/rta/toolbar/Personalization",
44
+ "sap/ui/rta/toolbar/Standalone",
45
+ "sap/ui/rta/util/changeVisualization/ChangeVisualization",
46
+ "sap/ui/rta/util/PluginManager",
47
+ "sap/ui/rta/util/PopupManager",
40
48
  "sap/ui/rta/util/ServiceEventBus",
41
- "sap/ui/dt/OverlayRegistry",
42
- "sap/base/strings/capitalize",
43
- "sap/base/util/UriParameters",
44
- "sap/ui/performance/Measurement",
45
- "sap/base/Log",
46
- "sap/ui/events/KeyCodes",
47
- "sap/ui/model/json/JSONModel",
48
49
  "sap/ui/rta/util/validateFlexEnabled",
49
- "sap/ui/rta/util/changeVisualization/ChangeVisualization"
50
- ],
51
- function(
50
+ "sap/ui/rta/Utils",
51
+ "sap/ui/Device"
52
+ ], function(
53
+ capitalize,
54
+ UriParameters,
55
+ Log,
56
+ MessageBox,
57
+ MessageToast,
52
58
  jQuery,
53
59
  ManagedObject,
54
- FioriToolbar,
55
- StandaloneToolbar,
56
- PersonalizationToolbar,
57
- FioriLikeToolbar,
60
+ BusyIndicator,
58
61
  DesignTime,
62
+ DOMUtil,
63
+ ElementUtil,
59
64
  Overlay,
60
- CommandStack,
61
- LREPSerializer,
62
- Utils,
65
+ OverlayRegistry,
63
66
  DtUtil,
64
- ElementUtil,
65
- flexLibrary,
66
- FlexUtils,
67
- LayerUtils,
68
- Layer,
69
- ReloadInfoAPI,
67
+ KeyCodes,
68
+ FlexRuntimeInfoAPI,
69
+ SmartVariantManagementApplyAPI,
70
70
  FeaturesAPI,
71
- VersionsAPI,
72
71
  PersistenceWriteAPI,
73
- MessageBox,
74
- MessageToast,
75
- PluginManager,
76
- PopupManager,
77
- BusyIndicator,
78
- DOMUtil,
79
- StylesLoader,
72
+ ReloadInfoAPI,
73
+ VersionsAPI,
74
+ Layer,
75
+ LayerUtils,
76
+ flexLibrary,
77
+ FlexUtils,
78
+ JSONModel,
79
+ Measurement,
80
80
  RtaAppVariantFeature,
81
- Device,
81
+ BaseCommand,
82
+ LREPSerializer,
83
+ CommandStack,
82
84
  ServicesIndex,
85
+ FioriToolbar,
86
+ FioriLikeToolbar,
87
+ PersonalizationToolbar,
88
+ StandaloneToolbar,
89
+ ChangeVisualization,
90
+ PluginManager,
91
+ PopupManager,
83
92
  ServiceEventBus,
84
- OverlayRegistry,
85
- capitalize,
86
- UriParameters,
87
- Measurement,
88
- Log,
89
- KeyCodes,
90
- JSONModel,
91
93
  validateFlexEnabled,
92
- ChangeVisualization
94
+ Utils,
95
+ Device
93
96
  ) {
94
97
  "use strict";
95
98
 
@@ -107,7 +110,7 @@ function(
107
110
  * @class The runtime authoring allows to adapt the fields of a running application.
108
111
  * @extends sap.ui.base.ManagedObject
109
112
  * @author SAP SE
110
- * @version 1.96.2
113
+ * @version 1.98.0
111
114
  * @constructor
112
115
  * @private
113
116
  * @since 1.30
@@ -218,6 +221,7 @@ function(
218
221
  _sAppTitle: null,
219
222
  _dependents: null,
220
223
  _sStatus: STOPPED,
224
+ _bHasSwitchedToNavigationMode: false,
221
225
  constructor: function() {
222
226
  // call parent constructor
223
227
  ManagedObject.apply(this, arguments);
@@ -226,6 +230,7 @@ function(
226
230
  this._mServices = {};
227
231
  this._mCustomServicesDictinary = {};
228
232
  this._mUShellServices = {};
233
+ this._pElementModified = Promise.resolve();
229
234
 
230
235
  this.addDependent(new PluginManager(), "pluginManager");
231
236
  this.addDependent(new PopupManager(), "popupManager");
@@ -473,6 +478,9 @@ function(
473
478
  scope: this.getMetadataScope(),
474
479
  plugins: aPlugins
475
480
  });
481
+
482
+ addOrRemoveStyleClass(this.getRootControlInstance(), true);
483
+
476
484
  //add root control is triggering overlay creation, so we need to wait for the scope to be set.
477
485
  this._oDesignTime.addRootElement(this._oRootControl);
478
486
 
@@ -500,6 +508,7 @@ function(
500
508
  // Register function for checking unsaved before leaving RTA
501
509
  this._oldUnloadHandler = window.onbeforeunload;
502
510
  window.onbeforeunload = this._onUnload.bind(this);
511
+ return undefined;
503
512
  }.bind(this))
504
513
  .then(function () {
505
514
  if (this.getShowToolbars()) {
@@ -507,6 +516,7 @@ function(
507
516
  return this._getToolbarButtonsVisibility()
508
517
  .then(this._createToolsMenu.bind(this));
509
518
  }
519
+ return undefined;
510
520
  }.bind(this))
511
521
  // this is needed to initially check if undo is available, e.g. when the stack gets initialized with changes
512
522
  .then(this._onStackModified.bind(this))
@@ -525,6 +535,7 @@ function(
525
535
  // the show() method of the toolbar relies on this RTA instance being set on the PopupManager
526
536
  return this.getToolbar().show();
527
537
  }
538
+ return undefined;
528
539
  }.bind(this))
529
540
  .then(function () {
530
541
  if (Device.browser.name === "ff") {
@@ -536,8 +547,6 @@ function(
536
547
  .then(function() {
537
548
  this.fnKeyDown = this._onKeyDown.bind(this);
538
549
  jQuery(document).on("keydown", this.fnKeyDown);
539
-
540
- addOrRemoveStyleClass(this.getRootControlInstance(), true);
541
550
  }.bind(this))
542
551
  .then(function () {
543
552
  this._sStatus = STARTED;
@@ -555,8 +564,10 @@ function(
555
564
  this.destroy();
556
565
  return Promise.reject(vError);
557
566
  }
567
+ return undefined;
558
568
  }.bind(this));
559
569
  }
570
+ return undefined;
560
571
  };
561
572
 
562
573
  function _ffContextMenuHandler() {
@@ -652,6 +663,7 @@ function(
652
663
 
653
664
  /**
654
665
  * adapt the enablement of undo/redo/reset/transport button
666
+ * @returns {Promise} Resolves as soon as the MessageBox is closed
655
667
  * @private
656
668
  */
657
669
  RuntimeAuthoring.prototype._onStackModified = function() {
@@ -711,6 +723,7 @@ function(
711
723
  if (this.getShowToolbars() && this.getToolbar && this.getToolbar()) {
712
724
  return this.getToolbar()[sName](vValue);
713
725
  }
726
+ return undefined;
714
727
  };
715
728
 
716
729
  /**
@@ -725,17 +738,25 @@ function(
725
738
  return [];
726
739
  };
727
740
 
741
+ function waitForPendingActions() {
742
+ return Promise.resolve(this._oDesignTime && this._oDesignTime.waitForBusyPlugins())
743
+ .then(function() {
744
+ return this._pElementModified;
745
+ }.bind(this));
746
+ }
747
+
728
748
  /**
729
- * stop Runtime Authoring
749
+ * Stops Runtime Authoring
730
750
  *
731
751
  * @public
732
- * @param {boolean} bDontSaveChanges - stop RTA with or w/o saving changes
733
- * @param {boolean} bSkipRestart - stop RTA with or w/o checking if a reload is needed to apply e.g. personalization/app descriptor changes
734
- * @returns {Promise} promise with no parameters
752
+ * @param {boolean} bDontSaveChanges - Stop RTA with or w/o saving changes
753
+ * @param {boolean} bSkipRestart - Stop RTA with or w/o checking if a reload is needed to apply e.g. personalization/app descriptor changes
754
+ * @returns {Promise} Resolves with undefined
735
755
  */
736
756
  RuntimeAuthoring.prototype.stop = function(bDontSaveChanges, bSkipRestart) {
737
757
  this._checkToolbarAndExecuteFunction("setBusy", true);
738
- return this._handleReloadOnExit(bSkipRestart)
758
+ return waitForPendingActions.call(this)
759
+ .then(this._handleReloadOnExit.bind(this, bSkipRestart))
739
760
  .then(function(oReloadInfo) {
740
761
  return ((bDontSaveChanges) ? Promise.resolve() : this._serializeToLrep(this))
741
762
  .then(this._checkToolbarAndExecuteFunction.bind(this, "hide", bDontSaveChanges))
@@ -747,6 +768,7 @@ function(
747
768
  oReloadInfo.triggerHardReload = (oReloadInfo.reloadMethod === this._RELOAD.RELOAD_PAGE); // StandAlone or AppDescriptorChanges case
748
769
  return this._handleUrlParameterOnExit(oReloadInfo);
749
770
  }
771
+ return undefined;
750
772
  }.bind(this));
751
773
  }.bind(this))
752
774
  .catch(fnShowTechnicalError)
@@ -839,10 +861,12 @@ function(
839
861
  return this._getTextResources().getText("MSG_UNSAVED_CHANGES");
840
862
  }
841
863
  window.onbeforeunload = this._oldUnloadHandler;
864
+ return undefined;
842
865
  };
843
866
 
844
867
  RuntimeAuthoring.prototype._serializeAndSave = function() {
845
- return this._oSerializer.saveCommands(this._oVersionsModel.getProperty("/versioningEnabled"));
868
+ // Save changes on the current layer and discard dirty changes on other layers
869
+ return this._oSerializer.saveCommands(this._oVersionsModel.getProperty("/versioningEnabled"), this.getLayer(), true);
846
870
  };
847
871
 
848
872
  RuntimeAuthoring.prototype._serializeToLrep = function() {
@@ -937,16 +961,16 @@ function(
937
961
  };
938
962
 
939
963
  RuntimeAuthoring.prototype._onSwitchVersion = function (oEvent) {
940
- var nVersion = oEvent.getParameter("version");
941
- var nDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
964
+ var sVersion = oEvent.getParameter("version");
965
+ var sDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
942
966
 
943
- if (nVersion === nDisplayedVersion) {
967
+ if (sVersion === sDisplayedVersion) {
944
968
  // already displayed version needs no switch
945
969
  return;
946
970
  }
947
971
 
948
972
  if (this.canUndo()) {
949
- this._nSwitchToVersion = nVersion;
973
+ this._sSwitchToVersion = sVersion;
950
974
  Utils.showMessageBox("warning", "MSG_SWITCH_VERSION_DIALOG", {
951
975
  titleKey: "TIT_SWITCH_VERSION_DIALOG",
952
976
  actions: [MessageBox.Action.YES, MessageBox.Action.NO, MessageBox.Action.CANCEL],
@@ -954,22 +978,20 @@ function(
954
978
  }).then(function (sAction) {
955
979
  if (sAction === MessageBox.Action.YES) {
956
980
  this._serializeToLrep(this)
957
- .then(this._switchVersion.bind(this, this._nSwitchToVersion));
981
+ .then(this._switchVersion.bind(this, this._sSwitchToVersion));
958
982
  } else if (sAction === MessageBox.Action.NO) {
959
983
  // avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
960
984
  this.getCommandStack().removeAllCommands(true);
961
- this._switchVersion(this._nSwitchToVersion);
985
+ this._switchVersion(this._sSwitchToVersion);
962
986
  }
963
987
  return undefined;
964
988
  }.bind(this));
965
989
  return;
966
990
  }
967
- this._switchVersion(nVersion);
991
+ this._switchVersion(sVersion);
968
992
  };
969
993
 
970
- RuntimeAuthoring.prototype._switchVersion = function (nVersion) {
971
- var sVersion = nVersion.toString();
972
-
994
+ RuntimeAuthoring.prototype._switchVersion = function (sVersion) {
973
995
  RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
974
996
 
975
997
  if (!FlexUtils.getUshellContainer()) {
@@ -986,7 +1008,7 @@ function(
986
1008
  VersionsAPI.loadVersionForApplication({
987
1009
  selector: this.getRootControlInstance(),
988
1010
  layer: this.getLayer(),
989
- version: nVersion
1011
+ version: sVersion
990
1012
  });
991
1013
  var aVersionsParameter = mParsedHash.params[sap.ui.fl.Versions.UrlParameter];
992
1014
  if (
@@ -1049,6 +1071,14 @@ function(
1049
1071
  return oToolbar.onFragmentLoaded().then(function() {
1050
1072
  var bSaveAsAvailable = aButtonsVisibility.saveAsAvailable;
1051
1073
  var bExtendedOverview = bSaveAsAvailable && RtaAppVariantFeature.isOverviewExtended();
1074
+ var oUriParameters = UriParameters.fromURL(window.location.href);
1075
+ // the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
1076
+ var bVisualizationButtonVisible;
1077
+ if (oUriParameters.has("fiori-tools-rta-mode") && oUriParameters.get("fiori-tools-rta-mode") !== "false") {
1078
+ bVisualizationButtonVisible = false;
1079
+ } else {
1080
+ bVisualizationButtonVisible = true;
1081
+ }
1052
1082
 
1053
1083
  this._oToolbarControlsModel = new JSONModel({
1054
1084
  undoEnabled: false,
@@ -1064,7 +1094,8 @@ function(
1064
1094
  saveAsEnabled: false,
1065
1095
  manageAppsVisible: bSaveAsAvailable && !bExtendedOverview,
1066
1096
  manageAppsEnabled: bSaveAsAvailable && !bExtendedOverview,
1067
- modeSwitcher: this.getMode()
1097
+ modeSwitcher: this.getMode(),
1098
+ visualizationButtonVisible: bVisualizationButtonVisible
1068
1099
  });
1069
1100
 
1070
1101
  if (bSaveAsAvailable) {
@@ -1075,12 +1106,13 @@ function(
1075
1106
  }.bind(this));
1076
1107
  }
1077
1108
 
1078
- /* TODO enable as soon as the code is ready
1079
- FeaturesAPI.isKeyUserTranslationEnabled(this.getLayer()).then(function(oResult) {
1080
- this._oToolbarControlsModel.setProperty("/translationVisible", oResult);
1109
+ /*
1110
+ FeaturesAPI.isKeyUserTranslationEnabled(this.getLayer()).then(function() {
1111
+ this._oToolbarControlsModel.setProperty("/translationVisible", true);
1081
1112
  }.bind(this));
1082
1113
  */
1083
1114
 
1115
+
1084
1116
  this.getToolbar().setModel(this._oVersionsModel, "versions");
1085
1117
  this.getToolbar().setModel(this._oToolbarControlsModel, "controls");
1086
1118
  }.bind(this));
@@ -1143,8 +1175,9 @@ function(
1143
1175
  BusyIndicator.show(500);
1144
1176
  return this._serializeToLrep().then(function () {
1145
1177
  BusyIndicator.hide();
1146
- var bAppVariantRunning = FlexUtils.isApplicationVariant(this._oRootControl) && !FlexUtils.isVariantByStartupParameter(this._oRootControl);
1147
- return ((bAppVariantRunning) ? RtaAppVariantFeature.getAppVariantDescriptor(this._oRootControl) : Promise.resolve())
1178
+ var bVariantByStartupParameter = FlexUtils.isVariantByStartupParameter(this._oRootControl);
1179
+ var bAppVariantRunning = SmartVariantManagementApplyAPI.isApplicationVariant({control: this._oRootControl}) && !bVariantByStartupParameter;
1180
+ return (bAppVariantRunning ? RtaAppVariantFeature.getAppVariantDescriptor(this._oRootControl) : Promise.resolve())
1148
1181
  .then(function(oAppVariantDescriptor) {
1149
1182
  var aAppVariantDescriptor = [];
1150
1183
  if (oAppVariantDescriptor) {
@@ -1216,13 +1249,14 @@ function(
1216
1249
 
1217
1250
  /**
1218
1251
  * Shows a message toast.
1219
- * @param {string} sMessageKey The text key for the message
1252
+ * @param {string} sMessageKey - The text key for the message
1253
+ * @param {object} mOptions - Options for message toast
1220
1254
  * @private
1221
1255
  */
1222
- RuntimeAuthoring.prototype._showMessageToast = function(sMessageKey) {
1256
+ RuntimeAuthoring.prototype._showMessageToast = function(sMessageKey, mOptions) {
1223
1257
  var sMessage = this._getTextResources().getText(sMessageKey);
1224
1258
 
1225
- MessageToast.show(sMessage);
1259
+ MessageToast.show(sMessage, mOptions || {});
1226
1260
  };
1227
1261
 
1228
1262
  /**
@@ -1230,7 +1264,7 @@ function(
1230
1264
  *
1231
1265
  * @public
1232
1266
  * @static
1233
- * @param {string} sLayer The active layer
1267
+ * @param {sap.ui.fl.Layer} sLayer - Active layer
1234
1268
  * @returns {boolean} Returns true if restart is needed
1235
1269
  */
1236
1270
  RuntimeAuthoring.needsRestart = function(sLayer) {
@@ -1243,11 +1277,11 @@ function(
1243
1277
  *
1244
1278
  * @public
1245
1279
  * @static
1246
- * @param {string} sLayer - The active layer
1247
- * @param {sap.ui.core.Control} oRootControl - root control for which RTA was started
1280
+ * @param {sap.ui.fl.Layer} sLayer - Active layer
1281
+ * @param {sap.ui.core.Control} oRootControl - Root control for which RTA was started
1248
1282
  */
1249
1283
  RuntimeAuthoring.enableRestart = function(sLayer, oRootControl) {
1250
- var sFlexReference = FlexUtils.getComponentClassName(oRootControl);
1284
+ var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oRootControl});
1251
1285
  var vParameter = sFlexReference || true;
1252
1286
  window.sessionStorage.setItem("sap.ui.rta.restart." + sLayer, vParameter);
1253
1287
  };
@@ -1257,7 +1291,7 @@ function(
1257
1291
  *
1258
1292
  * @public
1259
1293
  * @static
1260
- * @param {string} sLayer The active layer
1294
+ * @param {sap.ui.fl.Layer} sLayer - Active layer
1261
1295
  */
1262
1296
  RuntimeAuthoring.disableRestart = function(sLayer) {
1263
1297
  window.sessionStorage.removeItem("sap.ui.rta.restart." + sLayer);
@@ -1383,35 +1417,38 @@ function(
1383
1417
  * @private
1384
1418
  */
1385
1419
  RuntimeAuthoring.prototype._handleElementModified = function(oEvent) {
1386
- this.getPluginManager().handleStopCutPaste();
1387
-
1388
- var vAction = oEvent.getParameter("action");
1420
+ // events are synchronously reset after the handlers are called
1421
+ var oCommand = oEvent.getParameter("command");
1389
1422
  var sNewControlID = oEvent.getParameter("newControlId");
1423
+ var vAction = oEvent.getParameter("action");
1390
1424
 
1391
- var oCommand = oEvent.getParameter("command");
1392
- if (oCommand instanceof sap.ui.rta.command.BaseCommand) {
1393
- if (sNewControlID) {
1394
- this._scheduleOnCreated(sNewControlID, function (oElementOverlay) {
1395
- var oDesignTimeMetadata = oElementOverlay.getDesignTimeMetadata();
1396
- var fnSelect = oDesignTimeMetadata.getData().select;
1397
- if (typeof fnSelect === "function") {
1398
- fnSelect(oElementOverlay.getElement());
1425
+ this._pElementModified = this._pElementModified.then(function() {
1426
+ this.getPluginManager().handleStopCutPaste();
1427
+
1428
+ if (oCommand instanceof BaseCommand) {
1429
+ if (sNewControlID) {
1430
+ this._scheduleOnCreated(sNewControlID, function (oElementOverlay) {
1431
+ var oDesignTimeMetadata = oElementOverlay.getDesignTimeMetadata();
1432
+ var fnSelect = oDesignTimeMetadata.getData().select;
1433
+ if (typeof fnSelect === "function") {
1434
+ fnSelect(oElementOverlay.getElement());
1435
+ }
1436
+ });
1437
+ if (vAction) {
1438
+ this._scheduleRenameOnCreatedContainer(vAction, sNewControlID);
1399
1439
  }
1400
- });
1401
- if (vAction) {
1402
- this._scheduleRenameOnCreatedContainer(vAction, sNewControlID);
1403
1440
  }
1441
+ return this.getCommandStack().pushAndExecute(oCommand)
1442
+ // Error handling when a command fails is done in the Stack
1443
+ .catch(function(oError) {
1444
+ if (oError && oError.message && oError.message.indexOf("The following Change cannot be applied because of a dependency") > -1) {
1445
+ Utils.showMessageBox("error", "MSG_DEPENDENCY_ERROR", {error: oError});
1446
+ }
1447
+ Log.error("sap.ui.rta: " + oError.message);
1448
+ });
1404
1449
  }
1405
- return this.getCommandStack().pushAndExecute(oCommand)
1406
- // Error handling when a command fails is done in the Stack
1407
- .catch(function(oError) {
1408
- if (oError && oError.message && oError.message.indexOf("The following Change cannot be applied because of a dependency") > -1) {
1409
- Utils.showMessageBox("error", "MSG_DEPENDENCY_ERROR", {error: oError});
1410
- }
1411
- Log.error("sap.ui.rta: " + oError.message);
1412
- });
1413
- }
1414
- return Promise.resolve();
1450
+ }.bind(this));
1451
+ return this._pElementModified;
1415
1452
  };
1416
1453
 
1417
1454
  /**
@@ -1511,6 +1548,7 @@ function(
1511
1548
  if (oReloadInfo.triggerHardReload) {
1512
1549
  this._reloadPage();
1513
1550
  }
1551
+ return undefined;
1514
1552
  };
1515
1553
 
1516
1554
  /**
@@ -1586,6 +1624,7 @@ function(
1586
1624
  if (oReloadInfo.allContexts) {
1587
1625
  return "MSG_RELOAD_WITHOUT_ALL_CONTEXT";
1588
1626
  }
1627
+ return undefined;
1589
1628
  };
1590
1629
 
1591
1630
  /**
@@ -1626,24 +1665,25 @@ function(
1626
1665
  if (!sReason) {
1627
1666
  return Promise.resolve();
1628
1667
  }
1629
- return Utils.showMessageBox("information", sReason)
1630
- .then(function() {
1631
- RuntimeAuthoring.enableRestart(oReloadInfo.layer, this.getRootControlInstance());
1632
- // allContexts do not change the url parameter to trigger a reload
1633
- if (
1634
- oReloadInfo.allContexts &&
1635
- !oReloadInfo.hasHigherLayerChanges &&
1636
- this._getUShellService("AppLifeCycle")
1637
- ) {
1638
- this._getUShellService("AppLifeCycle").reloadCurrentApp();
1639
- }
1640
- if (FlexUtils.getUshellContainer()) {
1641
- // clears FlexState and triggers reloading of the flex data without blocking
1642
- var oParsedHash = ReloadInfoAPI.handleParametersOnStart(oReloadInfo);
1643
- return this._triggerCrossAppNavigation(oParsedHash);
1644
- }
1645
- return this._triggerHardReload(oReloadInfo);
1646
- }.bind(this));
1668
+ // showing messages in visual editor is leading to blocked screen. In this case we should reload without message
1669
+ return (this.getFlexSettings().developerMode ? Promise.resolve() : Utils.showMessageBox("information", sReason))
1670
+ .then(function() {
1671
+ RuntimeAuthoring.enableRestart(oReloadInfo.layer, this.getRootControlInstance());
1672
+ // allContexts do not change the url parameter to trigger a reload
1673
+ if (
1674
+ oReloadInfo.allContexts &&
1675
+ !oReloadInfo.hasHigherLayerChanges &&
1676
+ this._getUShellService("AppLifeCycle")
1677
+ ) {
1678
+ this._getUShellService("AppLifeCycle").reloadCurrentApp();
1679
+ }
1680
+ if (FlexUtils.getUshellContainer()) {
1681
+ // clears FlexState and triggers reloading of the flex data without blocking
1682
+ var oParsedHash = ReloadInfoAPI.handleParametersOnStart(oReloadInfo);
1683
+ return this._triggerCrossAppNavigation(oParsedHash);
1684
+ }
1685
+ return this._triggerHardReload(oReloadInfo);
1686
+ }.bind(this));
1647
1687
  };
1648
1688
 
1649
1689
  /**
@@ -1748,6 +1788,13 @@ function(
1748
1788
  oTabHandlingPlugin[(sNewMode === "navigation") ? "restoreTabIndex" : "removeTabIndex"]();
1749
1789
  }
1750
1790
 
1791
+ if (sNewMode === "navigation" && !this._bHasSwitchedToNavigationMode) {
1792
+ this._showMessageToast("MSG_NAVIGATION_MODE_CHANGES_WARNING", {
1793
+ duration: 5000
1794
+ });
1795
+ this._bHasSwitchedToNavigationMode = true;
1796
+ }
1797
+
1751
1798
  oTabHandlingPlugin[(sNewMode === "adaptation") ? "restoreOverlayTabIndex" : "removeOverlayTabIndex"]();
1752
1799
  oSelectionPlugin.setIsActive(!(sNewMode === "visualization"));
1753
1800
 
@@ -1783,6 +1830,7 @@ function(
1783
1830
  if (ServicesIndex.hasOwnProperty(sName)) {
1784
1831
  return ServicesIndex[sName].replace(/\./g, "/");
1785
1832
  }
1833
+ return undefined;
1786
1834
  }
1787
1835
 
1788
1836
  /**
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
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
  */
6
6
 
@@ -46,7 +46,7 @@ function(
46
46
  * @class Utility functionality to work with controls, e.g. iterate through aggregations, find parents, etc.
47
47
  *
48
48
  * @author SAP SE
49
- * @version 1.96.2
49
+ * @version 1.98.0
50
50
  *
51
51
  * @private
52
52
  * @static
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
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
  */
6
6
  sap.ui.define([
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @alias module:sap/ui/rta/api/startAdaptation
33
33
  *
34
34
  * @param {object} mOptions - Object with properties
35
- * @param {sap.ui.core.Element|sap.ui.core.UIComponent} mOptions.rootControl - Control instance from where UI adaptation should be started
35
+ * @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.
36
36
  * @param {object} [mOptions.flexSettings] - Map with flex-related settings
37
37
  * @param {string} [mOptions.flexSettings.layer] - The Layer in which RTA should be started. Default: "CUSTOMER"
38
38
  * @param {boolean} [mOptions.flexSettings.developerMode] - Whether RTA is started in developerMode mode. Default: <code>false</code>
@@ -41,7 +41,6 @@ sap.ui.define([
41
41
  * @param {function} [onFailed] - Event handler function called on failed event
42
42
  * @param {function} [onStop] - Event handler function called on stop event
43
43
  * @returns {Promise} Resolves when UI adaptation was successfully started
44
- * @ui5-restricted
45
44
  * @public
46
45
  */
47
46
  function startAdaptation(mOptions, loadPlugins, onStart, onFailed, onStop) {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
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
  */
6
6
  sap.ui.define([
@@ -22,9 +22,9 @@ sap.ui.define([
22
22
  * @alias module:sap/ui/rta/api/startKeyUserAdaptation
23
23
  *
24
24
  * @param {object} mPropertyBag - Object with properties
25
- * @param {sap.ui.core.Element|sap.ui.core.UIComponent} mPropertyBag.rootControl - Control instance from where key user adaptation should be started
25
+ * @param {sap.ui.core.Control|sap.ui.core.UIComponent} mPropertyBag.rootControl - Control instance to get the AppComponent. This then is used to start UI adaptation.
26
26
  *
27
- * @returns {Promise} Resolves when adaptation was successfully started
27
+ * @returns {Promise} Resolves when UI adaptation was successfully started
28
28
  * @public
29
29
  */
30
30
  function startKeyUserAdaptation(mPropertyBag) {