@openui5/sap.ui.rta 1.112.2 → 1.114.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 (153) 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 +111 -21
  6. package/src/sap/ui/rta/Utils.js +1 -1
  7. package/src/sap/ui/rta/appVariant/AppVariantManager.js +6 -5
  8. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  9. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  10. package/src/sap/ui/rta/command/AddXML.js +1 -1
  11. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  12. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  13. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  14. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  15. package/src/sap/ui/rta/command/Combine.js +1 -1
  16. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  17. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  18. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  19. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  20. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  21. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  23. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  24. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  25. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  26. package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
  27. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  28. package/src/sap/ui/rta/command/Move.js +1 -1
  29. package/src/sap/ui/rta/command/Property.js +1 -1
  30. package/src/sap/ui/rta/command/Remove.js +1 -1
  31. package/src/sap/ui/rta/command/Rename.js +1 -1
  32. package/src/sap/ui/rta/command/Resize.js +1 -1
  33. package/src/sap/ui/rta/command/Reveal.js +1 -1
  34. package/src/sap/ui/rta/command/Settings.js +1 -1
  35. package/src/sap/ui/rta/command/Split.js +1 -1
  36. package/src/sap/ui/rta/command/Stack.js +1 -1
  37. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  38. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  39. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  40. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  41. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  42. package/src/sap/ui/rta/enablement/elementActionTest.js +93 -76
  43. package/src/sap/ui/rta/library.js +2 -2
  44. package/src/sap/ui/rta/messagebundle.properties +40 -4
  45. package/src/sap/ui/rta/messagebundle_ar.properties +21 -6
  46. package/src/sap/ui/rta/messagebundle_bg.properties +21 -6
  47. package/src/sap/ui/rta/messagebundle_ca.properties +21 -6
  48. package/src/sap/ui/rta/messagebundle_cs.properties +21 -6
  49. package/src/sap/ui/rta/messagebundle_cy.properties +21 -6
  50. package/src/sap/ui/rta/messagebundle_da.properties +21 -6
  51. package/src/sap/ui/rta/messagebundle_de.properties +21 -6
  52. package/src/sap/ui/rta/messagebundle_el.properties +21 -6
  53. package/src/sap/ui/rta/messagebundle_en.properties +18 -3
  54. package/src/sap/ui/rta/messagebundle_en_GB.properties +18 -3
  55. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +15 -3
  56. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +13 -3
  57. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +18 -3
  58. package/src/sap/ui/rta/messagebundle_es.properties +21 -6
  59. package/src/sap/ui/rta/messagebundle_es_MX.properties +21 -6
  60. package/src/sap/ui/rta/messagebundle_et.properties +21 -6
  61. package/src/sap/ui/rta/messagebundle_fi.properties +21 -6
  62. package/src/sap/ui/rta/messagebundle_fr.properties +21 -6
  63. package/src/sap/ui/rta/messagebundle_fr_CA.properties +21 -6
  64. package/src/sap/ui/rta/messagebundle_hi.properties +21 -6
  65. package/src/sap/ui/rta/messagebundle_hr.properties +21 -6
  66. package/src/sap/ui/rta/messagebundle_hu.properties +21 -6
  67. package/src/sap/ui/rta/messagebundle_id.properties +21 -6
  68. package/src/sap/ui/rta/messagebundle_it.properties +21 -6
  69. package/src/sap/ui/rta/messagebundle_iw.properties +21 -6
  70. package/src/sap/ui/rta/messagebundle_ja.properties +21 -6
  71. package/src/sap/ui/rta/messagebundle_kk.properties +21 -6
  72. package/src/sap/ui/rta/messagebundle_ko.properties +21 -6
  73. package/src/sap/ui/rta/messagebundle_lt.properties +21 -6
  74. package/src/sap/ui/rta/messagebundle_lv.properties +21 -6
  75. package/src/sap/ui/rta/messagebundle_ms.properties +21 -6
  76. package/src/sap/ui/rta/messagebundle_nl.properties +21 -6
  77. package/src/sap/ui/rta/messagebundle_no.properties +21 -6
  78. package/src/sap/ui/rta/messagebundle_pl.properties +21 -6
  79. package/src/sap/ui/rta/messagebundle_pt.properties +21 -6
  80. package/src/sap/ui/rta/messagebundle_pt_PT.properties +21 -6
  81. package/src/sap/ui/rta/messagebundle_ro.properties +21 -6
  82. package/src/sap/ui/rta/messagebundle_ru.properties +21 -6
  83. package/src/sap/ui/rta/messagebundle_sh.properties +21 -6
  84. package/src/sap/ui/rta/messagebundle_sk.properties +21 -6
  85. package/src/sap/ui/rta/messagebundle_sl.properties +21 -6
  86. package/src/sap/ui/rta/messagebundle_sv.properties +21 -6
  87. package/src/sap/ui/rta/messagebundle_th.properties +21 -6
  88. package/src/sap/ui/rta/messagebundle_tr.properties +21 -6
  89. package/src/sap/ui/rta/messagebundle_uk.properties +21 -6
  90. package/src/sap/ui/rta/messagebundle_vi.properties +21 -6
  91. package/src/sap/ui/rta/messagebundle_zh_CN.properties +21 -6
  92. package/src/sap/ui/rta/messagebundle_zh_TW.properties +21 -6
  93. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  94. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  95. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  96. package/src/sap/ui/rta/plugin/ControlVariant.js +2 -2
  97. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  98. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  99. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  100. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  101. package/src/sap/ui/rta/plugin/EasyRemove.js +3 -3
  102. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  103. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  104. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  105. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  106. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  107. package/src/sap/ui/rta/plugin/RenameHandler.js +75 -66
  108. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  109. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  110. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  111. package/src/sap/ui/rta/plugin/Split.js +1 -1
  112. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  113. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +2 -22
  114. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  116. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  118. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  119. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +39 -21
  120. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +48 -19
  121. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +1 -16
  122. package/src/sap/ui/rta/service/Action.js +1 -1
  123. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  124. package/src/sap/ui/rta/service/Outline.js +4 -1
  125. package/src/sap/ui/rta/service/Property.js +1 -1
  126. package/src/sap/ui/rta/service/Selection.js +1 -1
  127. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  128. package/src/sap/ui/rta/toolbar/ActionsMenu.fragment.xml +0 -6
  129. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +59 -20
  130. package/src/sap/ui/rta/toolbar/Adaptation.js +95 -13
  131. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  132. package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +24 -0
  133. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  134. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  135. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  136. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  137. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  138. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +30 -32
  139. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +3 -15
  140. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +130 -49
  141. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +12 -10
  142. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  143. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  144. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  145. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  146. package/src/sap/ui/rta/util/ReloadManager.js +6 -3
  147. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  148. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -2
  149. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +1 -1
  150. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +15 -6
  151. package/src/sap/ui/rta/util/changeVisualization/ChangeStates.js +1 -1
  152. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +16 -9
  153. package/src/sap/ui/rta/util/validateStableIds.js +5 -2
