@openui5/sap.ui.rta 1.114.0 → 1.114.1

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 (96) hide show
  1. package/package.json +6 -6
  2. package/src/sap/ui/rta/.library +1 -1
  3. package/src/sap/ui/rta/Client.js +1 -1
  4. package/src/sap/ui/rta/RuntimeAuthoring.js +68 -42
  5. package/src/sap/ui/rta/Utils.js +35 -1
  6. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  7. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  8. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  9. package/src/sap/ui/rta/command/AddXML.js +1 -1
  10. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  11. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  12. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  13. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  14. package/src/sap/ui/rta/command/Combine.js +1 -1
  15. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  16. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  17. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  18. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  19. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -2
  20. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  21. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  22. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  23. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  24. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  25. package/src/sap/ui/rta/command/LREPSerializer.js +4 -2
  26. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  27. package/src/sap/ui/rta/command/Move.js +1 -1
  28. package/src/sap/ui/rta/command/Property.js +1 -1
  29. package/src/sap/ui/rta/command/Remove.js +1 -1
  30. package/src/sap/ui/rta/command/Rename.js +1 -1
  31. package/src/sap/ui/rta/command/Resize.js +1 -1
  32. package/src/sap/ui/rta/command/Reveal.js +1 -1
  33. package/src/sap/ui/rta/command/Settings.js +1 -1
  34. package/src/sap/ui/rta/command/Split.js +1 -1
  35. package/src/sap/ui/rta/command/Stack.js +1 -1
  36. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  37. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  38. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  39. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  40. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  41. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  42. package/src/sap/ui/rta/library.js +2 -2
  43. package/src/sap/ui/rta/messagebundle.properties +19 -1
  44. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  45. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  46. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  47. package/src/sap/ui/rta/plugin/CompVariant.js +6 -2
  48. package/src/sap/ui/rta/plugin/ControlVariant.js +4 -2
  49. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  50. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  51. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  52. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  53. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  54. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  55. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  56. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  57. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  58. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  59. package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
  60. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  61. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  62. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  63. package/src/sap/ui/rta/plugin/Split.js +1 -1
  64. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  65. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +10 -3
  66. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  67. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  68. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  69. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  70. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  71. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  72. package/src/sap/ui/rta/service/Action.js +1 -1
  73. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  74. package/src/sap/ui/rta/service/Outline.js +1 -1
  75. package/src/sap/ui/rta/service/Property.js +1 -1
  76. package/src/sap/ui/rta/service/Selection.js +1 -1
  77. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  78. package/src/sap/ui/rta/toolbar/Adaptation.js +78 -11
  79. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  80. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  81. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  82. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  83. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  84. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  85. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +61 -24
  86. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  87. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +4 -4
  88. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  89. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  90. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  91. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  92. package/src/sap/ui/rta/util/ReloadManager.js +30 -22
  93. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  94. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  95. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  96. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.rta",
3
- "version": "1.114.0",
3
+ "version": "1.114.1",
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.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"
17
+ "@openui5/sap.m": "1.114.1",
18
+ "@openui5/sap.ui.core": "1.114.1",
19
+ "@openui5/sap.ui.dt": "1.114.1",
20
+ "@openui5/sap.ui.fl": "1.114.1",
21
+ "@openui5/sap.ui.layout": "1.114.1"
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.114.0</version>
9
+ <version>1.114.1</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.114.0
60
+ * @version 1.114.1
61
61
  * @private
62
62
  * @ui5-restricted
63
63
  */
