@openui5/sap.ui.rta 1.115.1 → 1.117.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 (178) hide show
  1. package/.eslintrc.json +33 -2
  2. package/.reuse/dep5 +0 -5
  3. package/THIRDPARTY.txt +1 -7
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +60 -59
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +256 -254
  8. package/src/sap/ui/rta/Utils.js +42 -42
  9. package/src/sap/ui/rta/api/startAdaptation.js +2 -2
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +100 -103
  13. package/src/sap/ui/rta/appVariant/Feature.js +75 -77
  14. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
  15. package/src/sap/ui/rta/appVariant/Utils.js +17 -17
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
  17. package/src/sap/ui/rta/command/AddIFrame.js +7 -7
  18. package/src/sap/ui/rta/command/AddProperty.js +7 -7
  19. package/src/sap/ui/rta/command/AddXML.js +1 -1
  20. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
  21. package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
  22. package/src/sap/ui/rta/command/BaseCommand.js +1 -2
  23. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  24. package/src/sap/ui/rta/command/Combine.js +1 -1
  25. package/src/sap/ui/rta/command/CommandFactory.js +11 -11
  26. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  27. package/src/sap/ui/rta/command/ControlVariantConfigure.js +28 -3
  28. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  29. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
  30. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
  31. package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
  32. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  33. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  34. package/src/sap/ui/rta/command/FlexCommand.js +30 -30
  35. package/src/sap/ui/rta/command/LREPSerializer.js +20 -10
  36. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  37. package/src/sap/ui/rta/command/Move.js +1 -1
  38. package/src/sap/ui/rta/command/Property.js +1 -1
  39. package/src/sap/ui/rta/command/Remove.js +1 -1
  40. package/src/sap/ui/rta/command/Rename.js +1 -1
  41. package/src/sap/ui/rta/command/Resize.js +1 -1
  42. package/src/sap/ui/rta/command/Reveal.js +1 -1
  43. package/src/sap/ui/rta/command/Settings.js +1 -1
  44. package/src/sap/ui/rta/command/Split.js +1 -1
  45. package/src/sap/ui/rta/command/Stack.js +4 -4
  46. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  47. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  48. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  49. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  50. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  51. package/src/sap/ui/rta/enablement/TestDelegate.js +92 -92
  52. package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
  53. package/src/sap/ui/rta/library.js +2 -2
  54. package/src/sap/ui/rta/messagebundle.properties +11 -1
  55. package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
  56. package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
  57. package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
  58. package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
  59. package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
  60. package/src/sap/ui/rta/messagebundle_da.properties +5 -0
  61. package/src/sap/ui/rta/messagebundle_de.properties +6 -1
  62. package/src/sap/ui/rta/messagebundle_el.properties +5 -0
  63. package/src/sap/ui/rta/messagebundle_en.properties +5 -0
  64. package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
  65. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
  66. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
  67. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
  68. package/src/sap/ui/rta/messagebundle_es.properties +5 -0
  69. package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
  70. package/src/sap/ui/rta/messagebundle_et.properties +5 -0
  71. package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
  72. package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
  73. package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
  74. package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
  75. package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
  76. package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
  77. package/src/sap/ui/rta/messagebundle_id.properties +5 -0
  78. package/src/sap/ui/rta/messagebundle_it.properties +5 -0
  79. package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
  80. package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
  81. package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
  82. package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
  83. package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
  84. package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
  85. package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
  86. package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
  87. package/src/sap/ui/rta/messagebundle_no.properties +5 -0
  88. package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
  89. package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
  90. package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
  91. package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
  92. package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
  93. package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
  94. package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
  95. package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
  96. package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
  97. package/src/sap/ui/rta/messagebundle_th.properties +5 -0
  98. package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
  99. package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
  100. package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
  101. package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
  102. package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
  103. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
  104. package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
  105. package/src/sap/ui/rta/plugin/Combine.js +9 -9
  106. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
  107. package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
  108. package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
  109. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  110. package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
  111. package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
  112. package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
  113. package/src/sap/ui/rta/plugin/Plugin.js +20 -20
  114. package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
  115. package/src/sap/ui/rta/plugin/Remove.js +11 -11
  116. package/src/sap/ui/rta/plugin/Rename.js +7 -7
  117. package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
  118. package/src/sap/ui/rta/plugin/Resize.js +62 -62
  119. package/src/sap/ui/rta/plugin/Selection.js +14 -14
  120. package/src/sap/ui/rta/plugin/Settings.js +20 -20
  121. package/src/sap/ui/rta/plugin/Split.js +7 -7
  122. package/src/sap/ui/rta/plugin/Stretch.js +4 -4
  123. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
  124. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
  125. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
  126. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
  128. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
  129. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
  130. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
  133. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  134. package/src/sap/ui/rta/service/Action.js +36 -37
  135. package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
  136. package/src/sap/ui/rta/service/Outline.js +59 -59
  137. package/src/sap/ui/rta/service/Property.js +125 -125
  138. package/src/sap/ui/rta/service/Receiver.js +78 -77
  139. package/src/sap/ui/rta/service/Selection.js +6 -6
  140. package/src/sap/ui/rta/service/SupportTools.js +188 -37
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
  143. package/src/sap/ui/rta/themes/base/library.source.less +2 -1
  144. package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
  145. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Base.js +17 -15
  147. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
  148. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  149. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  150. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
  151. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  152. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  153. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
  154. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  155. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
  156. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
  158. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
  159. package/src/sap/ui/rta/util/Animation.js +5 -5
  160. package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
  161. package/src/sap/ui/rta/util/PluginManager.js +25 -25
  162. package/src/sap/ui/rta/util/PopupManager.js +27 -27
  163. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  164. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  165. package/src/sap/ui/rta/util/StylesLoader.js +9 -9
  166. package/src/sap/ui/rta/util/UrlParser.js +19 -19
  167. package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
  168. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
  169. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
  170. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
  171. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
  172. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  173. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  174. package/src/sap/ui/rta/util/hasStableId.js +2 -2
  175. package/src/sap/ui/rta/util/showMessageBox.js +4 -5
  176. package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
  177. package/src/sap/ui/rta/util/validateStableIds.js +8 -8
  178. package/ui5.yaml +1 -1