package/THIRDPARTY.txt CHANGED
@@ -478,7 +478,7 @@ License: Apache-2.0
478
478
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
479
479
  Contained in: lib/jsdoc/ui5/plugin.js
480
480
 
481
- Component: SAP Theming Base Content, version: 11.1.48
481
+ Component: SAP Theming Base Content, version: 11.3.0
482
482
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
483
483
  License: Apache-2.0
484
484
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.rta",
3
- "version": "1.112.2",
3
+ "version": "1.114.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.rta",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,10 +14,10 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.112.2",
18
- "@openui5/sap.ui.core": "1.112.2",
19
- "@openui5/sap.ui.dt": "1.112.2",
20
- "@openui5/sap.ui.fl": "1.112.2",
21
- "@openui5/sap.ui.layout": "1.112.2"
17
+ "@openui5/sap.m": "1.114.0",
18
+ "@openui5/sap.ui.core": "1.114.0",
19
+ "@openui5/sap.ui.dt": "1.114.0",
20
+ "@openui5/sap.ui.fl": "1.114.0",
21
+ "@openui5/sap.ui.layout": "1.114.0"
22
22
  }
23
23
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.112.2</version>
9
+ <version>1.114.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with RTA controls.</documentation>
12
12
 
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @alias sap.ui.rta.Client
58
58
  * @author SAP SE
