@openui5/sap.ui.rta 1.109.0 → 1.111.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 (196) hide show
  1. package/.reuse/dep5 +16 -16
  2. package/THIRDPARTY.txt +2 -2
  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 +251 -151
  7. package/src/sap/ui/rta/Utils.js +40 -19
  8. package/src/sap/ui/rta/api/startAdaptation.js +1 -1
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +1 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +1 -1
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +1 -1
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +1 -1
  14. package/src/sap/ui/rta/appVariant/Feature.js +2 -8
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +1 -1
  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 +2 -2
  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 +2 -2
  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 +15 -13
  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 +27 -12
  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/Resize.js +2 -2
  46. package/src/sap/ui/rta/command/Reveal.js +2 -2
  47. package/src/sap/ui/rta/command/Settings.js +2 -2
  48. package/src/sap/ui/rta/command/Split.js +2 -2
  49. package/src/sap/ui/rta/command/Stack.js +11 -3
  50. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +2 -2
  51. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +2 -2
  52. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +2 -2
  53. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +2 -2
  54. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +2 -2
  55. package/src/sap/ui/rta/enablement/TestDelegate.js +1 -1
  56. package/src/sap/ui/rta/enablement/elementActionTest.js +2 -2
  57. package/src/sap/ui/rta/library.js +3 -3
  58. package/src/sap/ui/rta/messagebundle.properties +65 -13
  59. package/src/sap/ui/rta/messagebundle_ar.properties +35 -11
  60. package/src/sap/ui/rta/messagebundle_bg.properties +35 -11
  61. package/src/sap/ui/rta/messagebundle_ca.properties +35 -11
  62. package/src/sap/ui/rta/messagebundle_cs.properties +35 -11
  63. package/src/sap/ui/rta/messagebundle_cy.properties +34 -10
  64. package/src/sap/ui/rta/messagebundle_da.properties +34 -10
  65. package/src/sap/ui/rta/messagebundle_de.properties +37 -13
  66. package/src/sap/ui/rta/messagebundle_el.properties +34 -10
  67. package/src/sap/ui/rta/messagebundle_en.properties +33 -9
  68. package/src/sap/ui/rta/messagebundle_en_GB.properties +33 -9
  69. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +31 -5
  70. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +37 -5
  71. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +31 -7
  72. package/src/sap/ui/rta/messagebundle_es.properties +34 -10
  73. package/src/sap/ui/rta/messagebundle_es_MX.properties +34 -10
  74. package/src/sap/ui/rta/messagebundle_et.properties +34 -10
  75. package/src/sap/ui/rta/messagebundle_fi.properties +34 -10
  76. package/src/sap/ui/rta/messagebundle_fr.properties +34 -10
  77. package/src/sap/ui/rta/messagebundle_fr_CA.properties +35 -11
  78. package/src/sap/ui/rta/messagebundle_hi.properties +35 -11
  79. package/src/sap/ui/rta/messagebundle_hr.properties +35 -11
  80. package/src/sap/ui/rta/messagebundle_hu.properties +34 -10
  81. package/src/sap/ui/rta/messagebundle_id.properties +35 -11
  82. package/src/sap/ui/rta/messagebundle_it.properties +35 -11
  83. package/src/sap/ui/rta/messagebundle_iw.properties +34 -10
  84. package/src/sap/ui/rta/messagebundle_ja.properties +35 -11
  85. package/src/sap/ui/rta/messagebundle_kk.properties +34 -10
  86. package/src/sap/ui/rta/messagebundle_ko.properties +34 -10
  87. package/src/sap/ui/rta/messagebundle_lt.properties +34 -10
  88. package/src/sap/ui/rta/messagebundle_lv.properties +35 -11
  89. package/src/sap/ui/rta/messagebundle_ms.properties +35 -11
  90. package/src/sap/ui/rta/messagebundle_nl.properties +34 -10
  91. package/src/sap/ui/rta/messagebundle_no.properties +35 -11
  92. package/src/sap/ui/rta/messagebundle_pl.properties +35 -11
  93. package/src/sap/ui/rta/messagebundle_pt.properties +35 -11
  94. package/src/sap/ui/rta/messagebundle_pt_PT.properties +34 -10
  95. package/src/sap/ui/rta/messagebundle_ro.properties +35 -11
  96. package/src/sap/ui/rta/messagebundle_ru.properties +35 -11
  97. package/src/sap/ui/rta/messagebundle_sh.properties +34 -10
  98. package/src/sap/ui/rta/messagebundle_sk.properties +34 -10
  99. package/src/sap/ui/rta/messagebundle_sl.properties +34 -10
  100. package/src/sap/ui/rta/messagebundle_sv.properties +35 -11
  101. package/src/sap/ui/rta/messagebundle_th.properties +36 -12
  102. package/src/sap/ui/rta/messagebundle_tr.properties +34 -10
  103. package/src/sap/ui/rta/messagebundle_uk.properties +34 -10
  104. package/src/sap/ui/rta/messagebundle_vi.properties +35 -11
  105. package/src/sap/ui/rta/messagebundle_zh_CN.properties +35 -11
  106. package/src/sap/ui/rta/messagebundle_zh_TW.properties +35 -11
  107. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  108. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
  109. package/src/sap/ui/rta/plugin/Combine.js +2 -2
  110. package/src/sap/ui/rta/plugin/CompVariant.js +4 -6
  111. package/src/sap/ui/rta/plugin/ControlVariant.js +2 -2
  112. package/src/sap/ui/rta/plugin/CreateContainer.js +3 -3
  113. package/src/sap/ui/rta/plugin/CutPaste.js +2 -2
  114. package/src/sap/ui/rta/plugin/DragDrop.js +4 -4
  115. package/src/sap/ui/rta/plugin/EasyAdd.js +30 -21
  116. package/src/sap/ui/rta/plugin/EasyRemove.js +13 -11
  117. package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
  118. package/src/sap/ui/rta/plugin/Plugin.js +57 -13
  119. package/src/sap/ui/rta/plugin/RTAElementMover.js +2 -2
  120. package/src/sap/ui/rta/plugin/Remove.js +3 -3
  121. package/src/sap/ui/rta/plugin/Rename.js +2 -2
  122. package/src/sap/ui/rta/plugin/RenameHandler.js +30 -19
  123. package/src/sap/ui/rta/plugin/Resize.js +2 -2
  124. package/src/sap/ui/rta/plugin/Selection.js +8 -15
  125. package/src/sap/ui/rta/plugin/Settings.js +2 -2
  126. package/src/sap/ui/rta/plugin/Split.js +2 -2
  127. package/src/sap/ui/rta/plugin/Stretch.js +17 -16
  128. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +28 -7
  129. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.fragment.xml +1 -0
  130. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +2 -2
  131. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -2
  132. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +5 -5
  133. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -2
  134. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
  135. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +2 -2
  136. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +7 -2
  137. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +2 -2
  138. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -4
  139. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  140. package/src/sap/ui/rta/service/Action.js +2 -2
  141. package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
  142. package/src/sap/ui/rta/service/Outline.js +2 -2
  143. package/src/sap/ui/rta/service/Property.js +2 -2
  144. package/src/sap/ui/rta/service/Receiver.js +1 -1
  145. package/src/sap/ui/rta/service/Selection.js +2 -2
  146. package/src/sap/ui/rta/service/SupportTools.js +2 -2
  147. package/src/sap/ui/rta/service/index.js +1 -1
  148. package/src/sap/ui/rta/themes/base/AddIFrame.less +1 -1
  149. package/src/sap/ui/rta/themes/base/Dialogs.less +1 -1
  150. package/src/sap/ui/rta/themes/base/FieldRepository.less +1 -1
  151. package/src/sap/ui/rta/themes/base/library.source.less +1 -1
  152. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +1 -1
  153. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +82 -0
  154. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +35 -79
  155. package/src/sap/ui/rta/toolbar/Adaptation.js +83 -25
  156. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  157. package/src/sap/ui/rta/toolbar/Base.js +4 -4
  158. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -1
  159. package/src/sap/ui/rta/toolbar/Fiori.js +15 -11
  160. package/src/sap/ui/rta/toolbar/FioriLike.js +2 -2
  161. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +2 -2
  162. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  163. package/src/sap/ui/rta/toolbar/Standalone.js +2 -2
  164. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +340 -0
  165. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +152 -0
  166. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +225 -0
  167. package/src/sap/ui/rta/toolbar/contextBased/{SaveAsContextBasedAdaptationDialog.fragment.xml → SaveAsAdaptationDialog.fragment.xml} +19 -15
  168. package/src/sap/ui/rta/toolbar/translation/Translation.js +2 -2
  169. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +4 -4
  170. package/src/sap/ui/rta/util/Animation.js +5 -9
  171. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  172. package/src/sap/ui/rta/util/PluginManager.js +2 -2
  173. package/src/sap/ui/rta/util/PopupManager.js +2 -2
  174. package/src/sap/ui/rta/util/ReloadManager.js +2 -2
  175. package/src/sap/ui/rta/util/ServiceEventBus.js +2 -2
  176. package/src/sap/ui/rta/util/StylesLoader.js +1 -1
  177. package/src/sap/ui/rta/util/UrlParser.js +1 -1
  178. package/src/sap/ui/rta/util/adaptationStarter.js +1 -1
  179. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +1 -1
  180. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +4 -6
  181. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
  182. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +27 -3
  183. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +2 -2
  184. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +127 -71
  185. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  186. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  187. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  188. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +1 -1
  189. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +1 -1
  190. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  191. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +1 -1
  192. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  193. package/src/sap/ui/rta/util/showMessageBox.js +1 -1
  194. package/src/sap/ui/rta/util/validateFlexEnabled.js +1 -1
  195. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  196. package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +0 -124