@@ -6,12 +6,14 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/m/HBox",
9
+ "sap/ui/core/StaticArea",
9
10
  "sap/ui/dt/util/ZIndexManager",
10
11
  "sap/ui/model/resource/ResourceModel",
11
12
  "sap/ui/rta/util/Animation",
12
13
  "./BaseRenderer"
13
14
  ], function(
14
15
  HBox,
16
+ StaticArea,
15
17
  ZIndexManager,
16
18
  ResourceModel,
17
19
  Animation,
@@ -27,7 +29,7 @@ sap.ui.define([
27
29
  * @extends sap.m.HBox
28
30
  *
29
31
  * @author SAP SE
30
- * @version 1.115.1
32
+ * @version 1.117.0
31
33
  *
32
34
  * @constructor
33
35
  * @private
@@ -148,7 +150,7 @@ sap.ui.define([
148
150
  * @param {string} sEventName - Name of the event
149
151
  * @param {sap.ui.base.Event} oEvent - Event object
150
152
  */
151
- Base.prototype.eventHandler = function (sEventName, oEvent) {
153
+ Base.prototype.eventHandler = function(sEventName, oEvent) {
152
154
  this["fire" + sEventName](oEvent.getParameters());
153
155
  };
154
156
 
@@ -158,7 +160,7 @@ sap.ui.define([
158
160
  * @returns {Promise<sap.ui.core.Control[]>} A Promise that resolves with an array of controls
159
161
  * @protected
160
162
  */
161
- Base.prototype.buildControls = function () {
163
+ Base.prototype.buildControls = function() {
162
164
  return Promise.resolve([]);
163
165
  };
164
166
 
@@ -166,9 +168,9 @@ sap.ui.define([
166
168
  * Function renders the Toolbar into the page
167
169
  * @protected
168
170
  */
169
- Base.prototype.placeToContainer = function () {
171
+ Base.prototype.placeToContainer = function() {
170
172
  // Render toolbar
171
- this.placeAt(sap.ui.getCore().getStaticAreaRef());
173
+ this.placeAt(StaticArea.getDomRef());
172
174
  };
173
175
 
174
176
  /**
@@ -176,8 +178,8 @@ sap.ui.define([
176
178
  * @protected
177
179
  * @returns {Promise} An empty Promise
178
180
  */
179
- Base.prototype.buildContent = function () {
180
- return this.buildControls().then(function (aControls) {
181
+ Base.prototype.buildContent = function() {
182
+ return this.buildControls().then(function(aControls) {
181
183
  aControls.forEach(this.addItem, this);
182
184
  }.bind(this));
183
185
  };
@@ -190,9 +192,9 @@ sap.ui.define([
190
192
  */
191
193
  Base.prototype.show = function(fnAdjustToolbarCallback) {
192
194
  // 1) create Promise and wait until DomRef is available
193
- return new Promise(function (fnResolve) {
195
+ return new Promise(function(fnResolve) {
194
196
  var oDelegate = {
195
- onAfterRendering: function () {
197
+ onAfterRendering: function() {
196
198
  this.removeEventDelegate(oDelegate);
197
199
  fnResolve();
198
200
  }
@@ -202,7 +204,7 @@ sap.ui.define([
202
204
  this.setVisible(true); // show DomRef
203
205
  }.bind(this))
204
206
  // 2) animate DomRef
205
- .then(function () {
207
+ .then(function() {
206
208
  if (fnAdjustToolbarCallback && typeof fnAdjustToolbarCallback === "function") {
207
209
  fnAdjustToolbarCallback();
208
210
  }
@@ -211,7 +213,7 @@ sap.ui.define([
211
213
  : Promise.resolve();
212
214
  }.bind(this))
213
215
  // 3) focus on Toolbar
214
- .then(function () {
216
+ .then(function() {
215
217
  this.focus();
216
218
  }.bind(this));
217
219
  };
@@ -234,9 +236,9 @@ sap.ui.define([
234
236
  }
235
237
  return oPromise
236
238
  // 2) hide DomRef
237
- .then(function () {
238
- this.setVisible(false);
239
- }.bind(this));
239
+ .then(function() {
240
+ this.setVisible(false);
241
+ }.bind(this));
240
242
  };
241
243
 
242
244
  /**
@@ -254,7 +256,7 @@ sap.ui.define([
254
256
  * Place the Toolbar above everything on the page
255
257
  * @public
256
258
  */
257
- Base.prototype.bringToFront = function () {
259
+ Base.prototype.bringToFront = function() {
258
260
  this.setZIndex(ZIndexManager.getNextZIndex());
259
261
  };
260
262
 
@@ -18,7 +18,7 @@ function(
18
18
 
19
19
  BaseRenderer.apiVersion = 1; // @todo-semantic-rendering out of order .class() and .style() calls before openStart
20
20
 
21
- BaseRenderer.render = function (oRM, oControl) {
21
+ BaseRenderer.render = function(oRM, oControl) {
22
22
  oRM.class("sapUiRtaToolbar");
23
23
  oRM.class("color_" + oControl.getColor());
24
24
 
@@ -32,6 +32,5 @@ function(
32
32
  HBoxRenderer.render(oRM, oControl);
33
33
  };
34
34
 
35
-
36
35
  return BaseRenderer;
37
36
  });
@@ -32,7 +32,7 @@ function(
32
32
  * @extends sap.ui.rta.toolbar.Adaptation
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.115.1
35
+ * @version 1.117.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -48,19 +48,19 @@ function(
48
48
  type: "fiori"
49
49
  });
50
50
 
51
- Fiori.prototype.init = function () {
51
+ Fiori.prototype.init = function() {
52
52
  this._oRenderer = Utils.getFiori2Renderer();
53
53
  this._oFioriHeader = this._oRenderer.getRootControl().getShellHeader();
54
54
  Adaptation.prototype.init.apply(this, arguments);
55
55
  };
56
56
 
57
- Fiori.prototype.show = function () {
57
+ Fiori.prototype.show = function() {
58
58
  this._oFioriHeader.addStyleClass(FIORI_HIDDEN_CLASS);
59
59
  return Adaptation.prototype.show.apply(this, arguments);
60
60
  };
61
61
 
62
- Fiori.prototype.buildControls = function () {
63
- return Adaptation.prototype.buildControls.apply(this, arguments).then(function (aControls) {
62
+ Fiori.prototype.buildControls = function() {
63
+ return Adaptation.prototype.buildControls.apply(this, arguments).then(function(aControls) {
64
64
  var sLogoPath = this._oFioriHeader.getLogo();
65
65
 
66
66
  if (this._oFioriHeader.getShowLogo() && sLogoPath) {
@@ -95,9 +95,9 @@ function(
95
95
  /**
96
96
  * @inheritDoc
97
97
  */
98
- Fiori.prototype.hide = function () {
98
+ Fiori.prototype.hide = function() {
99
99
  return Adaptation.prototype.hide.apply(this, arguments)
100
- .then(function () {
100
+ .then(function() {
101
101
  this._oFioriHeader.removeStyleClass(FIORI_HIDDEN_CLASS);
102
102
  }.bind(this));
103
103
  };
@@ -156,7 +156,7 @@ function(
156
156
  oIconSpacer.setVisible(bVisible);
157
157
  };
158
158
 
159
- Fiori.prototype.destroy = function () {
159
+ Fiori.prototype.destroy = function() {
160
160
  // In case of destroy() without normal hide() call
161
161
  this._oFioriHeader.removeStyleClass(FIORI_HIDDEN_CLASS);
162
162
 
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.115.1
23
+ * @version 1.117.0
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.115.1
26
+ * @version 1.117.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  *
51
51
  * @private
52
52
  */
53
- OverflowToolbarButton.prototype._onBeforeEnterOverflow = function () {
53
+ OverflowToolbarButton.prototype._onBeforeEnterOverflow = function() {
54
54
  SapMOverflowToolbarButton.prototype._onBeforeEnterOverflow.apply(this, arguments);
55
55
  this.setVisibleIcon(this.getIcon());
56
56
  this.setIcon("");
@@ -61,7 +61,7 @@ sap.ui.define([
61
61
  *
62
62
  * @private
63
63
  */
64
- OverflowToolbarButton.prototype._onAfterExitOverflow = function () {
64
+ OverflowToolbarButton.prototype._onAfterExitOverflow = function() {
65
65
  SapMOverflowToolbarButton.prototype._onAfterExitOverflow.apply(this, arguments);
66
66
  this.setIcon(this.getVisibleIcon());
67
67
  };
@@ -86,7 +86,7 @@ sap.ui.define([
86
86
  * @public
87
87
  * @returns {object} Configuration information for the <code>sap.m.IOverflowToolbarContent</code> interface.
88
88
  */
89
- OverflowToolbarButton.prototype.getOverflowToolbarConfig = function () {
89
+ OverflowToolbarButton.prototype.getOverflowToolbarConfig = function() {
90
90
  return {
91
91
  canOverflow: true,
92
92
  onBeforeEnterOverflow: this._onBeforeEnterOverflow.bind(this),
@@ -22,7 +22,7 @@ function(
22
22
  * @extends sap.ui.rta.toolbar.Base
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.115.1
25
+ * @version 1.117.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -62,7 +62,7 @@ function(
62
62
  text: "{i18n>BTN_DONE}",
63
63
  press: this.eventHandler.bind(this, "Exit")
64
64
  }).data("name", "exit")
65
- ].forEach(function (oControl) {
65
+ ].forEach(function(oControl) {
66
66
  this.addItem(oControl);
67
67
  }.bind(this));
68
68
 
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.115.1
23
+ * @version 1.117.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -79,7 +79,7 @@ function(
79
79
  onSaveReorderedAdaptations: onSaveReorderedAdaptations.bind(this),
80
80
  isAdaptationsSelected: isAdaptationsSelected.bind(this),
81
81
  getIndexOfSelectedAdaptation: getIndexOfSelectedAdaptation.bind(this),
82
- onClose: onCloseDialog.bind(this)
82
+ onCancel: onCancelDialog.bind(this)
83
83
  }
84
84
  }).then(function(oDialog) {
85
85
  this._oManageAdaptationDialog = oDialog;
@@ -99,6 +99,7 @@ function(
99
99
  this.oAdaptationsModel = ContextBasedAdaptationsAPI.getAdaptationsModel({control: this._oRtaInformation.rootControl, layer: this._oRtaInformation.flexSettings.layer});
100
100
  this.oAdaptationsModel.updateAdaptations(oAdaptations.adaptations);
101
101
  this.oReferenceAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/adaptations")));
102
+ this._oOriginAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/allAdaptations")));
102
103
  this._oControlConfigurationModel = new JSONModel({isTableItemSelected: false});
103
104
  this._oManageAdaptationDialog.setModel(this.oAdaptationsModel, "contextBased");
104
105
  this._oManageAdaptationDialog.setModel(this._oControlConfigurationModel, "controlConfiguration");
@@ -171,7 +172,7 @@ function(
171
172
  if (sQuery && sQuery.length > 0) {
172
173
  syncEnabledPropertyOfMoveButtons.call(this);
173
174
  enableDragAndDropForAdaptationTable.call(this, false);
174
- //filter Table context
175
+ // filter Table context
175
176
  var oFilterByTitle = new Filter("title", FilterOperator.Contains, sQuery);
176
177
  var oFilterByContextId = new Filter({
177
178
  path: "contexts/role",
@@ -184,7 +185,7 @@ function(
184
185
  var oFilterCreatedBy = new Filter("createdBy", FilterOperator.Contains, sQuery);
185
186
  var oFilterChangedBy = new Filter("changedBy", FilterOperator.Contains, sQuery);
186
187
  oFilters = new Filter([oFilterByTitle, oFilterByContextId, oFilterCreatedBy, oFilterChangedBy]);
187
- //Filter default Table context
188
+ // Filter default Table context
188
189
  if (sDefaultTableText.toUpperCase().includes(sQuery.toUpperCase())) {
189
190
  oDefaultApplicationTable.setVisible(true);
190
191
  } else {
@@ -292,8 +293,8 @@ function(
292
293
 
293
294
  function didAdaptationsPriorityChange() {
294
295
  return !_isEqual(
295
- this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdapation) { return oAdapation.id; }),
296
- this.oReferenceAdaptationsData.map(function(oAdapation) { return oAdapation.id; })
296
+ this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; }),
297
+ this.oReferenceAdaptationsData.map(function(oAdaptation) { return oAdaptation.id; })
297
298
  );
298
299
  }
299
300
 
@@ -347,7 +348,7 @@ function(
347
348
  }
348
349
 
349
350
  function onSaveReorderedAdaptations() {
350
- Utils.checkDraftOverwrite(this.getModel("versions")).then(function() {
351
+ Utils.checkDraftOverwrite(this.getToolbar().getModel("versions")).then(function() {
351
352
  var oRtaInformation = this.getToolbar().getRtaInformation();
352
353
  var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; });
353
354
  return ContextBasedAdaptationsAPI.reorder({control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer, parameters: {priorities: aAdaptationPriorities}});
@@ -364,6 +365,12 @@ function(
364
365
  });
365
366
  }
366
367
 
368
+ function onCancelDialog() {
369
+ // the adaptationsModel has to be set to its origin as no reorder has taken place
370
+ this.oAdaptationsModel.updateAdaptations(this._oOriginAdaptationsData);
371
+ onCloseDialog.call(this);
372
+ }
373
+
367
374
  function onCloseDialog() {
368
375
  this._oControlConfigurationModel.setProperty("/isTableItemSelected", false);
369
376
  getSearchField.call(this).setValue("");
@@ -48,7 +48,7 @@
48
48
  hAlign="Left">
49
49
  <Text text="{i18n>CLM_HEADER_ADAPTATIONS_TITLE}" />
50
50
  </Column>
51
- <Column width="8rem"
51
+ <Column width="6rem"
52
52
  minScreenWidth="tablet"
53
53
  demandPopin="true"
54
54
  popinDisplay="Inline"
@@ -87,14 +87,8 @@
87
87
  <ColumnListItem>
88
88
  <cells>
89
89
  <Text text="{contextBased>rank}"/>
90
- <CustomListItem>
91
- <HBox>
92
- <VBox class="sapUiSmallMarginTopBottom">
93
90
  <Text wrapping="false" maxLines="1" text="{contextBased>title}"
94
91
  tooltip="{contextBased>title}"/>
95
- </VBox>
96
- </HBox>
97
- </CustomListItem>
98
92
  <Text text="{ parts: ['contextBased>contexts/role'], formatter: '.formatContextColumnCell'}"
99
93
  tooltip="{ parts: ['contextBased>contexts/role'], formatter: '.formatContextColumnTooltip'}" />
100
94
  <Text text="{ parts: ['contextBased>createdBy', 'contextBased>createdAt'], formatter: '.formatCreatedChangedOnColumnCell'}"/>
@@ -151,7 +145,7 @@
151
145
  <endButton>
152
146
  <Button id="manageAdaptations-closeButton"
153
147
  text="{i18n>APP_CTX_DIALOG_CANCEL}"
154
- press=".onClose"/>
148
+ press=".onCancel"/>
155
149
  </endButton>
156
150
  </Dialog>
157
151
  </core:FragmentDefinition>
@@ -15,7 +15,6 @@ sap.ui.define([
15
15
  "sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
16
16
  "sap/ui/fl/write/api/ContextSharingAPI",
17
17
  "sap/ui/rta/Utils",
18
- "sap/ui/model/Binding",
19
18
  "sap/ui/model/json/JSONModel"
20
19
  ], function(
21
20
  ManagedObject,
@@ -28,7 +27,6 @@ sap.ui.define([
28
27
  ContextBasedAdaptationsAPI,
29
28
  ContextSharingAPI,
30
29
  Utils,
31
- Binding,
32
30
  JSONModel
33
31
  ) {
34
32
  "use strict";
@@ -43,7 +41,7 @@ sap.ui.define([
43
41
  * @class
44
42
  *
45
43
  * @author SAP SE
46
- * @version 1.115.1
44
+ * @version 1.117.0
47
45
  *
48
46
  * @constructor
49
47
  * @private
@@ -167,6 +165,7 @@ sap.ui.define([
167
165
  oContextBasedAdaptation.priority = getAdaptationPriority.call(this);
168
166
  var oRtaInformation = this.getToolbar().getRtaInformation();
169
167
  if (this._bIsEditMode) {
168
+ oContextBasedAdaptation.adaptationId = this._mEditProperties.adaptationId;
170
169
  ContextBasedAdaptationsAPI.update({
171
170
  control: oRtaInformation.rootControl,
172
171
  layer: oRtaInformation.flexSettings.layer,
@@ -38,7 +38,6 @@
38
38
  <form:label>
39
39
  <Label id="saveAdaptation-title-label"
40
40
  text="{i18n>APP_DIALOG_TITLE_TEXT}"
41
- textAlign="Left"
42
41
  required="true">
43
42
  </Label>
44
43
  </form:label>
@@ -53,7 +52,6 @@
53
52
  <form:label>
54
53
  <Label id="saveAdaptation-rank-label"
55
54
  text="{i18n>CLM_HEADER_PRIORITY}"
56
- textAlign="Left"
57
55
  required="true">
58
56
  </Label>
59
57
  </form:label>
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  ) {
32
32
  "use strict";
33
33
 
34
- function showError (vError) {
34
+ function showError(vError) {
35
35
  var sErrorMessage = vError.userMessage || vError.stack || vError.message || vError.status || vError;
36
36
  var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
37
37
  Log.error(sErrorMessage);
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @class
50
50
  *
51
51
  * @author SAP SE
52
- * @version 1.115.1
52
+ * @version 1.117.0
53
53
  *
54
54
  * @constructor
55
55
  * @private
@@ -64,7 +64,7 @@ sap.ui.define([
64
64
  }
65
65
  }
66
66
  },
67
- constructor: function () {
67
+ constructor: function() {
68
68
  ManagedObject.prototype.constructor.apply(this, arguments);
69
69
  this._oTranslationModel = new JSONModel(getInitialTranslationModelData());
70
70
  }
@@ -83,7 +83,7 @@ sap.ui.define([
83
83
  selector: this.getToolbar().getRtaInformation().rootControl
84
84
  };
85
85
 
86
- var oSavePromise = new Promise(function (resolve) {
86
+ var oSavePromise = new Promise(function(resolve) {
87
87
  if (oModel.getProperty("/translationRelevantDirtyChangesExist")) {
88
88
  oSavePromise = this.getToolbar().fireSave({
89
89
  callback: resolve
@@ -94,13 +94,13 @@ sap.ui.define([
94
94
  }.bind(this));
95
95
 
96
96
  oSavePromise
97
- .then(TranslationAPI.getTexts.bind(undefined, mPropertyBag))
98
- .then(function (translationTextsXML) {
99
- FileUtil.save(translationTextsXML, sFileName, "xml", "application/xml");
100
- this._oDownloadDialog.close();
101
- }.bind(this)).catch(function (e) {
102
- showError(e);
103
- });
97
+ .then(TranslationAPI.getTexts.bind(undefined, mPropertyBag))
98
+ .then(function(translationTextsXML) {
99
+ FileUtil.save(translationTextsXML, sFileName, "xml", "application/xml");
100
+ this._oDownloadDialog.close();
101
+ }.bind(this)).catch(function(e) {
102
+ showError(e);
103
+ });
104
104
  }
105
105
 
106
106
  Translation.prototype._createDownloadTranslationDialog = function() {
@@ -109,11 +109,11 @@ sap.ui.define([
109
109
  id: this.getToolbar().getId() + "_download_translation_fragment",
110
110
  controller: {
111
111
  onDownloadFile: downloadFile.bind(this),
112
- onCancelDownloadDialog: function () {
112
+ onCancelDownloadDialog: function() {
113
113
  this._oDownloadDialog.close();
114
114
  }.bind(this)
115
115
  }
116
- }).then(function (oDownloadDialog) {
116
+ }).then(function(oDownloadDialog) {
117
117
  this._oDownloadDialog = oDownloadDialog;
118
118
  this._oDownloadDialog.setModel(this._oTranslationModel, "translation");
119
119
  this.getToolbar().addDependent(this._oDownloadDialog);
@@ -127,10 +127,10 @@ sap.ui.define([
127
127
  name: "sap.ui.rta.toolbar.translation.UploadTranslationDialog",
128
128
  id: sUploadId,
129
129
  controller: {
130
- onCancelUploadDialog: function () {
130
+ onCancelUploadDialog: function() {
131
131
  this._oUploadDialog.close();
132
132
  }.bind(this),
133
- formatUploadEnabled: function () {
133
+ formatUploadEnabled: function() {
134
134
  var oFileUploader = sap.ui.getCore().byId(sUploadId + "--fileUploader");
135
135
  return oFileUploader.checkFileReadable();
136
136
  },
@@ -139,7 +139,7 @@ sap.ui.define([
139
139
  }.bind(this),
140
140
  handleUploadPress: handleUploadPress.bind(this, sUploadId)
141
141
  }
142
- }).then(function (oUploadDialog) {
142
+ }).then(function(oUploadDialog) {
143
143
  this._oUploadDialog = oUploadDialog;
144
144
  this._oUploadDialog.setModel(this._oTranslationModel, "translation");
145
145
  this.getToolbar().addDependent(this._oUploadDialog);
@@ -156,14 +156,14 @@ sap.ui.define([
156
156
  payload: new FormData()
157
157
  };
158
158
  mPropertyBag.payload.append("file", this._oTranslationModel.getProperty("/file"), oFileUploader.getValue());
159
- return TranslationAPI.uploadTranslationTexts(mPropertyBag).then(function () {
159
+ return TranslationAPI.uploadTranslationTexts(mPropertyBag).then(function() {
160
160
  var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
161
161
  var sMsg = oTextResources.getText("MSG_UPLOAD_TRANSLATION_SUCCESS");
162
162
  MessageToast.show(sMsg, {
163
163
  styleClass: Utils.getRtaStyleClassName()
164
164
  });
165
165
  this._oUploadDialog.close();
166
- }.bind(this)).catch(function (e) {
166
+ }.bind(this)).catch(function(e) {
167
167
  showError(e);
168
168
  }).finally(oFileUploader.clear.bind(oFileUploader));
169
169
  }
@@ -179,38 +179,38 @@ sap.ui.define([
179
179
  });
180
180
  }
181
181
 
182
- Translation.prototype.openDownloadTranslationDialog = function (mPropertyBag) {
182
+ Translation.prototype.openDownloadTranslationDialog = function(mPropertyBag) {
183
183
  var bHasTranslationRelevantDirtyChange = TranslationAPI.hasTranslationRelevantDirtyChanges(mPropertyBag);
184
184
  this._oTranslationModel.setProperty("/translationRelevantDirtyChangesExist", bHasTranslationRelevantDirtyChange);
185
185
 
186
186
  return TranslationAPI.getSourceLanguages(mPropertyBag)
187
- .then(function (aSourceLanguages) {
188
- if (aSourceLanguages) {
189
- this._oTranslationModel.setProperty("/sourceLanguages", aSourceLanguages);
190
- this._oTranslationModel.setProperty("/sourceLanguage", aSourceLanguages[0] || "");
191
- }
192
- }.bind(this))
193
- .then(function () {
194
- if (this._oDownloadDialogPromise) {
195
- this._oTranslationModel.setProperty("/targetLanguage", "");
196
- } else {
197
- this._oDownloadDialogPromise = this._createDownloadTranslationDialog();
198
- }
199
- return this._oDownloadDialogPromise;
200
- }.bind(this))
201
- .then(function (oDialog) {
202
- return oDialog.open();
203
- })
204
- .catch(function (vError) {
205
- showError(vError);
206
- });
187
+ .then(function(aSourceLanguages) {
188
+ if (aSourceLanguages) {
189
+ this._oTranslationModel.setProperty("/sourceLanguages", aSourceLanguages);
190
+ this._oTranslationModel.setProperty("/sourceLanguage", aSourceLanguages[0] || "");
191
+ }
192
+ }.bind(this))
193
+ .then(function() {
194
+ if (this._oDownloadDialogPromise) {
195
+ this._oTranslationModel.setProperty("/targetLanguage", "");
196
+ } else {
197
+ this._oDownloadDialogPromise = this._createDownloadTranslationDialog();
198
+ }
199
+ return this._oDownloadDialogPromise;
200
+ }.bind(this))
201
+ .then(function(oDialog) {
202
+ return oDialog.open();
203
+ })
204
+ .catch(function(vError) {
205
+ showError(vError);
206
+ });
207
207
  };
208
208
 
209
- Translation.prototype.openUploadTranslationDialog = function () {
209
+ Translation.prototype.openUploadTranslationDialog = function() {
210
210
  if (!this._oUploadDialogPromise) {
211
211
  this._oUploadDialogPromise = this._createUploadTranslationDialog();
212
212
  }
213
- return this._oUploadDialogPromise.then(function (oUploadDialog) {
213
+ return this._oUploadDialogPromise.then(function(oUploadDialog) {
214
214
  this.getToolbar().addDependent(oUploadDialog);
215
215
  return oUploadDialog.open();
216
216
  }.bind(this));
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @class
37
37
  *
38
38
  * @author SAP SE
39
- * @version 1.115.1
39
+ * @version 1.117.0
40
40
  *
41
41
  * @constructor
42
42
  * @private
@@ -69,8 +69,8 @@ sap.ui.define([
69
69
  this.getToolbar().fireEvent("switchVersion", {version: sVersion});
70
70
  }
71
71
 
72
- function doesActiveVersionExists (aVersions) {
73
- return aVersions.some(function (oVersion) {
72
+ function doesActiveVersionExists(aVersions) {
73
+ return aVersions.some(function(oVersion) {
74
74
  return oVersion.type === Version.Type.Active;
75
75
  });
76
76
  }
@@ -163,7 +163,7 @@ sap.ui.define([
163
163
  sType = Version.Type.Active;
164
164
  }
165
165
  } else {
166
- var oDisplayedVersion = aVersions.find(function (oVersion) {
166
+ var oDisplayedVersion = aVersions.find(function(oVersion) {
167
167
  return oVersion.version === sDisplayedVersion;
168
168
  });
169
169
  if (oDisplayedVersion) {
@@ -234,20 +234,20 @@ sap.ui.define([
234
234
  name: "sap.ui.rta.toolbar.versioning.VersionTitleDialog",
235
235
  id: this.getToolbar().getId() + "_fragment--sapUiRta_activateVersionDialog",
236
236
  controller: {
237
- onConfirmVersioningDialog: function () {
237
+ onConfirmVersioningDialog: function() {
238
238
  var sVersionTitle = this.getToolbar().getControl("activateVersionDialog--versionTitleInput").getValue();
239
239
  this.getToolbar().fireEvent("activate", {versionTitle: sVersionTitle});
240
240
  this._oActivateVersionDialog.close();
241
241
  }.bind(this),
242
- onCancelVersioningDialog: function () {
242
+ onCancelVersioningDialog: function() {
243
243
  this._oActivateVersionDialog.close();
244
244
  }.bind(this),
245
- onVersionTitleLiveChange: function (oEvent) {
245
+ onVersionTitleLiveChange: function(oEvent) {
246
246
  var sValue = oEvent.getParameter("value");
247
247
  this.getToolbar().getControl("activateVersionDialog--confirmVersionTitleButton").setEnabled(!!sValue);
248
248
  }.bind(this)
249
249
  }
250
- }).then(function (oDialog) {
250
+ }).then(function(oDialog) {
251
251
  this._oActivateVersionDialog = oDialog;
252
252
  oDialog.addStyleClass(Utils.getRtaStyleClassName());
253
253
  this.getToolbar().addDependent(this._oActivateVersionDialog);
@@ -257,7 +257,7 @@ sap.ui.define([
257
257
  this.getToolbar().getControl("activateVersionDialog--confirmVersionTitleButton").setEnabled(false);
258
258
  }
259
259
 
260
- return this._oActivateVersionDialogPromise.then(function () {
260
+ return this._oActivateVersionDialogPromise.then(function() {
261
261
  var sTitle = this.oTextResources.getText("TIT_VERSION_TITLE_DIALOG");
262
262
  if (sDisplayedVersion !== Version.Number.Draft) {
263
263
  sTitle = this.oTextResources.getText("TIT_REACTIVATE_VERSION_TITLE_DIALOG");
@@ -17,17 +17,17 @@ function() {
17
17
  * @param {Function} fnCallback - The function should start animation process (e.g. by adding class to the element)
18
18
  * @return {Promise} Returns a Promise performing the animation
19
19
  */
20
- module.waitTransition = function (oElement, fnCallback) {
20
+ module.waitTransition = function(oElement, fnCallback) {
21
21
  if (typeof fnCallback !== "function") {
22
- throw new Error('fnCallback should be a function');
22
+ throw new Error("fnCallback should be a function");
23
23
  }
24
24
 
25
- return new Promise(function (fnResolve) {
26
- oElement.addEventListener('transitionend', fnResolve, {once: true});
25
+ return new Promise(function(fnResolve) {
26
+ oElement.addEventListener("transitionend", fnResolve, {once: true});
27
27
 
28
28
  // perform animation in the next animation frame, normally 16-17ms later.
29
29
  var iTimestampInitial;
30
- var fnAnimCallback = function (iTimestamp) {
30
+ var fnAnimCallback = function(iTimestamp) {
31
31
  if (!iTimestampInitial) {
32
32
  iTimestampInitial = iTimestamp;
33
33
  }