59
59
  * @since 1.56.0
60
- * @version 1.112.2
60
+ * @version 1.114.0
61
61
  * @private
62
62
  * @ui5-restricted
63
63
  */
@@ -15,6 +15,7 @@ sap.ui.define([
15
15
  "sap/ui/thirdparty/jquery",
16
16
  "sap/ui/base/ManagedObject",
17
17
  "sap/ui/core/BusyIndicator",
18
+ "sap/ui/core/Core",
18
19
  "sap/ui/dt/DesignTime",
19
20
  "sap/ui/dt/DOMUtil",
20
21
  "sap/ui/dt/ElementUtil",
@@ -22,6 +23,7 @@ sap.ui.define([
22
23
  "sap/ui/dt/OverlayRegistry",
23
24
  "sap/ui/dt/Util",
24
25
  "sap/ui/events/KeyCodes",
26
+ "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
25
27
  "sap/ui/fl/write/api/Version",
26
28
  "sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
27
29
  "sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
@@ -62,6 +64,7 @@ sap.ui.define([
62
64
  jQuery,
63
65
  ManagedObject,
64
66
  BusyIndicator,
67
+ Core,
65
68
  DesignTime,
66
69
  DOMUtil,
67
70
  ElementUtil,
@@ -69,6 +72,7 @@ sap.ui.define([
69
72
  OverlayRegistry,
70
73
  DtUtil,
71
74
  KeyCodes,
75
+ ManifestUtils,
72
76
  Version,
73
77
  ContextBasedAdaptationsAPI,
74
78
  ControlPersonalizationWriteAPI,
@@ -116,7 +120,7 @@ sap.ui.define([
116
120
  * @class The runtime authoring allows to adapt the fields of a running application.
117
121
  * @extends sap.ui.base.ManagedObject
118
122
  * @author SAP SE
119
- * @version 1.112.2
123
+ * @version 1.114.0
120
124
  * @constructor
121
125
  * @private
122
126
  * @since 1.30
@@ -451,6 +455,7 @@ sap.ui.define([
451
455
 
452
456
  return this._loadUShellServicesPromise
453
457
  .then(initVersioning.bind(this))
458
+ .then(initContextBasedAdaptations.bind(this))
454
459
  /*
455
460
  Check if the application has personalized changes and reload without them;
456
461
  Also Check if the application has an available draft and if yes, reload with those changes.
@@ -460,7 +465,8 @@ sap.ui.define([
460
465
  layer: this.getLayer(),
461
466
  selector: this.getRootControlInstance(),
462
467
  versioningEnabled: this._oVersionsModel.getProperty("/versioningEnabled"),
463
- developerMode: this.getFlexSettings().developerMode
468
+ developerMode: this.getFlexSettings().developerMode,
469
+ adaptationId: this._oContextBasedAdaptationsModel.getProperty("/displayedAdaptation/id")
464
470
  });
465
471
  }.bind(this))
466
472
  .then(function(bReloadTriggered) {
@@ -785,10 +791,11 @@ sap.ui.define([
785
791
  * @protected
786
792
  */
787
793
  RuntimeAuthoring.prototype.destroy = function() {
788
- jQuery.map(this._dependents, function(oDependent, sName) {
789
- this.removeDependent(sName);
794
+ var aDependentKeys = Object.keys(this._dependents);
795
+ aDependentKeys.forEach(function(sDependentKey) {
790
796
  // Destroy should be called with suppress invalidate = true here to prevent static UI Area invalidation
791
- oDependent.destroy(true);
797
+ this._dependents[sDependentKey].destroy(true);
798
+ this.removeDependent(sDependentKey);
792
799
  }.bind(this));
793
800
 
794
801
  Object.keys(this._mServices).forEach(function(sServiceName) {
@@ -1027,10 +1034,13 @@ sap.ui.define([
1027
1034
  var bIsSaveAsAvailable = aRtaFeaturesAvailability[1];
1028
1035
  var bIsContextBasedAdaptationAvailable = aRtaFeaturesAvailability[2];
1029
1036
  var bIsHomePage = aRtaFeaturesAvailability[3];
1037
+ var oManifest = FlexUtils.getAppDescriptor(oRootControl);
1038
+ //context based adaptation is not supported for overview pages
1039
+ var bIsContextBasedAdaptationSupported = oManifest && !ManifestUtils.getOvpEntry(oManifest);
1030
1040
  return {
1031
1041
  publishAvailable: bIsPublishAvailable,
1032
1042
  saveAsAvailable: !bIsHomePage && bIsPublishAvailable && bIsSaveAsAvailable,
1033
- contextBasedAdaptationAvailable: !bIsHomePage && bIsContextBasedAdaptationAvailable
1043
+ contextBasedAdaptationAvailable: !bIsHomePage && bIsContextBasedAdaptationSupported && bIsContextBasedAdaptationAvailable
1034
1044
  };
1035
1045
  });
1036
1046
  }
@@ -1284,44 +1294,108 @@ sap.ui.define([
1284
1294
  return this.stop(true, true);
1285
1295
  }
1286
1296
 
1287
- function onSwitchVersion(oEvent) {
1288
- var sVersion = oEvent.getParameter("version");
1289
- var sDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
1290
-
1291
- if (sVersion === sDisplayedVersion) {
1292
- // already displayed version needs no switch
1293
- return;
1297
+ function onDeleteAdaptation() {
1298
+ if (this.canSave()) {
1299
+ showDeleteAdaptationMessageBox.call(this, "DAC_DATA_LOSS_DIALOG_DESCRIPTION", "DAC_DIALOG_HEADER", true /*bDirtyChanges*/);
1300
+ } else {
1301
+ showDeleteAdaptationMessageBox.call(this, "DAC_DIALOG_DESCRIPTION", "DAC_DIALOG_HEADER");
1294
1302
  }
1303
+ }
1295
1304
 
1305
+ function showDeleteAdaptationMessageBox(sMessageKey, sTitleKey, bDirtyChanges) {
1306
+ Utils.showMessageBox("confirm", sMessageKey, {
1307
+ titleKey: sTitleKey
1308
+ }).then(function(sAction) {
1309
+ if (sAction === MessageBox.Action.OK) {
1310
+ BusyIndicator.show();
1311
+ if (bDirtyChanges) {
1312
+ // a reload is triggered later and will destroy RTA & the command stack
1313
+ this.getCommandStack().removeAllCommands(true);
1314
+ }
1315
+ deleteAdaptation.call(this);
1316
+ }
1317
+ }.bind(this));
1318
+ }
1319
+
1320
+ function deleteAdaptation() {
1321
+ ContextBasedAdaptationsAPI.remove({
1322
+ control: this.getRootControlInstance(),
1323
+ layer: this.getLayer(),
1324
+ adaptationId: this._oContextBasedAdaptationsModel.getProperty("/displayedAdaptation/id")
1325
+ }).then(function() {
1326
+ BusyIndicator.hide();
1327
+ var sAdaptationId = this._oContextBasedAdaptationsModel.deleteAdaptation();
1328
+ switchAdaptation.call(this, sAdaptationId);
1329
+ }.bind(this)).catch(function(oError) {
1330
+ BusyIndicator.hide();
1331
+ Log.error(oError.stack);
1332
+ var sMessage = "MSG_LREP_TRANSFER_ERROR";
1333
+ var oOptions = { titleKey: "DAC_DIALOG_HEADER" };
1334
+ oOptions.details = oError.userMessage;
1335
+ Utils.showMessageBox("error", sMessage, oOptions);
1336
+ });
1337
+ }
1338
+
1339
+ function handleDataLoss(sMessageKey, sTitleKey, callbackFn) {
1296
1340
  if (this.canSave()) {
1297
- this._sSwitchToVersion = sVersion;
1298
- Utils.showMessageBox("warning", "MSG_SWITCH_VERSION_DIALOG", {
1299
- titleKey: "TIT_SWITCH_VERSION_DIALOG",
1341
+ Utils.showMessageBox("warning", sMessageKey, {
1342
+ titleKey: sTitleKey,
1300
1343
  actions: [MessageBox.Action.YES, MessageBox.Action.NO, MessageBox.Action.CANCEL],
1301
1344
  emphasizedAction: MessageBox.Action.YES
1302
1345
  }).then(function(sAction) {
1303
1346
  if (sAction === MessageBox.Action.YES) {
1304
1347
  this._serializeToLrep()
1305
- .then(switchVersion.bind(this, this._sSwitchToVersion));
1348
+ .then(callbackFn);
1306
1349
  } else if (sAction === MessageBox.Action.NO) {
1307
1350
  // avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
1308
1351
  this.getCommandStack().removeAllCommands(true);
1309
- switchVersion.call(this, this._sSwitchToVersion);
1352
+ callbackFn();
1310
1353
  }
1311
1354
  return undefined;
1312
1355
  }.bind(this));
1313
1356
  return;
1314
1357
  }
1315
- switchVersion.call(this, sVersion);
1358
+ callbackFn();
1316
1359
  }
1317
1360
 
1318
- function switchVersion(sVersion) {
1361
+ function onSwitchAdaptation(oEvent) {
1362
+ if (oEvent.getParameter("trigger") === "SaveAs") {
1363
+ // remove all changes from command stack when triggered from saveAs dialog as they are already saved in a new adaptation
1364
+ this.getCommandStack().removeAllCommands(true);
1365
+ }
1366
+ var sAdaptationId = oEvent.getParameter("adaptationId");
1367
+ this._sSwitchToAdaptationId = sAdaptationId;
1368
+ return handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "BTN_SWITCH_ADAPTATIONS",
1369
+ switchAdaptation.bind(this, this._sSwitchToAdaptationId));
1370
+ }
1371
+
1372
+ function switchAdaptation(sAdaptationId) {
1373
+ var sVersion = this._oVersionsModel.getProperty("/displayedVersion");
1374
+ switchVersion.call(this, sVersion, sAdaptationId);
1375
+ }
1376
+
1377
+ function onSwitchVersion(oEvent) {
1378
+ var sVersion = oEvent.getParameter("version");
1379
+ var sDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
1380
+
1381
+ if (sVersion === sDisplayedVersion) {
1382
+ // already displayed version needs no switch
1383
+ return;
1384
+ }
1385
+
1386
+ this._sSwitchToVersion = sVersion;
1387
+ return handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "TIT_SWITCH_VERSION_DIALOG",
1388
+ switchVersion.bind(this, this._sSwitchToVersion));
1389
+ }
1390
+
1391
+ function switchVersion(sVersion, sAdaptationId) {
1319
1392
  RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
1320
1393
 
1321
1394
  VersionsAPI.loadVersionForApplication({
1322
1395
  control: this.getRootControlInstance(),
1323
1396
  layer: this.getLayer(),
1324
- version: sVersion
1397
+ version: sVersion,
1398
+ adaptationId: sAdaptationId
1325
1399
  });
1326
1400
  var oReloadInfo = {
1327
1401
  versionSwitch: true,
@@ -1374,6 +1448,15 @@ sap.ui.define([
1374
1448
  }.bind(this));
1375
1449
  }
1376
1450
 
1451
+ function initContextBasedAdaptations() {
1452
+ return ContextBasedAdaptationsAPI.initialize({
1453
+ control: this.getRootControlInstance(),
1454
+ layer: this.getLayer()
1455
+ }).then(function(oModel) {
1456
+ this._oContextBasedAdaptationsModel = oModel;
1457
+ }.bind(this));
1458
+ }
1459
+
1377
1460
  function createToolsMenu(mButtonsAvailability) {
1378
1461
  if (!this.getDependent("toolbar")) {
1379
1462
  var bUserLayer = this.getLayer() === Layer.USER;
@@ -1396,6 +1479,8 @@ sap.ui.define([
1396
1479
  oProperties.activate = onActivate.bind(this);
1397
1480
  oProperties.discardDraft = onDiscardDraft.bind(this);
1398
1481
  oProperties.switchVersion = onSwitchVersion.bind(this);
1482
+ oProperties.switchAdaptation = onSwitchAdaptation.bind(this);
1483
+ oProperties.deleteAdaptation = onDeleteAdaptation.bind(this);
1399
1484
  oProperties.openChangeCategorySelectionPopover = this.getChangeVisualization
1400
1485
  ? this.getChangeVisualization().openChangeCategorySelectionPopover.bind(this.getChangeVisualization())
1401
1486
  : function() {};
@@ -1423,6 +1508,7 @@ sap.ui.define([
1423
1508
  // the "Visualization" tab should not be visible if the "fiori-tools-rta-mode" URL-parameter is set to any value but "false"
1424
1509
  var bVisualizationButtonVisible;
1425
1510
  bVisualizationButtonVisible = !oUriParameters.has("fiori-tools-rta-mode") || oUriParameters.get("fiori-tools-rta-mode") === "false";
1511
+ var bFeedbackButtonVisible = Core.getConfiguration().getFlexibilityServices()[0].connector !== "LocalStorageConnector";
1426
1512
  this.bPersistedDataTranslatable = false;
1427
1513
 
1428
1514
  this._oToolbarControlsModel = new JSONModel({
@@ -1470,6 +1556,9 @@ sap.ui.define([
1470
1556
  visualizationButton: {
1471
1557
  visible: bVisualizationButtonVisible,
1472
1558
  enabled: bVisualizationButtonVisible
1559
+ },
1560
+ feedbackButton: {
1561
+ visible: bFeedbackButtonVisible
1473
1562
  }
1474
1563
  });
1475
1564
 
@@ -1502,6 +1591,7 @@ sap.ui.define([
1502
1591
  }.bind(this));
1503
1592
 
1504
1593
  this.getToolbar().setModel(this._oVersionsModel, "versions");
1594
+ this.getToolbar().setModel(this._oContextBasedAdaptationsModel, "contextBasedAdaptations");
1505
1595
  this.getToolbar().setModel(this._oToolbarControlsModel, "controls");
1506
1596
 
1507
1597
  return Promise.all([oTranslationPromise, oSaveAsPromise]);
@@ -45,7 +45,7 @@ function(
45
45
  *
46
46
  * @namespace
47
47
  * @author SAP SE
48
- * @version 1.112.2
48
+ * @version 1.114.0
49
49
  *
50
50
  * @private
51
51
  * @since 1.30
@@ -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.112.2
27
+ * @version 1.114.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.53
@@ -118,16 +118,17 @@ sap.ui.define([
118
118
  });
119
119
 
120
120
  aAllInlineChangeOperations.push(oInlineChangePromise);
121
-
122
- // create a inline change using a change type 'appdescr_app_removeAllInboundsExceptOne'
123
- oPropertyChange = AppVariantUtils.prepareRemoveAllInboundsExceptOneChange(sCurrentRunningInboundId);
124
- aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_removeAllInboundsExceptOne", vSelector));
125
121
  } else {
126
122
  // create a inline change using a change type 'appdescr_app_changeInbound'
127
123
  oPropertyChange = AppVariantUtils.prepareChangeInboundChange(sCurrentRunningInboundId, sAppVariantId, oAppVariantSpecificData);
128
124
  aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_changeInbound", vSelector));
129
125
  }
130
126
 
127
+ // remove all other inbounds except appVariant inbound
128
+ // create a inline change using a change type 'appdescr_app_removeAllInboundsExceptOne'
129
+ oPropertyChange = AppVariantUtils.prepareRemoveAllInboundsExceptOneChange(sCurrentRunningInboundId);
130
+ aAllInlineChangeOperations.push(AppVariantUtils.createInlineChange(oPropertyChange, "appdescr_app_removeAllInboundsExceptOne", vSelector));
131
+
131
132
  return Promise.all(aAllInlineChangeOperations);
132
133
  });
133
134
  };
@@ -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.112.2
19
+ * @version 1.114.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.75
@@ -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.112.2
17
+ * @version 1.114.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.78
@@ -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.112.2
19
+ * @version 1.114.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.54
@@ -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.112.2
27
+ * @version 1.114.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.76
@@ -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.112.2
24
+ * @version 1.114.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -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.112.2
16
+ * @version 1.114.0
17
17
  *
18
18
  * @constructor
19
19
  * @private
@@ -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.112.2
29
+ * @version 1.114.0
30
30
  * @constructor
31
31
  * @private
32
32
  * @since 1.38
@@ -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.112.2
19
+ * @version 1.114.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.46
@@ -485,7 +485,7 @@ sap.ui.define([
485
485
  * @extends sap.ui.base.ManagedObject
486
486
  *
487
487
  * @author SAP SE
488
- * @version 1.112.2
488
+ * @version 1.114.0
489
489
  *
490
490
  * @constructor
491
491
  * @private
@@ -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.112.2
24
+ * @version 1.114.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -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.112.2
27
+ * @version 1.114.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.52
@@ -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.112.2
23
+ * @version 1.114.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.86
@@ -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.112.2
31
+ * @version 1.114.0
32
32
  * @constructor
33
33
  * @private
34
34
  * @since 1.86
@@ -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.112.2
27
+ * @version 1.114.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.50
@@ -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.112.2
25
+ * @version 1.114.0
26
26
  * @constructor
27
27
  * @private
28
28
  * @since 1.50
@@ -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.112.2
15
+ * @version 1.114.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.34
@@ -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.112.2
15
+ * @version 1.114.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.62
@@ -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.112.2
36
+ * @version 1.114.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @class
28
28
  * @extends sap.ui.base.ManagedObject
29
29
  * @author SAP SE
30
- * @version 1.112.2
30
+ * @version 1.114.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.42
@@ -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.112.2
23
+ * @version 1.114.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.90
@@ -17,7 +17,7 @@ function(
17
17
  * @class
18
18
  * @extends sap.ui.rta.command.FlexCommand
19
19
  * @author SAP SE
20
- * @version 1.112.2
20
+ * @version 1.114.0
21
21
  * @constructor
22
22
  * @private
23
23
  * @since 1.34
@@ -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.112.2
19
+ * @version 1.114.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.34
@@ -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.112.2
15
+ * @version 1.114.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.42
@@ -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.112.2
15
+ * @version 1.114.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.34
@@ -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.112.2
19
+ * @version 1.114.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.101
@@ -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.112.2
15
+ * @version 1.114.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.44
@@ -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.112.2
15
+ * @version 1.114.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.44
@@ -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.112.2
17
+ * @version 1.114.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.46
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  * @class
60
60
  * @extends sap.ui.base.ManagedObject
61
61
  * @author SAP SE
62
- * @version 1.112.2
62
+ * @version 1.114.0
63
63
  * @constructor
64
64
  * @private
65
65
  * @since 1.34
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @extends sap.ui.rta.command.AppDescriptorCommand
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.112.2
20
+ * @version 1.114.0
21
21
  *
22
22
  * @constructor
23
23
  * @private