@@ -120,7 +120,7 @@ sap.ui.define([
120
120
  * @class The runtime authoring allows to adapt the fields of a running application.
121
121
  * @extends sap.ui.base.ManagedObject
122
122
  * @author SAP SE
123
- * @version 1.114.0
123
+ * @version 1.114.1
124
124
  * @constructor
125
125
  * @private
126
126
  * @since 1.30
@@ -441,6 +441,7 @@ sap.ui.define([
441
441
  * @public
442
442
  */
443
443
  RuntimeAuthoring.prototype.start = function() {
444
+ var bIsAutomaticRestart = RuntimeAuthoring.needsRestart(this.getLayer());
444
445
  var oDesignTimePromise;
445
446
  var vError;
446
447
  // Create DesignTime
@@ -454,8 +455,8 @@ sap.ui.define([
454
455
  }
455
456
 
456
457
  return this._loadUShellServicesPromise
457
- .then(initVersioning.bind(this))
458
- .then(initContextBasedAdaptations.bind(this))
458
+ .then(initVersioning.bind(this, bIsAutomaticRestart))
459
+ .then(initContextBasedAdaptations.bind(this, bIsAutomaticRestart))
459
460
  /*
460
461
  Check if the application has personalized changes and reload without them;
461
462
  Also Check if the application has an available draft and if yes, reload with those changes.
@@ -575,7 +576,7 @@ sap.ui.define([
575
576
  validateFlexEnabled(this);
576
577
  }
577
578
  this._sStatus = STARTED;
578
- RuntimeAuthoring.disableRestart(Layer.CUSTOMER);
579
+ RuntimeAuthoring.disableRestart(this.getLayer());
579
580
  this.fireStart({
580
581
  editablePluginsCount: this.getPluginManager().getEditableOverlaysCount()
581
582
  });
@@ -1063,33 +1064,30 @@ sap.ui.define([
1063
1064
  * @returns {Promise} Resolves as soon as the MessageBox is closed
1064
1065
  */
1065
1066
  function onStackModified() {
1066
- var bBackEndDraftExists = this._oVersionsModel.getProperty("/backendDraft");
1067
- var bDraftDisplayed = this._oVersionsModel.getProperty("/displayedVersion") === Version.Number.Draft;
1068
1067
  var oCommandStack = this.getCommandStack();
1069
1068
  var bCanUndo = oCommandStack.canUndo();
1070
1069
 
1070
+ // FIXME Missing check whether action is saveable e.g. switching a view should not trigger this
1071
+ // bCanUndo and _bUserDiscardedDraft seem to be redundant logic,
1072
+ // because displayedVersion would be draft already
1071
1073
  if (
1072
1074
  !this.getShowToolbars() ||
1073
1075
  !bCanUndo ||
1074
- this._bUserDiscardedDraft ||
1075
- bDraftDisplayed ||
1076
- !bBackEndDraftExists
1076
+ this._bUserDiscardedDraft
1077
1077
  ) {
1078
- return modifyStack.call(this);
1078
+ modifyStack.call(this);
1079
+ return;
1079
1080
  }
1080
1081
 
1081
1082
  // warn the user: the existing draft would be discarded in case the user saves
1082
- return Utils.showMessageBox("warning", "MSG_DRAFT_DISCARD_AND_CREATE_NEW_DIALOG", {
1083
- titleKey: "TIT_DRAFT_DISCARD_DIALOG",
1084
- actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],
1085
- emphasizedAction: MessageBox.Action.OK
1086
- })
1087
- .then(function(sAction) {
1088
- if (sAction === MessageBox.Action.OK) {
1089
- discardDraftConfirmed.call(this);
1090
- } else {
1091
- this.undo();
1083
+ Utils.checkDraftOverwrite(this._oVersionsModel)
1084
+ .then(function(bDialogShown) {
1085
+ if (bDialogShown) {
1086
+ this._bUserDiscardedDraft = true;
1092
1087
  }
1088
+ modifyStack.call(this);
1089
+ }.bind(this), function() {
1090
+ this.undo();
1093
1091
  }.bind(this));
1094
1092
  }
1095
1093
 
@@ -1211,6 +1209,10 @@ sap.ui.define([
1211
1209
  // Save changes on the current layer and discard dirty changes on other layers
1212
1210
  mPropertyBag.saveAsDraft = this.getLayer() === Layer.CUSTOMER;
1213
1211
  }
1212
+ if (this._oContextBasedAdaptationsModel.getProperty("/contextBasedAdaptationsEnabled")) {
1213
+ // If an adaptation is being processed, saving without exiting must retrieve the updated state of the adaptation
1214
+ mPropertyBag.adaptationId = bIsExit ? undefined : this._oContextBasedAdaptationsModel.getProperty("/displayedAdaptation/id");
1215
+ }
1214
1216
 
1215
1217
  return this._oSerializer.saveCommands(mPropertyBag)
1216
1218
  .then(function() {
@@ -1344,21 +1346,22 @@ sap.ui.define([
1344
1346
  emphasizedAction: MessageBox.Action.YES
1345
1347
  }).then(function(sAction) {
1346
1348
  if (sAction === MessageBox.Action.YES) {
1347
- this._serializeToLrep()
1349
+ return this._serializeToLrep()
1348
1350
  .then(callbackFn);
1349
1351
  } else if (sAction === MessageBox.Action.NO) {
1350
1352
  // avoids the data loss popup; a reload is triggered later and will destroy RTA & the command stack
1351
1353
  this.getCommandStack().removeAllCommands(true);
1352
- callbackFn();
1354
+ return callbackFn();
1353
1355
  }
1354
- return undefined;
1356
+ return Promise.resolve();
1355
1357
  }.bind(this));
1356
- return;
1358
+ return Promise.resolve();
1357
1359
  }
1358
- callbackFn();
1360
+ return callbackFn();
1359
1361
  }
1360
1362
 
1361
1363
  function onSwitchAdaptation(oEvent) {
1364
+ var fnCallback = oEvent.getParameter("callback") || function() {};
1362
1365
  if (oEvent.getParameter("trigger") === "SaveAs") {
1363
1366
  // remove all changes from command stack when triggered from saveAs dialog as they are already saved in a new adaptation
1364
1367
  this.getCommandStack().removeAllCommands(true);
@@ -1366,15 +1369,21 @@ sap.ui.define([
1366
1369
  var sAdaptationId = oEvent.getParameter("adaptationId");
1367
1370
  this._sSwitchToAdaptationId = sAdaptationId;
1368
1371
  return handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "BTN_SWITCH_ADAPTATIONS",
1369
- switchAdaptation.bind(this, this._sSwitchToAdaptationId));
1372
+ switchAdaptation.bind(this, this._sSwitchToAdaptationId))
1373
+ .then(fnCallback)
1374
+ .catch(function(oError) {
1375
+ Utils.showMessageBox("error", "MSG_SWITCH_ADAPTATION_FAILED", {error: oError});
1376
+ Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
1377
+ });
1370
1378
  }
1371
1379
 
1372
1380
  function switchAdaptation(sAdaptationId) {
1373
1381
  var sVersion = this._oVersionsModel.getProperty("/displayedVersion");
1374
- switchVersion.call(this, sVersion, sAdaptationId);
1382
+ return switchVersion.call(this, sVersion, sAdaptationId);
1375
1383
  }
1376
1384
 
1377
1385
  function onSwitchVersion(oEvent) {
1386
+ var fnCallback = oEvent.getParameter("callback") || function() {};
1378
1387
  var sVersion = oEvent.getParameter("version");
1379
1388
  var sDisplayedVersion = this._oVersionsModel.getProperty("/displayedVersion");
1380
1389
 
@@ -1384,24 +1393,30 @@ sap.ui.define([
1384
1393
  }
1385
1394
 
1386
1395
  this._sSwitchToVersion = sVersion;
1387
- return handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "TIT_SWITCH_VERSION_DIALOG",
1388
- switchVersion.bind(this, this._sSwitchToVersion));
1396
+ handleDataLoss.call(this, "MSG_SWITCH_VERSION_DIALOG", "TIT_SWITCH_VERSION_DIALOG",
1397
+ switchVersion.bind(this, this._sSwitchToVersion))
1398
+ .then(fnCallback)
1399
+ .catch(function(oError) {
1400
+ Utils.showMessageBox("error", "MSG_SWITCH_VERSION_FAILED", {error: oError});
1401
+ Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
1402
+ });
1389
1403
  }
1390
1404
 
1391
1405
  function switchVersion(sVersion, sAdaptationId) {
1392
1406
  RuntimeAuthoring.enableRestart(this.getLayer(), this.getRootControlInstance());
1393
1407
 
1394
- VersionsAPI.loadVersionForApplication({
1408
+ return VersionsAPI.loadVersionForApplication({
1395
1409
  control: this.getRootControlInstance(),
1396
1410
  layer: this.getLayer(),
1397
1411
  version: sVersion,
1398
1412
  adaptationId: sAdaptationId
1413
+ }).then(function() {
1414
+ var oReloadInfo = {
1415
+ versionSwitch: true,
1416
+ version: sVersion
1417
+ };
1418
+ ReloadManager.triggerReload(oReloadInfo);
1399
1419
  });
1400
- var oReloadInfo = {
1401
- versionSwitch: true,
1402
- version: sVersion
1403
- };
1404
- ReloadManager.triggerReload(oReloadInfo);
1405
1420
  }
1406
1421
 
1407
1422
  function onPublishVersion() {
@@ -1420,11 +1435,6 @@ sap.ui.define([
1420
1435
  });
1421
1436
  }
1422
1437
 
1423
- function discardDraftConfirmed() {
1424
- this._bUserDiscardedDraft = true;
1425
- modifyStack.call(this);
1426
- }
1427
-
1428
1438
  function isOldVersionDisplayed() {
1429
1439
  return VersionsAPI.isOldVersionDisplayed({
1430
1440
  control: this.getRootControlInstance(),
@@ -1439,7 +1449,15 @@ sap.ui.define([
1439
1449
  });
1440
1450
  }
1441
1451
 
1442
- function initVersioning() {
1452
+ /**
1453
+ * Inits version models. Clears old state if RTA is starting from end user mode (no switch)
1454
+ * @param {boolean} bIsAutomaticRestart - If true this is not an RTA start but a reload due to version/adaptation switch
1455
+ * @returns {Promise<void>} - Promise
1456
+ */
1457
+ function initVersioning(bIsAutomaticRestart) {
1458
+ if (!bIsAutomaticRestart) {
1459
+ VersionsAPI.clearInstances();
1460
+ }
1443
1461
  return VersionsAPI.initialize({
1444
1462
  control: this.getRootControlInstance(),
1445
1463
  layer: this.getLayer()
@@ -1448,7 +1466,15 @@ sap.ui.define([
1448
1466
  }.bind(this));
1449
1467
  }
1450
1468
 
1451
- function initContextBasedAdaptations() {
1469
+ /**
1470
+ * Inits CBA models. Clears old state if RTA is starting from end user mode (no switch)
1471
+ * @param {boolean} bIsAutomaticRestart - If true this is not an RTA start but a reload due to version/adaptation switch
1472
+ * @returns {Promise<void>} - Promise
1473
+ */
1474
+ function initContextBasedAdaptations(bIsAutomaticRestart) {
1475
+ if (!bIsAutomaticRestart) {
1476
+ ContextBasedAdaptationsAPI.clearInstances();
1477
+ }
1452
1478
  return ContextBasedAdaptationsAPI.initialize({
1453
1479
  control: this.getRootControlInstance(),
1454
1480
  layer: this.getLayer()
@@ -9,6 +9,7 @@ sap.ui.define([
9
9
  "sap/ui/fl/Utils",
10
10
  "sap/ui/fl/Layer",
11
11
  "sap/ui/fl/LayerUtils",
12
+ "sap/ui/fl/write/api/Version",
12
13
  "sap/ui/dt/OverlayUtil",
13
14
  "sap/ui/dt/DOMUtil",
14
15
  "sap/ui/dt/ElementUtil",
@@ -26,6 +27,7 @@ function(
26
27
  FlexUtils,
27
28
  Layer,
28
29
  FlexLayerUtils,
30
+ Version,
29
31
  OverlayUtil,
30
32
  DOMUtil,
31
33
  ElementUtil,
@@ -45,7 +47,7 @@ function(
45
47
  *
46
48
  * @namespace
47
49
  * @author SAP SE
48
- * @version 1.114.0
50
+ * @version 1.114.1
49
51
  *
50
52
  * @private
51
53
  * @since 1.30
@@ -644,5 +646,37 @@ function(
644
646
  });
645
647
  };
646
648
 
649
+ /**
650
+ * Check if an existing draft would be overwritten if a change is done on the currently shown version
651
+ * If so it opens a confirmation dialog.
652
+ * @param {object} oVersionsModel The versions model
653
+ * @return {Promise.<boolean>} It either resolves with an indicator whether a confirmation
654
+ * was shown or rejects with "cancel" if cancel was pressed
655
+ */
656
+ Utils.checkDraftOverwrite = function(oVersionsModel) {
657
+ var bBackEndDraftExists = oVersionsModel.getProperty("/backendDraft");
658
+ var bDraftDisplayed = oVersionsModel.getProperty("/displayedVersion") === Version.Number.Draft;
659
+
660
+ if (
661
+ bDraftDisplayed ||
662
+ !bBackEndDraftExists
663
+ ) {
664
+ return Promise.resolve(false);
665
+ }
666
+
667
+ // warn the user: the existing draft would be discarded in case the user saves
668
+ return Utils.showMessageBox("warning", "MSG_DRAFT_DISCARD_AND_CREATE_NEW_DIALOG", {
669
+ titleKey: "TIT_DRAFT_DISCARD_DIALOG",
670
+ actions: [MessageBox.Action.OK, MessageBox.Action.CANCEL],
671
+ emphasizedAction: MessageBox.Action.OK
672
+ })
673
+ .then(function(sAction) {
674
+ if (sAction !== MessageBox.Action.OK) {
675
+ throw "cancel";
676
+ }
677
+ return true;
678
+ });
679
+ };
680
+
647
681
  return Utils;
648
682
  }, /* bExport= */true);
@@ -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.114.0
27
+ * @version 1.114.1
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.53
@@ -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.114.0
19
+ * @version 1.114.1
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.114.0
17
+ * @version 1.114.1
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.114.0
19
+ * @version 1.114.1
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.114.0
27
+ * @version 1.114.1
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.114.0
24
+ * @version 1.114.1
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.114.0
16
+ * @version 1.114.1
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.114.0
29
+ * @version 1.114.1
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.114.0
19
+ * @version 1.114.1
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.114.0
488
+ * @version 1.114.1
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.114.0
24
+ * @version 1.114.1
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.114.0
27
+ * @version 1.114.1
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.114.0
23
+ * @version 1.114.1
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.114.0
31
+ * @version 1.114.1
32
32
  * @constructor
33
33
  * @private
34
34
  * @since 1.86
@@ -66,6 +66,8 @@ sap.ui.define([
66
66
  this.oModel = this.getModel();
67
67
  this.setSourceDefaultVariant(this.oModel.getData()[this.sVariantManagementReference].defaultVariant);
68
68
  this.sLayer = mFlexSettings.layer;
69
+ var mComponentPropertyBag = mFlexSettings;
70
+ mComponentPropertyBag.variantManagementControl = this.oVariantManagementControl;
69
71
 
70
72
  function storeEventParameters(oEvent, oArgs) {
71
73
  var mParameters = oEvent.getParameters();
@@ -84,7 +86,7 @@ sap.ui.define([
84
86
  this.oVariantManagementControl.attachSave({resolve: resolve}, storeEventParameters, this);
85
87
  this.oVariantManagementControl.attachCancel({resolve: resolve}, handleCancel, this);
86
88
  this.oVariantManagementControl.openSaveAsDialogForKeyUser(rtaUtils.getRtaStyleClassName(),
87
- ContextSharingAPI.createComponent(mFlexSettings));
89
+ ContextSharingAPI.createComponent(mComponentPropertyBag));
88
90
  }.bind(this))
89
91
  .then(function(bState) {
90
92
  return bState;
@@ -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.114.0
27
+ * @version 1.114.1
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.114.0
25
+ * @version 1.114.1
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.114.0
15
+ * @version 1.114.1
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.114.0
15
+ * @version 1.114.1
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.114.0
36
+ * @version 1.114.1
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.114.0
30
+ * @version 1.114.1
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.42
@@ -152,7 +152,8 @@ sap.ui.define([
152
152
  * @param {boolean} mPropertyBag.saveAsDraft - save the changes as a draft
153
153
  * @param {string} [mPropertyBag.layer] - Layer for which the changes should be saved
154
154
  * @param {boolean} [mPropertyBag.removeOtherLayerChanges=false] - Whether to remove changes on other layers before saving
155
- * @param {string} [mPropertyBag.version] - Layer for which the changes should be saved
155
+ * @param {string} [mPropertyBag.version] - Version to load into Flex State after saving (e.g. undefined when exiting RTA)
156
+ * @param {string} [mPropertyBag.adaptationId] - Adaptation to load into Flex State after saving (e.g. undefined when exiting RTA)
156
157
  * @returns {Promise} return empty promise
157
158
  * @public
158
159
  */
@@ -172,6 +173,7 @@ sap.ui.define([
172
173
  layer: mPropertyBag.layer,
173
174
  removeOtherLayerChanges: !!mPropertyBag.removeOtherLayerChanges,
174
175
  version: mPropertyBag.version,
176
+ adaptationId: mPropertyBag.adaptationId,
175
177
  condenseAnyLayer: mPropertyBag.condenseAnyLayer
176
178
  });
177
179
  }.bind(this))
@@ -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.114.0
23
+ * @version 1.114.1
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.114.0
20
+ * @version 1.114.1
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.114.0
19
+ * @version 1.114.1
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.114.0
15
+ * @version 1.114.1
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.114.0
15
+ * @version 1.114.1
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.114.0
19
+ * @version 1.114.1
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.114.0
15
+ * @version 1.114.1
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.114.0
15
+ * @version 1.114.1
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.114.0
17
+ * @version 1.114.1
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.46