@@ -1,11 +1,10 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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
  sap.ui.define([
8
- "sap/ui/thirdparty/jquery",
9
8
  "sap/ui/fl/write/api/FieldExtensibility",
10
9
  "sap/ui/fl/Utils",
11
10
  "sap/ui/fl/Layer",
@@ -19,10 +18,10 @@ sap.ui.define([
19
18
  "sap/ui/rta/util/BindingsExtractor",
20
19
  "sap/base/util/restricted/_omit",
21
20
  "sap/ui/model/json/JSONModel",
22
- "sap/ui/core/Fragment"
21
+ "sap/ui/core/Fragment",
22
+ "sap/ui/core/Core"
23
23
  ],
24
24
  function(
25
- jQuery,
26
25
  FieldExtensibility,
27
26
  FlexUtils,
28
27
  Layer,
@@ -36,7 +35,8 @@ function(
36
35
  BindingsExtractor,
37
36
  _omit,
38
37
  JSONModel,
39
- Fragment
38
+ Fragment,
39
+ Core
40
40
  ) {
41
41
  "use strict";
42
42
 
@@ -45,7 +45,7 @@ function(
45
45
  *
46
46
  * @namespace
47
47
  * @author SAP SE
48
- * @version 1.109.0
48
+ * @version 1.111.0
49
49
  *
50
50
  * @private
51
51
  * @since 1.30
@@ -99,11 +99,12 @@ function(
99
99
  if (bServiceOutdated) {
100
100
  FieldExtensibility.setServiceValid(oModel.sServiceUrl);
101
101
  //needs FLP to trigger UI restart popup
102
- sap.ui.getCore().getEventBus().publish("sap.ui.core.UnrecoverableClientStateCorruption", "RequestReload", {});
102
+ Core.getEventBus().publish("sap.ui.core.UnrecoverableClientStateCorruption", "RequestReload", {});
103
103
  }
104
104
  });
105
105
  }
106
106
  }
107
+ return undefined;
107
108
  });
108
109
  };
