@openui5/sap.ui.rta 1.114.0 → 1.115.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 (146) hide show
  1. package/.reuse/dep5 +0 -5
  2. package/THIRDPARTY.txt +0 -6
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +1 -1
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +67 -43
  7. package/src/sap/ui/rta/Utils.js +36 -2
  8. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  9. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  10. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  11. package/src/sap/ui/rta/command/AddXML.js +1 -1
  12. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  13. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  14. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  15. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  16. package/src/sap/ui/rta/command/Combine.js +1 -1
  17. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  18. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  19. package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -8
  20. package/src/sap/ui/rta/command/ControlVariantSave.js +5 -6
  21. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +7 -10
  22. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -5
  23. package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -12
  24. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  25. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  26. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  27. package/src/sap/ui/rta/command/LREPSerializer.js +4 -2
  28. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  29. package/src/sap/ui/rta/command/Move.js +1 -1
  30. package/src/sap/ui/rta/command/Property.js +1 -1
  31. package/src/sap/ui/rta/command/Remove.js +1 -1
  32. package/src/sap/ui/rta/command/Rename.js +1 -1
  33. package/src/sap/ui/rta/command/Resize.js +1 -1
  34. package/src/sap/ui/rta/command/Reveal.js +1 -1
  35. package/src/sap/ui/rta/command/Settings.js +1 -1
  36. package/src/sap/ui/rta/command/Split.js +1 -1
  37. package/src/sap/ui/rta/command/Stack.js +1 -1
  38. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  39. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  40. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  41. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  42. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  43. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  44. package/src/sap/ui/rta/library.js +2 -2
  45. package/src/sap/ui/rta/messagebundle.properties +8 -0
  46. package/src/sap/ui/rta/messagebundle_ar.properties +7 -3
  47. package/src/sap/ui/rta/messagebundle_bg.properties +7 -3
  48. package/src/sap/ui/rta/messagebundle_ca.properties +7 -3
  49. package/src/sap/ui/rta/messagebundle_cs.properties +7 -3
  50. package/src/sap/ui/rta/messagebundle_cy.properties +7 -3
  51. package/src/sap/ui/rta/messagebundle_da.properties +6 -2
  52. package/src/sap/ui/rta/messagebundle_de.properties +6 -2
  53. package/src/sap/ui/rta/messagebundle_el.properties +7 -3
  54. package/src/sap/ui/rta/messagebundle_en.properties +4 -0
  55. package/src/sap/ui/rta/messagebundle_en_GB.properties +4 -0
  56. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +7 -0
  57. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -0
  58. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +4 -0
  59. package/src/sap/ui/rta/messagebundle_es.properties +6 -2
  60. package/src/sap/ui/rta/messagebundle_es_MX.properties +7 -3
  61. package/src/sap/ui/rta/messagebundle_et.properties +7 -3
  62. package/src/sap/ui/rta/messagebundle_fi.properties +7 -3
  63. package/src/sap/ui/rta/messagebundle_fr.properties +6 -2
  64. package/src/sap/ui/rta/messagebundle_fr_CA.properties +7 -3
  65. package/src/sap/ui/rta/messagebundle_hi.properties +7 -3
  66. package/src/sap/ui/rta/messagebundle_hr.properties +7 -3
  67. package/src/sap/ui/rta/messagebundle_hu.properties +7 -3
  68. package/src/sap/ui/rta/messagebundle_id.properties +7 -3
  69. package/src/sap/ui/rta/messagebundle_it.properties +6 -2
  70. package/src/sap/ui/rta/messagebundle_iw.properties +7 -3
  71. package/src/sap/ui/rta/messagebundle_ja.properties +20 -16
  72. package/src/sap/ui/rta/messagebundle_kk.properties +7 -3
  73. package/src/sap/ui/rta/messagebundle_ko.properties +7 -3
  74. package/src/sap/ui/rta/messagebundle_lt.properties +7 -3
  75. package/src/sap/ui/rta/messagebundle_lv.properties +7 -3
  76. package/src/sap/ui/rta/messagebundle_ms.properties +7 -3
  77. package/src/sap/ui/rta/messagebundle_nl.properties +6 -2
  78. package/src/sap/ui/rta/messagebundle_no.properties +7 -3
  79. package/src/sap/ui/rta/messagebundle_pl.properties +7 -3
  80. package/src/sap/ui/rta/messagebundle_pt.properties +6 -2
  81. package/src/sap/ui/rta/messagebundle_pt_PT.properties +6 -2
  82. package/src/sap/ui/rta/messagebundle_ro.properties +6 -2
  83. package/src/sap/ui/rta/messagebundle_ru.properties +7 -3
  84. package/src/sap/ui/rta/messagebundle_sh.properties +7 -3
  85. package/src/sap/ui/rta/messagebundle_sk.properties +7 -3
  86. package/src/sap/ui/rta/messagebundle_sl.properties +7 -3
  87. package/src/sap/ui/rta/messagebundle_sv.properties +6 -2
  88. package/src/sap/ui/rta/messagebundle_th.properties +8 -4
  89. package/src/sap/ui/rta/messagebundle_tr.properties +7 -3
  90. package/src/sap/ui/rta/messagebundle_uk.properties +7 -3
  91. package/src/sap/ui/rta/messagebundle_vi.properties +7 -3
  92. package/src/sap/ui/rta/messagebundle_zh_CN.properties +7 -3
  93. package/src/sap/ui/rta/messagebundle_zh_TW.properties +7 -3
  94. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  95. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  96. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  97. package/src/sap/ui/rta/plugin/CompVariant.js +6 -2
  98. package/src/sap/ui/rta/plugin/ControlVariant.js +4 -2
  99. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  100. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  101. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  102. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  103. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  104. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  105. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  106. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  107. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  108. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  109. package/src/sap/ui/rta/plugin/RenameHandler.js +1 -1
  110. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  111. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  112. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  113. package/src/sap/ui/rta/plugin/Split.js +1 -1
  114. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  116. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  118. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  120. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  121. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  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 +1 -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 +11 -1
  128. package/src/sap/ui/rta/toolbar/Adaptation.js +23 -4
  129. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  130. package/src/sap/ui/rta/toolbar/Fiori.js +2 -2
  131. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  132. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  133. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  134. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  135. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +52 -22
  136. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +3 -2
  137. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  138. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
  139. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  140. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  141. package/src/sap/ui/rta/util/ReloadManager.js +30 -22
  142. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  143. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +42 -24
  144. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +5 -7
  145. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +52 -1
  146. package/src/sap/ui/rta/view/RemoveElementDialog.fragment.xml +1 -1
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @author SAP SE
45
45
  * @experimental Since 1.56
