@openui5/sap.ui.rta 1.108.1 → 1.109.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 (205) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +6 -6
  3. package/src/sap/ui/rta/.library +1 -1
  4. package/src/sap/ui/rta/Client.js +1 -1
  5. package/src/sap/ui/rta/RuntimeAuthoring.js +17 -49
  6. package/src/sap/ui/rta/Utils.js +1 -1
  7. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  8. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  9. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  10. package/src/sap/ui/rta/command/AddXML.js +2 -2
  11. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +2 -2
  12. package/src/sap/ui/rta/command/AppDescriptorCommand.js +2 -2
  13. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  14. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  15. package/src/sap/ui/rta/command/Combine.js +1 -1
  16. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  17. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  18. package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -2
  19. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  20. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +14 -14
  21. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +10 -3
  22. package/src/sap/ui/rta/command/ControlVariantSwitch.js +41 -9
  23. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  24. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  25. package/src/sap/ui/rta/command/FlexCommand.js +17 -15
  26. package/src/sap/ui/rta/command/LREPSerializer.js +1 -6
  27. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  28. package/src/sap/ui/rta/command/Move.js +1 -1
  29. package/src/sap/ui/rta/command/Property.js +1 -1
  30. package/src/sap/ui/rta/command/Remove.js +1 -1
  31. package/src/sap/ui/rta/command/Rename.js +1 -1
  32. package/src/sap/ui/rta/command/Resize.js +1 -1
  33. package/src/sap/ui/rta/command/Reveal.js +1 -1
  34. package/src/sap/ui/rta/command/Settings.js +1 -1
  35. package/src/sap/ui/rta/command/Split.js +1 -1
  36. package/src/sap/ui/rta/command/Stack.js +1 -1
  37. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  38. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -2
  39. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  40. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +27 -5
  41. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  42. package/src/sap/ui/rta/enablement/elementActionTest.js +27 -18
  43. package/src/sap/ui/rta/library.js +2 -2
  44. package/src/sap/ui/rta/messagebundle.properties +6 -4
  45. package/src/sap/ui/rta/messagebundle_ar.properties +4 -1
  46. package/src/sap/ui/rta/messagebundle_bg.properties +4 -1
  47. package/src/sap/ui/rta/messagebundle_ca.properties +3 -0
  48. package/src/sap/ui/rta/messagebundle_cs.properties +4 -1
  49. package/src/sap/ui/rta/messagebundle_cy.properties +3 -0
  50. package/src/sap/ui/rta/messagebundle_da.properties +3 -0
  51. package/src/sap/ui/rta/messagebundle_de.properties +3 -0
  52. package/src/sap/ui/rta/messagebundle_el.properties +3 -0
  53. package/src/sap/ui/rta/messagebundle_en.properties +4 -1
  54. package/src/sap/ui/rta/messagebundle_en_GB.properties +4 -1
  55. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +3 -2
  56. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +3 -2
  57. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +3 -0
  58. package/src/sap/ui/rta/messagebundle_es.properties +3 -0
  59. package/src/sap/ui/rta/messagebundle_es_MX.properties +3 -0
  60. package/src/sap/ui/rta/messagebundle_et.properties +3 -0
  61. package/src/sap/ui/rta/messagebundle_fi.properties +3 -0
  62. package/src/sap/ui/rta/messagebundle_fr.properties +3 -0
  63. package/src/sap/ui/rta/messagebundle_fr_CA.properties +4 -1
  64. package/src/sap/ui/rta/messagebundle_hi.properties +4 -1
  65. package/src/sap/ui/rta/messagebundle_hr.properties +4 -1
  66. package/src/sap/ui/rta/messagebundle_hu.properties +3 -0
  67. package/src/sap/ui/rta/messagebundle_id.properties +4 -1
  68. package/src/sap/ui/rta/messagebundle_it.properties +4 -1
  69. package/src/sap/ui/rta/messagebundle_iw.properties +3 -0
  70. package/src/sap/ui/rta/messagebundle_ja.properties +4 -1
  71. package/src/sap/ui/rta/messagebundle_kk.properties +3 -0
  72. package/src/sap/ui/rta/messagebundle_ko.properties +3 -0
  73. package/src/sap/ui/rta/messagebundle_lt.properties +3 -0
  74. package/src/sap/ui/rta/messagebundle_lv.properties +4 -1
  75. package/src/sap/ui/rta/messagebundle_ms.properties +4 -1
  76. package/src/sap/ui/rta/messagebundle_nl.properties +3 -0
  77. package/src/sap/ui/rta/messagebundle_no.properties +4 -1
  78. package/src/sap/ui/rta/messagebundle_pl.properties +4 -1
  79. package/src/sap/ui/rta/messagebundle_pt.properties +4 -1
  80. package/src/sap/ui/rta/messagebundle_pt_PT.properties +3 -0
  81. package/src/sap/ui/rta/messagebundle_ro.properties +4 -1
  82. package/src/sap/ui/rta/messagebundle_ru.properties +4 -1
  83. package/src/sap/ui/rta/messagebundle_sh.properties +3 -0
  84. package/src/sap/ui/rta/messagebundle_sk.properties +3 -0
  85. package/src/sap/ui/rta/messagebundle_sl.properties +4 -1
  86. package/src/sap/ui/rta/messagebundle_sv.properties +4 -1
  87. package/src/sap/ui/rta/messagebundle_th.properties +4 -1
  88. package/src/sap/ui/rta/messagebundle_tr.properties +3 -0
  89. package/src/sap/ui/rta/messagebundle_uk.properties +3 -0
  90. package/src/sap/ui/rta/messagebundle_vi.properties +4 -1
  91. package/src/sap/ui/rta/messagebundle_zh_CN.properties +4 -1
  92. package/src/sap/ui/rta/messagebundle_zh_TW.properties +4 -1
  93. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  94. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  95. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  96. package/src/sap/ui/rta/plugin/CompVariant.js +103 -23
  97. package/src/sap/ui/rta/plugin/ControlVariant.js +117 -49
  98. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  99. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  100. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  101. package/src/sap/ui/rta/plugin/EasyAdd.js +1 -1
  102. package/src/sap/ui/rta/plugin/EasyRemove.js +1 -1
  103. package/src/sap/ui/rta/plugin/LocalReset.js +5 -3
  104. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  105. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  106. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  107. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  108. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -2
  109. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  110. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  111. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  112. package/src/sap/ui/rta/plugin/Split.js +1 -1
  113. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  114. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  116. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  118. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  119. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  120. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  121. package/src/sap/ui/rta/service/Action.js +1 -1
  122. package/src/sap/ui/rta/service/ControllerExtension.js +2 -2
  123. package/src/sap/ui/rta/service/Outline.js +1 -1
  124. package/src/sap/ui/rta/service/Property.js +1 -1
  125. package/src/sap/ui/rta/service/Selection.js +1 -1
  126. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  127. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +26 -9
  128. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +0 -11
  129. package/src/sap/ui/rta/toolbar/Adaptation.js +1 -3
  130. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  131. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  132. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  133. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  134. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  135. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  136. package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +1 -1
  137. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  138. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  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 +1 -1
  142. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  143. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +2 -1
  144. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +10 -9
  145. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +1 -0
  146. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +2 -2
  147. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +2 -2
  148. package/src/sap/ui/rta/appContexts/AppContextsOverviewDialog.js +0 -76
  149. package/src/sap/ui/rta/appContexts/Component.js +0 -31
  150. package/src/sap/ui/rta/appContexts/controller/ManageContexts.controller.js +0 -323
  151. package/src/sap/ui/rta/appContexts/controller/RestAPIConnector.js +0 -22
  152. package/src/sap/ui/rta/appContexts/i18n/i18n.properties +0 -47
  153. package/src/sap/ui/rta/appContexts/i18n/i18n_ar.properties +0 -23
  154. package/src/sap/ui/rta/appContexts/i18n/i18n_bg.properties +0 -23
  155. package/src/sap/ui/rta/appContexts/i18n/i18n_ca.properties +0 -23
  156. package/src/sap/ui/rta/appContexts/i18n/i18n_cs.properties +0 -23
  157. package/src/sap/ui/rta/appContexts/i18n/i18n_cy.properties +0 -23
  158. package/src/sap/ui/rta/appContexts/i18n/i18n_da.properties +0 -23
  159. package/src/sap/ui/rta/appContexts/i18n/i18n_de.properties +0 -23
  160. package/src/sap/ui/rta/appContexts/i18n/i18n_el.properties +0 -23
  161. package/src/sap/ui/rta/appContexts/i18n/i18n_en.properties +0 -23
  162. package/src/sap/ui/rta/appContexts/i18n/i18n_en_GB.properties +0 -23
  163. package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_sappsd.properties +0 -23
  164. package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saprigi.properties +0 -23
  165. package/src/sap/ui/rta/appContexts/i18n/i18n_en_US_saptrc.properties +0 -23
  166. package/src/sap/ui/rta/appContexts/i18n/i18n_es.properties +0 -23
  167. package/src/sap/ui/rta/appContexts/i18n/i18n_es_MX.properties +0 -23
  168. package/src/sap/ui/rta/appContexts/i18n/i18n_et.properties +0 -23
  169. package/src/sap/ui/rta/appContexts/i18n/i18n_fi.properties +0 -23
  170. package/src/sap/ui/rta/appContexts/i18n/i18n_fr.properties +0 -23
  171. package/src/sap/ui/rta/appContexts/i18n/i18n_fr_CA.properties +0 -23
  172. package/src/sap/ui/rta/appContexts/i18n/i18n_hi.properties +0 -23
  173. package/src/sap/ui/rta/appContexts/i18n/i18n_hr.properties +0 -23
  174. package/src/sap/ui/rta/appContexts/i18n/i18n_hu.properties +0 -23
  175. package/src/sap/ui/rta/appContexts/i18n/i18n_id.properties +0 -23
  176. package/src/sap/ui/rta/appContexts/i18n/i18n_it.properties +0 -23
  177. package/src/sap/ui/rta/appContexts/i18n/i18n_iw.properties +0 -23
  178. package/src/sap/ui/rta/appContexts/i18n/i18n_ja.properties +0 -23
  179. package/src/sap/ui/rta/appContexts/i18n/i18n_kk.properties +0 -23
  180. package/src/sap/ui/rta/appContexts/i18n/i18n_ko.properties +0 -23
  181. package/src/sap/ui/rta/appContexts/i18n/i18n_lt.properties +0 -23
  182. package/src/sap/ui/rta/appContexts/i18n/i18n_lv.properties +0 -23
  183. package/src/sap/ui/rta/appContexts/i18n/i18n_ms.properties +0 -23
  184. package/src/sap/ui/rta/appContexts/i18n/i18n_nl.properties +0 -23
  185. package/src/sap/ui/rta/appContexts/i18n/i18n_no.properties +0 -23
  186. package/src/sap/ui/rta/appContexts/i18n/i18n_pl.properties +0 -23
  187. package/src/sap/ui/rta/appContexts/i18n/i18n_pt.properties +0 -23
  188. package/src/sap/ui/rta/appContexts/i18n/i18n_pt_PT.properties +0 -23
  189. package/src/sap/ui/rta/appContexts/i18n/i18n_ro.properties +0 -23
  190. package/src/sap/ui/rta/appContexts/i18n/i18n_ru.properties +0 -23
  191. package/src/sap/ui/rta/appContexts/i18n/i18n_sh.properties +0 -23
  192. package/src/sap/ui/rta/appContexts/i18n/i18n_sk.properties +0 -23
  193. package/src/sap/ui/rta/appContexts/i18n/i18n_sl.properties +0 -23
  194. package/src/sap/ui/rta/appContexts/i18n/i18n_sv.properties +0 -23
  195. package/src/sap/ui/rta/appContexts/i18n/i18n_th.properties +0 -23
  196. package/src/sap/ui/rta/appContexts/i18n/i18n_tr.properties +0 -23
  197. package/src/sap/ui/rta/appContexts/i18n/i18n_uk.properties +0 -23
  198. package/src/sap/ui/rta/appContexts/i18n/i18n_vi.properties +0 -23
  199. package/src/sap/ui/rta/appContexts/i18n/i18n_zh_CN.properties +0 -23
  200. package/src/sap/ui/rta/appContexts/i18n/i18n_zh_TW.properties +0 -23
  201. package/src/sap/ui/rta/appContexts/index.html +0 -25
  202. package/src/sap/ui/rta/appContexts/manifest.json +0 -52
  203. package/src/sap/ui/rta/appContexts/view/EditContextsDialog.fragment.xml +0 -76
  204. package/src/sap/ui/rta/appContexts/view/ManageContexts.view.xml +0 -103
  205. package/src/sap/ui/rta/appContexts/view/SaveAsContextsDialog.fragment.xml +0 -76