109
110
 
@@ -115,7 +116,7 @@ function(
115
116
  * @returns{Promise} The Promise which resolves when popup is closed (via Remove OR Cancel actions)
116
117
  */
117
118
  Utils.openRemoveConfirmationDialog = function(oElement, sText) {
118
- var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
119
+ var oTextResources = Core.getLibraryResourceBundle("sap.ui.rta");
119
120
  var sTitle;
120
121
  return new Promise(
121
122
  function(resolve) {
@@ -206,10 +207,11 @@ function(
206
207
  * @private
207
208
  */
208
209
  Utils.getOverlayInstanceForDom = function(oDomRef) {
209
- var sId = jQuery(oDomRef).attr("id");
210
+ var sId = oDomRef.getAttribute("id");
210
211
  if (sId) {
211
- return sap.ui.getCore().byId(sId);
212
+ return Core.byId(sId);
212
213
  }
214
+ return undefined;
213
215
  };
214
216
 
215
217
  /**
@@ -220,11 +222,12 @@ function(
220
222
  */
221
223
  Utils.getFocusedOverlay = function() {
222
224
  if (document.activeElement) {
223
- var oElement = sap.ui.getCore().byId(document.activeElement.id);
225
+ var oElement = Core.byId(document.activeElement.id);
224
226
  if (oElement && oElement.isA("sap.ui.dt.ElementOverlay")) {
225
227
  return oElement;
226
228
  }
227
229
  }
230
+ return undefined;
228
231
  };
229
232
 
230
233
  /**
@@ -453,9 +456,8 @@ function(
453
456
  * @returns{boolean} - Returns if <code>oDomElement</code> is currently visible on the screen.
454
457
  */
455
458
  Utils.isElementInViewport = function(oDomElement) {
456
- if (oDomElement instanceof jQuery) {
457
- oDomElement = oDomElement.get(0);
458
- }
459
+ //TODO: remove when all calls are replaced
460
+ oDomElement = oDomElement.jquery ? oDomElement.get(0) : oDomElement;
459
461
 
460
462
  var mRect = oDomElement.getBoundingClientRect();
461
463
 
@@ -476,18 +478,36 @@ function(
476
478
  * @param {object} [mPropertyBag] - Object with additional information; error and titleKey are evaluated, the rest is passed as option to the MessageBox
477
479
  * @param {any} [mPropertyBag.error] - If an error is passed on, the message box text is derived from it
478
480
  * @param {string} [mPropertyBag.titleKey] - The text key for the title of the message box; if none is provided the default of the selectde MessageBox type will be displayed
479
- * @returns{Promise} Promise displaying the message box; resolves when it is closed
481
+ * @param {array} [mPropertyBag.actions] - Available actions for the messabe box
482
+ * @param {array} [mPropertyBag.actionKeys] - The text key for the action buttons of the message box. It is provided as actions property to the MessageBox.
483
+ * If mPropertyBag.actions property is set, it will not be overriden
484
+ * @param {string} [mPropertyBag.emphasizedAction] - Action option to be emphasized
485
+ * @param {string} [mPropertyBag.emphasizedActionKey] - Text key of the action option to be emphasized
486
+ * @param {boolean} [mPropertyBag.showCancel] - Whether "cancel" should be part of the actions
487
+ * @returns{Promise} Promise displaying the message box; resolves when it is closed with the pressed button
480
488
  */
481
489
  Utils.showMessageBox = function(sMessageType, sMessageKey, mPropertyBag) {
482
- return sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta", true)
490
+ return Core.getLibraryResourceBundle("sap.ui.rta", true)
483
491
  .then(function(oResourceBundle) {
484
492
  mPropertyBag = mPropertyBag || {};
485
493
  var sMessage = oResourceBundle.getText(sMessageKey, mPropertyBag.error ? [mPropertyBag.error.userMessage || mPropertyBag.error.message || mPropertyBag.error] : undefined);
486
494
  var sTitle = mPropertyBag.titleKey && oResourceBundle.getText(mPropertyBag.titleKey);
487
-
488
- var mOptions = _omit(mPropertyBag, ["titleKey", "error"]);
495
+ var vActionTexts =
496
+ mPropertyBag.actionKeys &&
497
+ mPropertyBag.actionKeys.map(function(sActionKey) {
498
+ return oResourceBundle.getText(sActionKey);
499
+ });
500
+ var sEmphasizedAction = mPropertyBag.emphasizedActionKey ? oResourceBundle.getText(mPropertyBag.emphasizedActionKey) : undefined;
501
+
502
+ var bShowCancel = mPropertyBag.showCancel;
503
+ var mOptions = _omit(mPropertyBag, ["titleKey", "error", "actionKeys", "emphasizedAction", "emphasizedActionKey", "showCancel"]);
489
504
  mOptions.title = sTitle;
490
505
  mOptions.styleClass = Utils.getRtaStyleClassName();
506
+ mOptions.actions = mOptions.actions || vActionTexts;
507
+ mOptions.emphasizedAction = sEmphasizedAction || mPropertyBag.emphasizedAction;
508
+ if (bShowCancel) {
509
+ mOptions.actions.push(MessageBox.Action.CANCEL);
510
+ }
491
511
 
492
512
  return messageBoxPromise(sMessageType, sMessage, mOptions);
493
513
  });
@@ -540,6 +560,7 @@ function(
540
560
  })) {
541
561
  return fnCallback();
542
562
  }
563
+ return undefined;
543
564
  };
544
565
 
545
566
  /**
@@ -624,4 +645,4 @@ function(
624
645
  };
625
646
 
626
647
  return Utils;
627
- }, /* bExport= */true);
648
+ }, /* bExport= */true);
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.base.ManagedObject
26
26
  * @author SAP SE
27
- * @version 1.109.0
27
+ * @version 1.111.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.53
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -107,19 +107,13 @@ sap.ui.define([
107
107
  AppVariantUtils.closeOverviewDialog();
108
108
  };
109
109
 
110
- var oUriParameters = UriParameters.fromQuery(window.location.search);
111
- var sAppContextsEnabled = oUriParameters.get("sap-ui-xx-rta-adaptations");
112
-
113
110
  var sOverviewPath = "sap/ui/rta/appVariant/AppVariantOverviewDialog";
114
111
  var oProperties = {
115
112
  idRunningApp: oDescriptor["sap.app"].id,
116
113
  isOverviewForKeyUser: bAsKeyUser,
117
114
  layer: sLayer
118
115
  };
119
- if (sAppContextsEnabled === "true") {
120
- sOverviewPath = "sap/ui/rta/appContexts/AppContextsOverviewDialog";
121
- oProperties = {layer: sLayer};
122
- }
116
+
123
117
  sap.ui.require([sOverviewPath], function(AppVariantOverviewDialog) {
124
118
  if (!oAppVariantOverviewDialog) {
125
119
  oAppVariantOverviewDialog = new AppVariantOverviewDialog(oProperties);
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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.require([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.109.0
19
+ * @version 1.111.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.75
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -14,7 +14,7 @@ sap.ui.define([
14
14
  * @class
15
15
  * @extends sap.ui.rta.command.FlexCommand
16
16
  * @author SAP SE
17
- * @version 1.109.0
17
+ * @version 1.111.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.78
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.109.0
19
+ * @version 1.111.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.54
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.rta.command.FlexCommand
26
26
  * @author SAP SE
27
- * @version 1.109.0
27
+ * @version 1.111.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.76
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.ui.rta.command.BaseCommand
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.109.0
24
+ * @version 1.111.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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(["sap/ui/base/ManagedObject"], function(ManagedObject) {
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/base/ManagedObject"], function(ManagedObject) {
13
13
  * @extends sap.ui.base.ManagedObject
14
14
  *
15
15
  * @author SAP SE
16
- * @version 1.109.0
16
+ * @version 1.111.0
17
17
  *
18
18
  * @constructor
19
19
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @class
27
27
  * @extends sap.ui.rta.command.FlexCommand
28
28
  * @author SAP SE
29
- * @version 1.109.0
29
+ * @version 1.111.0
30
30
  * @constructor
31
31
  * @private
32
32
  * @since 1.38
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.109.0
19
+ * @version 1.111.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.46
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -485,7 +485,7 @@ sap.ui.define([
485
485
  * @extends sap.ui.base.ManagedObject
486
486
  *
487
487
  * @author SAP SE
488
- * @version 1.109.0
488
+ * @version 1.111.0
489
489
  *
490
490
  * @constructor
491
491
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.ui.rta.command.BaseCommand
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.109.0
24
+ * @version 1.111.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.rta.command.BaseCommand
26
26
  * @author SAP SE
27
- * @version 1.109.0
27
+ * @version 1.111.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.52
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @class
21
21
  * @extends sap.ui.rta.command.BaseCommand
22
22
  * @author SAP SE
23
- * @version 1.109.0
23
+ * @version 1.111.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.86
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @class
29
29
  * @extends sap.ui.rta.command.BaseCommand
30
30
  * @author SAP SE
31
- * @version 1.109.0
31
+ * @version 1.111.0
32
32
  * @constructor
33
33
  * @private
34
34
  * @since 1.86
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.rta.command.BaseCommand
26
26
  * @author SAP SE
27
- * @version 1.109.0
27
+ * @version 1.111.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.50
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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,7 +22,7 @@ sap.ui.define([
22
22
  * @class
23
23
  * @extends sap.ui.rta.command.BaseCommand
24
24
  * @author SAP SE
25
- * @version 1.109.0
25
+ * @version 1.111.0
26
26
  * @constructor
27
27
  * @private
28
28
  * @since 1.50
@@ -91,19 +91,21 @@ sap.ui.define([
91
91
  * @returns {Promise} Returns resolve after undo
92
92
  */
93
93
  ControlVariantSwitch.prototype.undo = function() {
94
- var sOldVariantReference = this.getSourceVariantReference();
94
+ var sSourceVariantReference = this.getSourceVariantReference();
95
95
  var oAppComponent = this._getAppComponent();
96
96
 
97
- if (this.getDiscardVariantContent()) {
98
- return this.oModel.addAndApplyChangesOnVariant(this._aSourceVariantDirtyChanges)
99
- .then(function() {
100
- this._aSourceVariantDirtyChanges = null;
101
- this.oModel.checkUpdate(true);
102
- return this._updateModelVariant(sOldVariantReference, oAppComponent);
103
- }.bind(this));
104
- }
105
-
106
- return this._updateModelVariant(sOldVariantReference, oAppComponent);
97
+ return this._updateModelVariant(sSourceVariantReference, oAppComponent)
98
+ .then(function() {
99
+ // When discarding, dirty changes on source variant need to be applied AFTER the switch
100
+ if (this.getDiscardVariantContent()) {
101
+ return this.oModel.addAndApplyChangesOnVariant(this._aSourceVariantDirtyChanges)
102
+ .then(function() {
103
+ this._aSourceVariantDirtyChanges = null;
104
+ this.oModel.checkUpdate(true);
105
+ }.bind(this));
106
+ }
107
+ return undefined;
108
+ }.bind(this));
107
109
  };
108
110
 
109
111
  ControlVariantSwitch.prototype._updateModelVariant = function(sVariantReference, oAppComponent) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
12
12
  * @class
13
13
  * @extends sap.ui.rta.command.FlexCommand
14
14
  * @author SAP SE
15
- * @version 1.109.0
15
+ * @version 1.111.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.34
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
12
12
  * @class
13
13
  * @extends sap.ui.rta.command.FlexCommand
14
14
  * @author SAP SE
15
- * @version 1.109.0
15
+ * @version 1.111.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.62
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2023 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([
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.ui.rta.command.BaseCommand
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.109.0
36
+ * @version 1.111.0
37
37
  *
38
38
  * @constructor
39
39
  * @private