46
46
  * @since 1.56
47
- * @version 1.114.0
47
+ * @version 1.115.1
48
48
  * @private
49
49
  * @ui5-restricted
50
50
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @author SAP SE
29
29
  * @experimental Since 1.58
30
30
  * @since 1.58
31
- * @version 1.114.0
31
+ * @version 1.115.1
32
32
  * @private
33
33
  * @ui5-restricted
34
34
  */
@@ -15,7 +15,7 @@ sap.ui.define(function () {
15
15
  * @author SAP SE
16
16
  * @experimental Since 1.58
17
17
  * @since 1.58
18
- * @version 1.114.0
18
+ * @version 1.115.1
19
19
  * @private
20
20
  * @ui5-restricted
21
21
  */
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @author SAP SE
28
28
  * @experimental Since 1.106
29
29
  * @since 1.106
30
- * @version 1.114.0
30
+ * @version 1.115.1
31
31
  * @private
32
32
  * @ui5-restricted
33
33
  */
@@ -122,6 +122,11 @@ sap.ui.define([
122
122
  .then(console.log); // eslint-disable-line no-console
123
123
  }
124
124
 
125
+ function printDesignTimeMetadata(oRta, mPayload) {
126
+ var oOverlay = Core.byId(mPayload.overlayId);
127
+ console.log(oOverlay.getDesignTimeMetadata().getData()); // eslint-disable-line no-console
128
+ }
129
+
125
130
  // List of supported handlers
126
131
  var mHandlers = {
127
132
  getOverlayInfo: {
@@ -132,6 +137,10 @@ sap.ui.define([
132
137
  printChangeHandler: {
133
138
  handler: printChangeHandler,
134
139
  id: "ui5FlexibilitySupport.submodules.overlayInfo"
140
+ },
141
+ printDesignTimeMetadata: {
142
+ handler: printDesignTimeMetadata,
143
+ id: "ui5FlexibilitySupport.submodules.overlayInfo"
135
144
  }
136
145
  };
137
146
 
@@ -143,6 +152,7 @@ sap.ui.define([
143
152
  * - type: specifies, what action should be taken. Possible values:
144
153
  * - getOverlayInfo (request information about an overlay)
145
154
  * - printChangeHandler (a specified change handler object is to be printed to the console)
155
+ * - printDesignTimeMetadata (the calculated designtime metadata of the overlay is to be printed to the console)
146
156
  * - content: type-specific information, e.g. for getOverlayInfo, an 'overlayId' is provided
147
157
  *
148
158
  * @method sap.ui.rta.service.SupportTools.onMessageReceived
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @extends sap.ui.rta.toolbar.Base
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.114.0
56
+ * @version 1.115.1
57
57
  *
58
58
  * @constructor
59
59
  * @private
@@ -352,15 +352,34 @@ sap.ui.define([
352
352
  }
353
353
 
354
354
  function onSaveAsAdaptation() {
355
- this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(this.getRtaInformation().flexSettings.layer);
355
+ Utils.checkDraftOverwrite(this.getModel("versions"))
356
+ .then(function() {
357
+ this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(this.getRtaInformation().flexSettings.layer);
358
+ }.bind(this))
359
+ .catch(handleError);
356
360
  }
357
361
 
358
362
  function onEditAdaptation() {
359
- this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(this.getRtaInformation().flexSettings.layer, true /*bIsEditMode*/);
363
+ Utils.checkDraftOverwrite(this.getModel("versions"))
364
+ .then(function() {
365
+ this.getExtension("contextBasedSaveAs", SaveAsAdaptation).openAddAdaptationDialog(this.getRtaInformation().flexSettings.layer, true /*bIsEditMode*/);
366
+ }.bind(this))
367
+ .catch(handleError);
368
+ }
369
+
370
+ function handleError(oError) {
371
+ if (oError !== "cancel") {
372
+ Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", {error: oError});
373
+ Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
374
+ }
360
375
  }
361
376
 
362
377
  function onDeleteAdaptation() {
363
- this.fireEvent("deleteAdaptation");
378
+ Utils.checkDraftOverwrite(this.getModel("versions"))
379
+ .then(function() {
380
+ this.fireEvent("deleteAdaptation");
381
+ }.bind(this))
382
+ .catch(handleError);
364
383
  }
365
384
 
366
385
  function onManageAdaptations() {
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @extends sap.m.HBox
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.114.0
30
+ * @version 1.115.1
31
31
  *
32
32
  * @constructor
33
33
  * @private
@@ -32,7 +32,7 @@ function(
32
32
  * @extends sap.ui.rta.toolbar.Adaptation
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.114.0
35
+ * @version 1.115.1
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -50,7 +50,7 @@ function(
50
50
 
51
51
  Fiori.prototype.init = function () {
52
52
  this._oRenderer = Utils.getFiori2Renderer();
53
- this._oFioriHeader = this._oRenderer.getRootControl().getOUnifiedShell().getHeader();
53
+ this._oFioriHeader = this._oRenderer.getRootControl().getShellHeader();
54
54
  Adaptation.prototype.init.apply(this, arguments);
55
55
  };
56
56
 
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.114.0
23
+ * @version 1.115.1
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.m.OverflowToolbarButton
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.114.0
26
+ * @version 1.115.1
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -22,7 +22,7 @@ function(
22
22
  * @extends sap.ui.rta.toolbar.Base
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.114.0
25
+ * @version 1.115.1
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.114.0
23
+ * @version 1.115.1
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -77,6 +77,8 @@ function(
77
77
  moveDown: moveDown.bind(this),
78
78
  onDropSelectedAdaptation: onDropSelectedAdaptation.bind(this),
79
79
  onSaveReorderedAdaptations: onSaveReorderedAdaptations.bind(this),
80
+ isAdaptationsSelected: isAdaptationsSelected.bind(this),
81
+ getIndexOfSelectedAdaptation: getIndexOfSelectedAdaptation.bind(this),
80
82
  onClose: onCloseDialog.bind(this)
81
83
  }
82
84
  }).then(function(oDialog) {
@@ -85,7 +87,7 @@ function(
85
87
  this.getToolbar().addDependent(this._oManageAdaptationDialog);
86
88
  }.bind(this));
87
89
  } else {
88
- setEnabledPropertyOfMoveButton.call(this, false);
90
+ syncEnabledPropertyOfMoveButtons.call(this);
89
91
  enableDragAndDropForAdaptationTable.call(this, true);
90
92
  enableSaveButton.call(this, false);
91
93
  }
@@ -127,26 +129,36 @@ function(
127
129
  var oOptions = {
128
130
  year: "numeric",
129
131
  month: "short",
130
- day: "numeric"
132
+ day: "numeric",
133
+ hour: "numeric",
134
+ minute: "numeric"
131
135
  };
132
136
  var sLanguage = sap.ui.getCore().getConfiguration().getLanguage();
133
- return sModifiedBy + "\n" + oUi5Date.toLocaleDateString(sLanguage, oOptions);
137
+ return sModifiedBy + "\n" + oUi5Date.toLocaleTimeString(sLanguage, oOptions);
134
138
  }
135
139
 
136
140
  function onSelectionChange(oEvent) {
137
141
  if (oEvent.getParameter("selected") === true) {
138
142
  this._oControlConfigurationModel.setProperty("/isTableItemSelected", true);
139
- if (isSearchFieldValueEmpty.call(this)) {
140
- setEnabledPropertyOfMoveButton.call(this, true);
141
- }
143
+ syncEnabledPropertyOfMoveButtons.call(this);
142
144
  }
143
145
  }
144
146
 
145
- function setEnabledPropertyOfMoveButton(bIsEnabled) {
147
+ function syncEnabledPropertyOfMoveButtons() {
146
148
  var oUpButton = getControlInDialog.call(this, "moveUpButton");
147
149
  var oDownButton = getControlInDialog.call(this, "moveDownButton");
148
- oUpButton.setEnabled(bIsEnabled);
149
- oDownButton.setEnabled(bIsEnabled);
150
+ if (isSearchFieldValueEmpty.call(this)) {
151
+ if (isAdaptationsSelected.call(this)) {
152
+ oUpButton.setEnabled(getIndexOfSelectedAdaptation.call(this) > 0);
153
+ oDownButton.setEnabled(getIndexOfSelectedAdaptation.call(this) < this.oAdaptationsModel.getProperty("/count") - 1);
154
+ } else {
155
+ oUpButton.setEnabled(false);
156
+ oDownButton.setEnabled(false);
157
+ }
158
+ } else {
159
+ oUpButton.setEnabled(false);
160
+ oDownButton.setEnabled(false);
161
+ }
150
162
  }
151
163
 
152
164
  // ------ search field ------
@@ -157,7 +169,7 @@ function(
157
169
  var oDefaultApplicationTable = getDefaultApplicationTable.call(this);
158
170
  var sDefaultTableText = getDefaultApplicationTitle.call(this);
159
171
  if (sQuery && sQuery.length > 0) {
160
- setEnabledPropertyOfMoveButton.call(this, false);
172
+ syncEnabledPropertyOfMoveButtons.call(this);
161
173
  enableDragAndDropForAdaptationTable.call(this, false);
162
174
  //filter Table context
163
175
  var oFilterByTitle = new Filter("title", FilterOperator.Contains, sQuery);
@@ -181,7 +193,7 @@ function(
181
193
  } else {
182
194
  enableDragAndDropForAdaptationTable.call(this, true);
183
195
  if (this._oControlConfigurationModel.getProperty("/isTableItemSelected")) {
184
- setEnabledPropertyOfMoveButton.call(this, true);
196
+ syncEnabledPropertyOfMoveButtons.call(this);
185
197
  }
186
198
  oDefaultApplicationTable.setVisible(true);
187
199
  }
@@ -235,6 +247,7 @@ function(
235
247
  // after move select the sibling
236
248
  oTable.getItems()[iSiblingItemIndex].setSelected(true).focus();
237
249
  enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
250
+ syncEnabledPropertyOfMoveButtons.call(this);
238
251
  }
239
252
 
240
253
  function onDropSelectedAdaptation(oEvent) {
@@ -318,20 +331,37 @@ function(
318
331
  getAdaptationsTable.call(this).getDragDropConfig()[0].setEnabled(bIsEnabled);
319
332
  }
320
333
 
334
+ function isAdaptationsSelected() {
335
+ var oAdaptationsTable = getAdaptationsTable.call(this);
336
+ return oAdaptationsTable.getSelectedContextPaths().length > 0;
337
+ }
338
+
339
+ function getIndexOfSelectedAdaptation() {
340
+ var oAdaptationsTable = getAdaptationsTable.call(this);
341
+ if (oAdaptationsTable.getSelectedContextPaths().length > 0) {
342
+ var aSplitedPath = oAdaptationsTable.getSelectedContextPaths()[0].split("/");
343
+ var iIndexOfSelectedItem = Number(aSplitedPath[aSplitedPath.length - 1]);
344
+ return iIndexOfSelectedItem;
345
+ }
346
+ return -1;
347
+ }
348
+
321
349
  function onSaveReorderedAdaptations() {
322
- var oRtaInformation = this.getToolbar().getRtaInformation();
323
- var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; });
324
- ContextBasedAdaptationsAPI.reorder({control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer, parameters: {priorities: aAdaptationPriorities}})
350
+ Utils.checkDraftOverwrite(this.getModel("versions")).then(function() {
351
+ var oRtaInformation = this.getToolbar().getRtaInformation();
352
+ var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; });
353
+ return ContextBasedAdaptationsAPI.reorder({control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer, parameters: {priorities: aAdaptationPriorities}});
354
+ }.bind(this)).then(function() {
355
+ var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
356
+ this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
357
+ onCloseDialog.call(this);
358
+ }.bind(this))
325
359
  .catch(function(oError) {
326
- Log.error(oError.stack);
327
- var sMessage = "MSG_LREP_TRANSFER_ERROR";
328
- var oOptions = { titleKey: "BTN_MANAGE_APP_CTX" };
329
- oOptions.details = oError.userMessage;
330
- Utils.showMessageBox("error", sMessage, oOptions);
360
+ if (oError !== "cancel") {
361
+ Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", { titleKey: "BTN_MANAGE_APP_CTX", error: oError});
362
+ Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
363
+ }
331
364
  });
332
- var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
333
- this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
334
- onCloseDialog.call(this);
335
365
  }
336
366
 
337
367
  function onCloseDialog() {
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * @class
44
44
  *
45
45
  * @author SAP SE
46
- * @version 1.114.0
46
+ * @version 1.115.1
47
47
  *
48
48
  * @constructor
49
49
  * @private
@@ -279,7 +279,8 @@ sap.ui.define([
279
279
  var oInputField = this.getToolbar().getControl("addAdaptationDialog--saveAdaptation-title-input");
280
280
  var bEnable;
281
281
  var bRolesSelectedAndValidTitle = this._oContextComponentInstance.getSelectedContexts().role.length > 0
282
- && oInputField.getValueState() === ValueState.None;
282
+ && oInputField.getValueState() === ValueState.None
283
+ && oInputField.getValue().length > 0;
283
284
  if (this._bIsEditMode && this._mEditProperties && this.oDialogModel) {
284
285
  bEnable = bRolesSelectedAndValidTitle
285
286
  // check that some of the properties title, priority, roles have been changed
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @class
50
50
  *
51
51
  * @author SAP SE
52
- * @version 1.114.0
52
+ * @version 1.115.1
53
53
  *
54
54
  * @constructor
55
55
  * @private
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @class
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.114.0
39
+ * @version 1.115.1
40
40
  *
41
41
  * @constructor
42
42
  * @private
@@ -124,7 +124,7 @@ sap.ui.define([
124
124
 
125
125
  return DateFormat.getInstance({
126
126
  format: "yMMMdjm"
127
- }).format(new Date(sTimeStamp));
127
+ }).format(new Date(sTimeStamp + "Z"));
128
128
  }
129
129
 
130
130
  function getGroupHeaderFactory(oGroup) {
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  * Constructor for a new sap.ui.rta.util.PluginManager
69
69
  * @extends sap.ui.base.ManagedObject
70
70
  * @author SAP SE
71
- * @version 1.114.0
71
+ * @version 1.115.1
72
72
  * @constructor
73
73
  * @private
74
74
  * @since 1.86
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * Constructor for a new sap.ui.rta.util.PopupManager
43
43
  * @extends sap.ui.base.ManagedObject
44
44
  * @author SAP SE
45
- * @version 1.114.0
45
+ * @version 1.115.1
46
46
  * @constructor
47
47
  * @private
48
48
  * @since 1.48
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @namespace sap.ui.rta.util.ReloadManager
31
31
  * @alias sap.ui.rta.util.ReloadManager
32
32
  * @since 1.104
33
- * @version 1.114.0
33
+ * @version 1.115.1
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -77,7 +77,7 @@ sap.ui.define([
77
77
  sReason = "MSG_DRAFT_EXISTS";
78
78
  } else if (oReloadInfo.allContexts) {
79
79
  sReason = "MSG_RESTRICTED_CONTEXT_EXIST";
80
- } // TODO add app descr changes case for start?
80
+ }// TODO add app descr changes case for start?
81
81
  return sReason;
82
82
  }
83
83
 
@@ -94,6 +94,9 @@ sap.ui.define([
94
94
  if (oReloadInfo.allContexts) {
95
95
  return "MSG_RELOAD_WITH_PERSONALIZATION_AND_RESTRICTED_CONTEXT";
96
96
  }
97
+ if (oReloadInfo.switchEndUserAdaptation) {
98
+ return "MSG_RELOAD_WITH_PERSONALIZATION_AND_CONTEXT_BASED_ADAPTATION";
99
+ }
97
100
  return "MSG_RELOAD_WITH_PERSONALIZATION_AND_VIEWS";
98
101
  }
99
102
 
@@ -112,6 +115,10 @@ sap.ui.define([
112
115
  if (oReloadInfo.allContexts) {
113
116
  return "MSG_RELOAD_WITHOUT_ALL_CONTEXT";
114
117
  }
118
+
119
+ if (oReloadInfo.switchEndUserAdaptation) {
120
+ return "MSG_RELOAD_OTHER_CONTEXT_BASED_ADAPTATION";
121
+ }
115
122
  return undefined;
116
123
  }
117
124
 
@@ -127,33 +134,34 @@ sap.ui.define([
127
134
  }
128
135
 
129
136
  function triggerReloadOnStart(oReloadInfo, bVersioningEnabled, bDeveloperMode) {
130
- if (mUShellServices.CrossApplicationNavigation && bVersioningEnabled) {
131
- // clears FlexState and triggers reloading of the flex data without blocking
132
- if (oReloadInfo.isDraftAvailable) {
133
- VersionsAPI.loadDraftForApplication({
134
- control: oReloadInfo.selector,
135
- layer: oReloadInfo.layer,
136
- allContexts: oReloadInfo.allContexts,
137
- adaptationId: oReloadInfo.adaptationId
138
- });
139
- } else {
140
- VersionsAPI.loadVersionForApplication({
137
+ return Promise.resolve().then(function() {
138
+ if (mUShellServices.CrossApplicationNavigation && bVersioningEnabled) {
139
+ // clears FlexState and triggers reloading of the flex data without blocking
140
+ if (oReloadInfo.isDraftAvailable) {
141
+ return VersionsAPI.loadDraftForApplication({
142
+ control: oReloadInfo.selector,
143
+ layer: oReloadInfo.layer,
144
+ allContexts: oReloadInfo.allContexts,
145
+ adaptationId: oReloadInfo.adaptationId
146
+ });
147
+ }
148
+ return VersionsAPI.loadVersionForApplication({
141
149
  control: oReloadInfo.selector,
142
150
  layer: oReloadInfo.layer,
143
151
  allContexts: oReloadInfo.allContexts,
144
152
  adaptationId: oReloadInfo.adaptationId
145
153
  });
146
154
  }
147
- }
148
- var sReason = getReloadMessageOnStart(oReloadInfo);
149
- // showing messages in visual editor is leading to blocked screen. In this case we should reload without message
150
- var pMessageBox = bDeveloperMode ? Promise.resolve() : Utils.showMessageBox("information", sReason);
151
- return pMessageBox.then(function() {
155
+ return undefined;
156
+ }).then(function() {
157
+ var sReason = getReloadMessageOnStart(oReloadInfo);
158
+ // showing messages in visual editor is leading to blocked screen. In this case we should reload without message
159
+ return bDeveloperMode ? undefined : Utils.showMessageBox("information", sReason);
160
+ }).then(function() {
152
161
  ReloadManager.enableAutomaticStart(oReloadInfo.layer, oReloadInfo.selector);
153
162
  oReloadInfo.onStart = true;
154
163
  return ReloadManager.triggerReload(oReloadInfo);
155
- })
156
- .then(function() {
164
+ }).then(function() {
157
165
  return true;
158
166
  });
159
167
  }
@@ -270,6 +278,7 @@ sap.ui.define([
270
278
  * @param {sap.ui.fl.Selector} mProperties.selector - Root control
271
279
  * @param {boolean} mProperties.versioningEnabled - Whether versioning is enabled
272
280
  * @param {boolean} mProperties.developerMode - Whether the developer mode is set
281
+ * @param {string} mProperties.adaptationId - Context-based adaptation ID of the currently displayed adaptation
273
282
  *
274
283
  * @return {Promise<boolean>} Resolving to <code>false</code> means that reload is not necessary
275
284
  */
@@ -282,8 +291,7 @@ sap.ui.define([
282
291
  URLParsingService: mUShellServices.URLParsing
283
292
  });
284
293
  return ReloadInfoAPI.getReloadReasonsForStart(mProperties).then(function(oReloadInfo) {
285
- //TODO: add reload trigger for context-based adaptations
286
- if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts) {
294
+ if (oReloadInfo.hasHigherLayerChanges || oReloadInfo.isDraftAvailable || oReloadInfo.allContexts || oReloadInfo.switchAdaptation) {
287
295
  return triggerReloadOnStart(oReloadInfo, mProperties.versioningEnabled, mProperties.developerMode);
288
296
  }
289
297
  return undefined;
@@ -19,7 +19,7 @@ function(
19
19
  *
20
20
  * @extends sap.ui.core.EventBus
21
21
  * @author SAP SE
22
- * @version 1.114.0
22
+ * @version 1.115.1
23
23
  * @private
24
24
  * @since 1.56.0
25
25
  * @alias sap.ui.rta.util.ServiceEventBus
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
41
41
  * @author SAP SE
42
42
  * @since 1.84.0
43
- * @version 1.114.0
43
+ * @version 1.115.1
44
44
  * @private
45
45
  */
46
46
  var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -106,6 +106,8 @@ sap.ui.define([
106
106
  type: "object"
107
107
  }
108
108
  }
109
+ },
110
+ detailPopoverOpened: {
109
111
  }
110
112
  }
111
113
  },
@@ -140,8 +142,8 @@ sap.ui.define([
140
142
  constructor: function() {
141
143
  this._oDetailModel = new JSONModel();
142
144
  this._oDetailModel.setDefaultBindingMode("OneWay");
143
- this._fnHoverTrue = this._toggleHoverStyleClasses.bind(this, true);
144
- this._fnHoverFalse = this._toggleHoverStyleClasses.bind(this, false);
145
+ this._fnHoverTrue = this._setHoverStyleClasses.bind(this, true);
146
+ this._fnHoverFalse = this._setHoverStyleClasses.bind(this, false);
145
147
  Control.prototype.constructor.apply(this, arguments);
146
148
  // is needed to prevent that multiple events listeners are attached
147
149
  // to the same overlay because setVisible is called multiple times
@@ -149,14 +151,19 @@ sap.ui.define([
149
151
  }
150
152
  });
151
153
 
152
- function handleBrowserEventsOnElement(oElement, sEventHandler) {
153
- oElement[sEventHandler]("click", this._onSelect, this);
154
- oElement[sEventHandler]("tap", this._onSelect, this);
155
- oElement[sEventHandler]("keydown", this._onKeyDown, this);
156
- oElement[sEventHandler]("mouseout", this._fnHoverFalse);
157
- oElement[sEventHandler]("focusout", this._fnHoverFalse);
158
- oElement[sEventHandler]("mouseover", this._fnHoverTrue);
159
- oElement[sEventHandler]("focusin", this._fnHoverTrue);
154
+ function handleBrowserEventsOnOverlay(oOverlay, sEventHandler) {
155
+ oOverlay[sEventHandler]("click", this._onSelect, this);
156
+ oOverlay[sEventHandler]("tap", this._onSelect, this);
157
+ oOverlay[sEventHandler]("keydown", this._onKeyDown, this);
158
+ oOverlay[sEventHandler]("mouseover", this._fnHoverTrue);
159
+ oOverlay[sEventHandler]("focusin", this._fnHoverTrue);
160
+ }
161
+
162
+ // Hover/focus events are handled by the ChangeVisualization (because it can affect multiple indicators at once)
163
+ function handleBrowserEventsOnIndicator(oIndicator, sEventHandler) {
164
+ oIndicator[sEventHandler]("click", this._onSelect, this);
165
+ oIndicator[sEventHandler]("tap", this._onSelect, this);
166
+ oIndicator[sEventHandler]("keydown", this._onKeyDown, this);
160
167
  }
161
168
 
162
169
  function centerVertically(oIndicator) {
@@ -257,7 +264,7 @@ sap.ui.define([
257
264
 
258
265
  ChangeIndicator.prototype.init = function() {
259
266
  this._iOldTabIndex = 0;
260
- handleBrowserEventsOnElement.call(this, this, "attachBrowserEvent");
267
+ handleBrowserEventsOnIndicator.call(this, this, "attachBrowserEvent");
261
268
  };
262
269
 
263
270
  ChangeIndicator.prototype.setVisible = function(bVisible) {
@@ -266,11 +273,11 @@ sap.ui.define([
266
273
  // needed because the change indicator cleanup is only triggered on save and exit
267
274
  if (oOverlay) {
268
275
  if (bVisible && !this._bEventAttachedToElement) {
269
- handleBrowserEventsOnElement.call(this, oOverlay, "attachBrowserEvent");
276
+ handleBrowserEventsOnOverlay.call(this, oOverlay, "attachBrowserEvent");
270
277
  this._bEventAttachedToElement = true;
271
278
  }
272
279
  if (!bVisible) {
273
- handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
280
+ handleBrowserEventsOnOverlay.call(this, oOverlay, "detachBrowserEvent");
274
281
  this._bEventAttachedToElement = false;
275
282
  if (this.getAggregation("_popover")) {
276
283
  this.getAggregation("_popover").destroy();
@@ -320,7 +327,7 @@ sap.ui.define([
320
327
  if (this._bScheduledForFocus) {
321
328
  // Element was supposed to be focused before rendering
322
329
  this.focus();
323
- this._toggleHoverStyleClasses(true);
330
+ this._setHoverStyleClasses(true);
324
331
  }
325
332
  };
326
333
 
@@ -334,9 +341,9 @@ sap.ui.define([
334
341
  if (this.getAggregation("_popover")) {
335
342
  this.getAggregation("_popover").destroy();
336
343
  }
337
- handleBrowserEventsOnElement.call(this, oOverlay, "detachBrowserEvent");
344
+ handleBrowserEventsOnOverlay.call(this, oOverlay, "detachBrowserEvent");
338
345
  }
339
- handleBrowserEventsOnElement.call(this, this, "detachBrowserEvent");
346
+ handleBrowserEventsOnIndicator.call(this, this, "detachBrowserEvent");
340
347
  };
341
348
 
342
349
  ChangeIndicator.prototype.setChanges = function(aChanges) {
@@ -353,7 +360,7 @@ sap.ui.define([
353
360
  ChangeIndicator.prototype._onSelect = function(oEvent) {
354
361
  this.focus();
355
362
  oEvent.stopPropagation();
356
- this._openDetailPopover();
363
+ this._toggleDetailPopover();
357
364
  };
358
365
 
359
366
  ChangeIndicator.prototype._onKeyDown = function(oEvent) {
@@ -366,11 +373,19 @@ sap.ui.define([
366
373
  });
367
374
  };
368
375
 
369
- ChangeIndicator.prototype._toggleHoverStyleClasses = function(bAdd, oEvent) {
370
- if (oEvent) {
371
- oEvent.stopPropagation();
372
- oEvent.preventDefault();
373
- }
376
+ // When the detail popover is opened the overlay should be selected
377
+ ChangeIndicator.prototype.onDetailPopoverOpened = function(oEvent) {
378
+ oEvent.preventDefault();
379
+ this._setHoverStyleClasses(true);
380
+ };
381
+
382
+ ChangeIndicator.prototype.onIndicatorBrowserInteraction = function(bAdd, oEvent) {
383
+ oEvent.stopPropagation();
384
+ oEvent.preventDefault();
385
+ this._setHoverStyleClasses(bAdd);
386
+ };
387
+
388
+ ChangeIndicator.prototype._setHoverStyleClasses = function(bAdd) {
374
389
  var oOverlay = Core.byId(this.getOverlayId());
375
390
  if (oOverlay.getMetadata().getName() !== "sap.ui.dt.ElementOverlay") {
376
391
  return;
@@ -380,7 +395,7 @@ sap.ui.define([
380
395
  this[sFunctionName]("sapUiRtaHover");
381
396
  };
382
397
 
383
- ChangeIndicator.prototype._openDetailPopover = function() {
398
+ ChangeIndicator.prototype._toggleDetailPopover = function() {
384
399
  if (!this.getAggregation("_popover")) {
385
400
  //store the tabindex (tabindex will be removed on opening the popover)
386
401
  this._iOldTabIndex = this.getDomRef().getAttribute("tabindex");
@@ -393,13 +408,16 @@ sap.ui.define([
393
408
  this.setAggregation("_popover", oPopover);
394
409
  oPopover.setModel(this._oDetailModel, "details");
395
410
  oPopover.openBy(this);
411
+ this.fireDetailPopoverOpened();
396
412
  }.bind(this));
397
413
  } else {
398
414
  if (this.getAggregation("_popover").isOpen()) {
399
415
  return this.getAggregation("_popover").close();
400
416
  }
401
417
  this.getAggregation("_popover").openBy(this);
418
+ this.fireDetailPopoverOpened();
402
419
  }
420
+ return undefined;
403
421
  };
404
422
 
405
423
  ChangeIndicator.prototype._showDependentElements = function(oEvent) {