package/THIRDPARTY.txt CHANGED
@@ -478,7 +478,7 @@ License: Apache-2.0
478
478
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
479
479
  Contained in: lib/jsdoc/ui5/plugin.js
480
480
 
481
- Component: SAP Theming Base Content, version: 11.1.40
481
+ Component: SAP Theming Base Content, version: 11.1.44
482
482
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
483
483
  License: Apache-2.0
484
484
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.rta",
3
- "version": "1.108.1",
3
+ "version": "1.109.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.rta",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,10 +14,10 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.108.1",
18
- "@openui5/sap.ui.core": "1.108.1",
19
- "@openui5/sap.ui.dt": "1.108.1",
20
- "@openui5/sap.ui.fl": "1.108.1",
21
- "@openui5/sap.ui.layout": "1.108.1"
17
+ "@openui5/sap.m": "1.109.0",
18
+ "@openui5/sap.ui.core": "1.109.0",
19
+ "@openui5/sap.ui.dt": "1.109.0",
20
+ "@openui5/sap.ui.fl": "1.109.0",
21
+ "@openui5/sap.ui.layout": "1.109.0"
22
22
  }
23
23
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.108.1</version>
9
+ <version>1.109.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with RTA controls.</documentation>
12
12
 
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @alias sap.ui.rta.Client
58
58
  * @author SAP SE
59
59
  * @since 1.56.0
60
- * @version 1.108.1
60
+ * @version 1.109.0
61
61
  * @private
62
62
  * @ui5-restricted
63
63
  */
@@ -118,7 +118,7 @@ sap.ui.define([
118
118
  * @class The runtime authoring allows to adapt the fields of a running application.
119
119
  * @extends sap.ui.base.ManagedObject
120
120
  * @author SAP SE
121
- * @version 1.108.1
121
+ * @version 1.109.0
122
122
  * @constructor
123
123
  * @private
124
124
  * @since 1.30
@@ -299,6 +299,19 @@ sap.ui.define([
299
299
  ReloadManager.disableAutomaticStart(sLayer);
300
300
  };
301
301
 
302
+ /**
303
+ * Check if RTA is about to start or starting after a reload
304
+ * e.g. when reloading without personalization changes
305
+ *
306
+ * @public
307
+ * @static
308
+ * @param {sap.ui.fl.Layer} [sLayer] - Active layer, CUSTOMER by default
309
+ * @returns {boolean} Returns true if RTA is about to start or starting
310
+ */
311
+ RuntimeAuthoring.willRTAStartAfterReload = function(sLayer) {
312
+ return ReloadManager.needsAutomaticStart(sLayer || Layer.CUSTOMER);
313
+ };
314
+
302
315
  RuntimeAuthoring.prototype.addDependent = function(oObject, sName, bCreateGetter) {
303
316
  bCreateGetter = typeof bCreateGetter === "undefined" ? true : !!bCreateGetter;
304
317
  if (!(sName in this._dependents)) {
@@ -558,6 +571,7 @@ sap.ui.define([
558
571
  validateFlexEnabled(this);
559
572
  }
560
573
  this._sStatus = STARTED;
574
+ RuntimeAuthoring.disableRestart(Layer.CUSTOMER);
561
575
  this.fireStart({
562
576
  editablePluginsCount: this.getPluginManager().getEditableOverlaysCount()
563
577
  });
@@ -813,51 +827,6 @@ sap.ui.define([
813
827
  }.bind(this));
814
828
  };
815
829
 
816
- /**
817
- * Function to handle ABAP transport of the changes
818
- *
819
- * @returns {Promise} Returns a Promise processing the transport of changes
820
- */
821
- RuntimeAuthoring.prototype.transport = function() {
822
- this.getPluginManager().handleStopCutPaste();
823
-
824
- BusyIndicator.show(500);
825
- return this._serializeToLrep().then(function() {
826
- BusyIndicator.hide();
827
- var bVariantByStartupParameter = FlexUtils.isVariantByStartupParameter(this._oRootControl);
828
- var bAppVariantRunning = SmartVariantManagementApplyAPI.isApplicationVariant({control: this._oRootControl}) && !bVariantByStartupParameter;
829
- return (bAppVariantRunning ? RtaAppVariantFeature.getAppVariantDescriptor(this._oRootControl) : Promise.resolve())
830
- .then(function(oAppVariantDescriptor) {
831
- var aAppVariantDescriptor = [];
832
- if (oAppVariantDescriptor) {
833
- aAppVariantDescriptor.push(oAppVariantDescriptor);
834
- }
835
- return PersistenceWriteAPI.publish({
836
- selector: this.getRootControlInstance(),
837
- styleClass: Utils.getRtaStyleClassName(),
838
- layer: this.getLayer(),
839
- appVariantDescriptors: aAppVariantDescriptor
840
- })
841
- .then(function(sMessage) {
842
- if (sMessage !== "Error" && sMessage !== "Cancel") {
843
- MessageToast.show(sMessage);
844
- if (this.getShowToolbars()) {
845
- PersistenceWriteAPI.getResetAndPublishInfo({
846
- selector: this.getRootControlInstance(),
847
- layer: this.getLayer()
848
- })
849
- .then(function(oPublishAndResetInfo) {
850
- this._oToolbarControlsModel.setProperty("/publishEnabled", oPublishAndResetInfo.isPublishEnabled);
851
- this._oToolbarControlsModel.setProperty("/restoreEnabled", oPublishAndResetInfo.isResetEnabled);
852
- }.bind(this));
853
- }
854
- }
855
- }.bind(this));
856
- }.bind(this));
857
- }.bind(this))
858
- .catch(showTechnicalError);
859
- };
860
-
861
830
  RuntimeAuthoring.prototype.undo = function() {
862
831
  this.getPluginManager().handleStopCutPaste();
863
832
  return this.getCommandStack().undo();
@@ -1016,7 +985,7 @@ sap.ui.define([
1016
985
  }
1017
986
 
1018
987
  /**
1019
- * Adapt the enablement of undo/redo/reset/transport button
988
+ * Adapt the enablement of undo/redo/reset button
1020
989
  *
1021
990
  * @returns {Promise} Resolves as soon as the MessageBox is closed
1022
991
  */
@@ -1085,7 +1054,7 @@ sap.ui.define([
1085
1054
  }
1086
1055
 
1087
1056
  function onKeyDown(oEvent) {
1088
- // if for example the addField Dialog/transport/reset Popup is open, we don't want the user to be able to undo/redo
1057
+ // if for example the addField Dialog/reset Popup is open, we don't want the user to be able to undo/redo
1089
1058
  var bMacintosh = Device.os.macintosh;
1090
1059
  var bFocusInsideOverlayContainer = Overlay.getOverlayContainer().get(0).contains(document.activeElement);
1091
1060
  var bFocusInsideRtaToolbar = this.getShowToolbars() && this.getToolbar().getDomRef().contains(document.activeElement);
@@ -1333,7 +1302,6 @@ sap.ui.define([
1333
1302
  };
1334
1303
 
1335
1304
  if (!bUserLayer) {
1336
- oProperties.transport = this.transport.bind(this);
1337
1305
  oProperties.publishVersion = onPublishVersion.bind(this);
1338
1306
  oProperties.undo = this.undo.bind(this);
1339
1307
  oProperties.redo = this.redo.bind(this);
@@ -45,7 +45,7 @@ function(
45
45
  *
46
46
  * @namespace
47
47
  * @author SAP SE
48
- * @version 1.108.1
48
+ * @version 1.109.0
49
49
  *
50
50
  * @private
51
51
  * @since 1.30
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.base.ManagedObject
26
26
  * @author SAP SE
27
- * @version 1.108.1
27
+ * @version 1.109.0
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.108.1
19
+ * @version 1.109.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.75
@@ -14,7 +14,7 @@ sap.ui.define([
14
14
  * @class
15
15
  * @extends sap.ui.rta.command.FlexCommand
16
16
  * @author SAP SE
17
- * @version 1.108.1
17
+ * @version 1.109.0
18
18
  * @constructor
19
19
  * @private
20
20
  * @since 1.78
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.108.1
19
+ * @version 1.109.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.54
@@ -73,7 +73,7 @@ sap.ui.define([
73
73
  AddXML.prototype._applyChange = function(vChange) {
74
74
  // preload the module to be applicable in this session
75
75
  var mModulePreloads = {};
76
- mModulePreloads[vChange.getModuleName()] = this.getFragment();
76
+ mModulePreloads[vChange.getFlexObjectMetadata().moduleName] = this.getFragment();
77
77
  sap.ui.require.preload(mModulePreloads);
78
78
 
79
79
  return FlexCommand.prototype._applyChange.apply(this, arguments);
@@ -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.108.1
27
+ * @version 1.109.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.76
@@ -78,7 +78,7 @@ sap.ui.define([
78
78
  AddXMLAtExtensionPoint.prototype._applyChange = function(vChange) {
79
79
  // preload the module to be applicable in this session
80
80
  var mModulePreloads = {};
81
- mModulePreloads[vChange.getModuleName()] = this.getFragment();
81
+ mModulePreloads[vChange.getFlexObjectMetadata().moduleName] = this.getFragment();
82
82
  sap.ui.require.preload(mModulePreloads);
83
83
 
84
84
  var oChange = vChange.change || vChange;
@@ -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.108.1
24
+ * @version 1.109.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -75,7 +75,7 @@ sap.ui.define([
75
75
 
76
76
  /**
77
77
  * Retrieves the prepared change for e.g. undo execution.
78
- * @return {sap.ui.fl.Change} Returns change after being created and stored
78
+ * @return {sap.ui.fl.apply._internal.flexObjects.UIChange} Returns change after being created and stored
79
79
  */
80
80
  AppDescriptorCommand.prototype.getPreparedChange = function () {
81
81
  return this._oPreparedChange;
@@ -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.108.1
16
+ * @version 1.109.0
17
17
  *
18
18
  * @constructor
19
19
  * @private
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @class
27
27
  * @extends sap.ui.rta.command.FlexCommand
28
28
  * @author SAP SE
29
- * @version 1.108.1
29
+ * @version 1.109.0
30
30
  * @constructor
31
31
  * @private
32
32
  * @since 1.38
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  * @extends sap.ui.rta.command.FlexCommand
18
18
  * @author SAP SE
19
- * @version 1.108.1
19
+ * @version 1.109.0
20
20
  * @constructor
21
21
  * @private
22
22
  * @since 1.46
@@ -485,7 +485,7 @@ sap.ui.define([
485
485
  * @extends sap.ui.base.ManagedObject
486
486
  *
487
487
  * @author SAP SE
488
- * @version 1.108.1
488
+ * @version 1.109.0
489
489
  *
490
490
  * @constructor
491
491
  * @private
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @extends sap.ui.rta.command.BaseCommand
22
22
  *
23
23
  * @author SAP SE
24
- * @version 1.108.1
24
+ * @version 1.109.0
25
25
  *
26
26
  * @constructor
27
27
  * @private
@@ -7,11 +7,13 @@ sap.ui.define([
7
7
  "sap/ui/rta/command/BaseCommand",
8
8
  "sap/ui/rta/library",
9
9
  "sap/ui/core/util/reflection/JsControlTreeModifier",
10
+ "sap/ui/fl/apply/api/ControlVariantApplyAPI",
10
11
  "sap/ui/fl/Utils"
11
12
  ], function(
12
13
  BaseCommand,
13
14
  rtaLibrary,
14
15
  JsControlTreeModifier,
16
+ ControlVariantApplyAPI,
15
17
  flUtils
16
18
  ) {
17
19
  "use strict";
@@ -22,7 +24,7 @@ sap.ui.define([
22
24
  * @class
23
25
  * @extends sap.ui.rta.command.BaseCommand
24
26
  * @author SAP SE
25
- * @version 1.108.1
27
+ * @version 1.109.0
26
28
  * @constructor
27
29
  * @private
28
30
  * @since 1.52
@@ -67,7 +69,7 @@ sap.ui.define([
67
69
  ControlVariantConfigure.prototype.execute = function() {
68
70
  var oVariantManagementControl = this.getControl();
69
71
  this.oAppComponent = flUtils.getAppComponentForControl(oVariantManagementControl);
70
- this.oModel = this.oAppComponent.getModel(flUtils.VARIANT_MODEL_NAME);
72
+ this.oModel = this.oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
71
73
  this.sVariantManagementReference = JsControlTreeModifier.getSelector(oVariantManagementControl, this.oAppComponent).id;
72
74
 
73
75
  this._aPreparedChanges = [];
@@ -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.108.1
23
+ * @version 1.109.0
24
24
  * @constructor
25
25
  * @private
26
26
  * @since 1.86
@@ -4,19 +4,21 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/rta/command/BaseCommand",
8
- "sap/ui/rta/library",
7
+ "sap/ui/core/Core",
9
8
  "sap/ui/core/util/reflection/JsControlTreeModifier",
10
- "sap/ui/rta/Utils",
11
9
  "sap/ui/fl/Utils",
12
- "sap/ui/fl/write/api/ContextSharingAPI"
10
+ "sap/ui/fl/write/api/ContextSharingAPI",
11
+ "sap/ui/rta/command/BaseCommand",
12
+ "sap/ui/rta/library",
13
+ "sap/ui/rta/Utils"
13
14
  ], function(
14
- BaseCommand,
15
- rtaLibrary,
15
+ Core,
16
16
  JsControlTreeModifier,
17
- rtaUtils,
18
17
  flUtils,
19
- ContextSharingAPI
18
+ ContextSharingAPI,
19
+ BaseCommand,
20
+ rtaLibrary,
21
+ rtaUtils
20
22
  ) {
21
23
  "use strict";
22
24
 
@@ -26,7 +28,7 @@ sap.ui.define([
26
28
  * @class
27
29
  * @extends sap.ui.rta.command.BaseCommand
28
30
  * @author SAP SE
29
- * @version 1.108.1
31
+ * @version 1.109.0
30
32
  * @constructor
31
33
  * @private
32
34
  * @since 1.86
@@ -146,11 +148,9 @@ sap.ui.define([
146
148
 
147
149
  return this.oModel.removeVariant(mPropertyBag, true)
148
150
  .then(function() {
149
- this._aControlChanges.forEach(function(oChange) {
150
- this.oModel.oFlexController.addPreparedChange(oChange, this.oAppComponent);
151
- var oControl = sap.ui.getCore().byId(JsControlTreeModifier.getControlIdBySelector(oChange.getSelector(), this.oAppComponent));
152
- this.oModel.oFlexController.applyChange(oChange, oControl);
153
- }.bind(this));
151
+ return this.oModel.addAndApplyChangesOnVariant(this._aControlChanges);
152
+ }.bind(this))
153
+ .then(function() {
154
154
  this.oModel.getData()[this.sVariantManagementReference].defaultVariant = this.getSourceDefaultVariant();
155
155
  this.oModel.getData()[this.sVariantManagementReference].originalDefaultVariant = this.getSourceDefaultVariant();
156
156
  this._aPreparedChanges = null;
@@ -7,8 +7,15 @@ sap.ui.define([
7
7
  "sap/ui/rta/command/BaseCommand",
8
8
  "sap/ui/rta/library",
9
9
  "sap/ui/core/util/reflection/JsControlTreeModifier",
10
+ "sap/ui/fl/apply/api/ControlVariantApplyAPI",
10
11
  "sap/ui/fl/Utils"
11
- ], function(BaseCommand, rtaLibrary, JsControlTreeModifier, flUtils) {
12
+ ], function(
13
+ BaseCommand,
14
+ rtaLibrary,
15
+ JsControlTreeModifier,
16
+ ControlVariantApplyAPI,
17
+ flUtils
18
+ ) {
12
19
  "use strict";
13
20
 
14
21
  /**
@@ -17,7 +24,7 @@ sap.ui.define([
17
24
  * @class
18
25
  * @extends sap.ui.rta.command.BaseCommand
19
26
  * @author SAP SE
20
- * @version 1.108.1
27
+ * @version 1.109.0
21
28
  * @constructor
22
29
  * @private
23
30
  * @since 1.50
@@ -65,7 +72,7 @@ sap.ui.define([
65
72
  var oVariantManagementControlBinding = oVariantManagementControl.getTitle().getBinding("text");
66
73
 
67
74
  this.oAppComponent = flUtils.getAppComponentForControl(oVariantManagementControl);
68
- this.oModel = this.oAppComponent.getModel(flUtils.VARIANT_MODEL_NAME);
75
+ this.oModel = this.oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
69
76
  this.sVariantManagementReference = JsControlTreeModifier.getSelector(oVariantManagementControl, this.oAppComponent).id;
70
77
  this.sCurrentVariant = this.oModel.getCurrentVariantReference(this.sVariantManagementReference);
71
78
 
@@ -4,13 +4,15 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/rta/command/BaseCommand",
8
7
  "sap/ui/core/util/reflection/JsControlTreeModifier",
9
- "sap/ui/fl/Utils"
8
+ "sap/ui/fl/apply/api/ControlVariantApplyAPI",
9
+ "sap/ui/fl/Utils",
10
+ "sap/ui/rta/command/BaseCommand"
10
11
  ], function(
11
- BaseCommand,
12
12
  JsControlTreeModifier,
13
- flUtils
13
+ ControlVariantApplyAPI,
14
+ flUtils,
15
+ BaseCommand
14
16
  ) {
15
17
  "use strict";
16
18
 
@@ -20,7 +22,7 @@ sap.ui.define([
20
22
  * @class
21
23
  * @extends sap.ui.rta.command.BaseCommand
22
24
  * @author SAP SE
23
- * @version 1.108.1
25
+ * @version 1.109.0
24
26
  * @constructor
25
27
  * @private
26
28
  * @since 1.50
@@ -35,6 +37,9 @@ sap.ui.define([
35
37
  },
36
38
  sourceVariantReference: {
37
39
  type: "string"
40
+ },
41
+ discardVariantContent: {
42
+ type: "boolean"
38
43
  }
39
44
  },
40
45
  associations: {},
@@ -42,7 +47,15 @@ sap.ui.define([
42
47
  }
43
48
  });
44
49
 
45
- ControlVariantSwitch.prototype._getAppComponent = function () {
50
+ function discardVariantContent(sVReference) {
51
+ return this.oModel.eraseDirtyChangesOnVariant(this.sVariantManagementReference, sVReference)
52
+ .then(function(aDirtyChanges) {
53
+ this._aSourceVariantDirtyChanges = aDirtyChanges;
54
+ this.oModel.checkUpdate(true);
55
+ }.bind(this));
56
+ }
57
+
58
+ ControlVariantSwitch.prototype._getAppComponent = function() {
46
59
  var oElement = this.getElement();
47
60
  return oElement ? flUtils.getAppComponentForControl(oElement) : this.getSelector().appComponent;
48
61
  };
@@ -50,6 +63,7 @@ sap.ui.define([
50
63
 
51
64
  /**
52
65
  * Template Method to implement execute logic, with ensure precondition Element is available.
66
+ *
53
67
  * @public
54
68
  * @returns {Promise} Returns resolve after execution
55
69
  */
@@ -58,9 +72,17 @@ sap.ui.define([
58
72
  var oAppComponent = this._getAppComponent();
59
73
  var sNewVariantReference = this.getTargetVariantReference();
60
74
 
61
- this.oModel = oAppComponent.getModel(flUtils.VARIANT_MODEL_NAME);
75
+ this.oModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
62
76
  this.sVariantManagementReference = JsControlTreeModifier.getSelector(oElement, oAppComponent).id;
63
- return this._updateModelVariant(sNewVariantReference, oAppComponent);
77
+
78
+ return Promise.resolve()
79
+ .then(function() {
80
+ if (this.getDiscardVariantContent()) {
81
+ return discardVariantContent.call(this, this.getSourceVariantReference());
82
+ }
83
+ return undefined;
84
+ }.bind(this))
85
+ .then(this._updateModelVariant.bind(this, sNewVariantReference, oAppComponent));
64
86
  };
65
87
 
66
88
  /**
@@ -71,10 +93,20 @@ sap.ui.define([
71
93
  ControlVariantSwitch.prototype.undo = function() {
72
94
  var sOldVariantReference = this.getSourceVariantReference();
73
95
  var oAppComponent = this._getAppComponent();
96
+
97
+ if (this.getDiscardVariantContent()) {
98
+ return this.oModel.addAndApplyChangesOnVariant(this._aSourceVariantDirtyChanges)
99
+ .then(function() {
100
+ this._aSourceVariantDirtyChanges = null;
101
+ this.oModel.checkUpdate(true);
102
+ return this._updateModelVariant(sOldVariantReference, oAppComponent);
103
+ }.bind(this));
104
+ }
105
+
74
106
  return this._updateModelVariant(sOldVariantReference, oAppComponent);
75
107
  };
76
108
 
77
- ControlVariantSwitch.prototype._updateModelVariant = function (sVariantReference, oAppComponent) {
109
+ ControlVariantSwitch.prototype._updateModelVariant = function(sVariantReference, oAppComponent) {
78
110
  if (this.getTargetVariantReference() !== this.getSourceVariantReference()) {
79
111
  return this.oModel.updateCurrentVariant({
80
112
  variantManagementReference: this.sVariantManagementReference,
@@ -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.108.1
15
+ * @version 1.109.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.34
@@ -12,7 +12,7 @@ sap.ui.define(["sap/ui/rta/command/FlexCommand"], function(FlexCommand) {
12
12
  * @class
13
13
  * @extends sap.ui.rta.command.FlexCommand
14
14
  * @author SAP SE
15
- * @version 1.108.1
15
+ * @version 1.109.0
16
16
  * @constructor
17
17
  * @private
18
18
  * @since 1.62
@@ -4,23 +4,25 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
7
- "sap/ui/rta/command/BaseCommand",
8
- "sap/ui/rta/library",
9
- "sap/ui/core/util/reflection/JsControlTreeModifier",
10
- "sap/ui/fl/Utils",
11
- "sap/base/Log",
12
7
  "sap/base/util/merge",
8
+ "sap/base/util/values",
9
+ "sap/base/Log",
10
+ "sap/ui/core/util/reflection/JsControlTreeModifier",
11
+ "sap/ui/fl/apply/api/ControlVariantApplyAPI",
13
12
  "sap/ui/fl/write/api/ChangesWriteAPI",
14
- "sap/base/util/values"
13
+ "sap/ui/fl/Utils",
14
+ "sap/ui/rta/command/BaseCommand",
15
+ "sap/ui/rta/library"
15
16
  ], function(
16
- BaseCommand,
17
- rtaLibrary,
18
- JsControlTreeModifier,
19
- FlUtils,
20
- Log,
21
17
  merge,
18
+ objectValues,
19
+ Log,
20
+ JsControlTreeModifier,
21
+ ControlVariantApplyAPI,
22
22
  ChangesWriteAPI,
23
- objectValues
23
+ FlUtils,
24
+ BaseCommand,
25
+ rtaLibrary
24
26
  ) {
25
27
  "use strict";
26
28
 
@@ -31,7 +33,7 @@ sap.ui.define([
31
33
  * @extends sap.ui.rta.command.BaseCommand
32
34
  *
33
35
  * @author SAP SE
34
- * @version 1.108.1
36
+ * @version 1.109.0
35
37
  *
36
38
  * @constructor
37
39
  * @private
@@ -195,7 +197,7 @@ sap.ui.define([
195
197
  mChangeSpecificData = merge({}, mChangeSpecificData, mFlexSettings);
196
198
  }
197
199
  mChangeSpecificData.jsOnly = this.getJsOnly();
198
- var oModel = this.getAppComponent().getModel(FlUtils.VARIANT_MODEL_NAME);
200
+ var oModel = this.getAppComponent().getModel(ControlVariantApplyAPI.getVariantModelName());
199
201
  var sVariantReference;
200
202
  if (oModel && sVariantManagementReference) {
201
203
  sVariantReference = oModel.getCurrentVariantReference(sVariantManagementReference);
@@ -237,7 +239,7 @@ sap.ui.define([
237
239
 
238
240
  /**
239
241
  * @private
240
- * @param {sap.ui.fl.Change|Object} vChange Change object or map containing the change object
242
+ * @param {sap.ui.fl.apply._internal.flexObjects.UIChange|Object} vChange Change object or map containing the change object
241
243
  * @returns {Promise} Returns an empty promise
242
244
  */
243
245
  FlexCommand.prototype._applyChange = function(vChange) {
@@ -8,7 +8,6 @@ sap.ui.define([
8
8
  "sap/ui/rta/command/FlexCommand",
9
9
  "sap/ui/rta/command/AppDescriptorCommand",
10
10
  "sap/ui/fl/Utils",
11
- "sap/ui/fl/Change",
12
11
  "sap/ui/dt/ElementUtil",
13
12
  "sap/base/Log",
14
13
  "sap/ui/fl/write/api/PersistenceWriteAPI"
@@ -17,7 +16,6 @@ sap.ui.define([
17
16
  FlexCommand,
18
17
  AppDescriptorCommand,
19
18
  FlUtils,
20
- Change,
21
19
  ElementUtil,
22
20
  Log,
23
21
  PersistenceWriteAPI
@@ -29,7 +27,7 @@ sap.ui.define([
29
27
  * @class
30
28
  * @extends sap.ui.base.ManagedObject
31
29
  * @author SAP SE
32
- * @version 1.108.1
30
+ * @version 1.109.0
33
31
  * @constructor
34
32
  * @private
35
33
  * @since 1.42
@@ -114,9 +112,6 @@ sap.ui.define([
114
112
  var oAppComponent = oCommand.getAppComponent();
115
113
  if (oAppComponent) {
116
114
  var oPreparedChange = oCommand.getPreparedChange();
117
- if (oPreparedChange.getState() === Change.states.DELETED) {
118
- oPreparedChange.setState(Change.states.NEW);
119
- }
120
115
  if (!this._isPersistedChange(oPreparedChange)) {
121
116
  PersistenceWriteAPI.add({change: oCommand.getPreparedChange(), selector: oAppComponent});
122
117
  }