@openui5/sap.ui.fl 1.84.20 → 1.84.21

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 (188) hide show
  1. package/package.json +3 -3
  2. package/src/sap/ui/fl/.library +2 -2
  3. package/src/sap/ui/fl/Cache.js +2 -2
  4. package/src/sap/ui/fl/Change.js +1 -1
  5. package/src/sap/ui/fl/ChangePersistence.js +10 -12
  6. package/src/sap/ui/fl/ChangePersistenceFactory.js +2 -2
  7. package/src/sap/ui/fl/ControlPersonalizationAPI.js +2 -2
  8. package/src/sap/ui/fl/EventHistory.js +2 -2
  9. package/src/sap/ui/fl/FakeLrepConnector.js +3 -7
  10. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +2 -2
  11. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +2 -2
  12. package/src/sap/ui/fl/FakeLrepLocalStorage.js +2 -2
  13. package/src/sap/ui/fl/FlexController.js +35 -18
  14. package/src/sap/ui/fl/FlexControllerFactory.js +2 -2
  15. package/src/sap/ui/fl/Layer.js +1 -1
  16. package/src/sap/ui/fl/LayerUtils.js +2 -2
  17. package/src/sap/ui/fl/PreprocessorImpl.js +2 -2
  18. package/src/sap/ui/fl/RegistrationDelegator.js +2 -2
  19. package/src/sap/ui/fl/Utils.js +2 -2
  20. package/src/sap/ui/fl/Variant.js +2 -2
  21. package/src/sap/ui/fl/XmlPreprocessorImpl.js +2 -2
  22. package/src/sap/ui/fl/apply/_internal/ChangesController.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +2 -2
  24. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/Applier.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +2 -2
  27. package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +2 -2
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyUtil.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +2 -2
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +2 -2
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +2 -2
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +2 -2
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +2 -2
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +2 -2
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +2 -2
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +2 -2
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +2 -2
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +2 -2
  42. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +3 -5
  44. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +2 -2
  47. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +2 -2
  48. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +2 -2
  49. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +2 -2
  50. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +2 -2
  51. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +2 -2
  52. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +2 -2
  53. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +2 -2
  54. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +2 -2
  55. package/src/sap/ui/fl/apply/_internal/flexState/prepareAppDescriptorMap.js +1 -1
  56. package/src/sap/ui/fl/apply/_internal/flexState/prepareChangesMap.js +1 -1
  57. package/src/sap/ui/fl/apply/_internal/flexState/prepareCompVariantsMap.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/flexState/prepareVariantsMap.js +1 -1
  59. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +2 -2
  60. package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +1 -1
  61. package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +1 -1
  62. package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +1 -1
  63. package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +1 -1
  64. package/src/sap/ui/fl/changeHandler/AddIFrame.js +2 -2
  65. package/src/sap/ui/fl/changeHandler/AddXML.js +2 -2
  66. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +2 -2
  67. package/src/sap/ui/fl/changeHandler/Base.js +2 -2
  68. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +2 -2
  69. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +2 -2
  70. package/src/sap/ui/fl/changeHandler/BaseRename.js +2 -2
  71. package/src/sap/ui/fl/changeHandler/BaseTreeModifier.js +1 -1
  72. package/src/sap/ui/fl/changeHandler/HideControl.js +2 -2
  73. package/src/sap/ui/fl/changeHandler/JsControlTreeModifier.js +1 -1
  74. package/src/sap/ui/fl/changeHandler/MoveControls.js +2 -2
  75. package/src/sap/ui/fl/changeHandler/MoveElements.js +2 -2
  76. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +2 -2
  77. package/src/sap/ui/fl/changeHandler/PropertyChange.js +2 -2
  78. package/src/sap/ui/fl/changeHandler/StashControl.js +2 -2
  79. package/src/sap/ui/fl/changeHandler/UnhideControl.js +2 -2
  80. package/src/sap/ui/fl/changeHandler/UnstashControl.js +2 -2
  81. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +2 -2
  82. package/src/sap/ui/fl/changeHandler/XmlTreeModifier.js +1 -1
  83. package/src/sap/ui/fl/changeHandler/common/createIFrame.js +1 -1
  84. package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +1 -1
  85. package/src/sap/ui/fl/changeHandler/common/revertAddedControls.js +1 -1
  86. package/src/sap/ui/fl/codeExt/CodeExtManager.js +2 -2
  87. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +5 -5
  88. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +2 -2
  89. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +2 -2
  90. package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +1 -1
  91. package/src/sap/ui/fl/designtime/library.designtime.js +1 -1
  92. package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +1 -1
  93. package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +1 -1
  94. package/src/sap/ui/fl/fieldExt/Access.js +2 -2
  95. package/src/sap/ui/fl/initial/_internal/Storage.js +2 -2
  96. package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -1
  97. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -2
  98. package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +1 -1
  99. package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +1 -1
  100. package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +1 -1
  101. package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +1 -1
  102. package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +1 -1
  103. package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +2 -2
  104. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +2 -2
  105. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +2 -2
  106. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +2 -2
  107. package/src/sap/ui/fl/interfaces/Delegate.js +2 -2
  108. package/src/sap/ui/fl/library.js +10 -10
  109. package/src/sap/ui/fl/library.support.js +2 -3
  110. package/src/sap/ui/fl/registry/ChangeHandlerRegistration.js +1 -1
  111. package/src/sap/ui/fl/registry/ChangeRegistry.js +2 -2
  112. package/src/sap/ui/fl/registry/ChangeRegistryItem.js +2 -2
  113. package/src/sap/ui/fl/registry/ChangeTypeMetadata.js +2 -2
  114. package/src/sap/ui/fl/registry/Settings.js +1 -1
  115. package/src/sap/ui/fl/registry/SimpleChanges.js +2 -2
  116. package/src/sap/ui/fl/requireAsync.js +1 -1
  117. package/src/sap/ui/fl/support/Flexibility.js +2 -2
  118. package/src/sap/ui/fl/support/apps/contentbrowser/Component.js +1 -1
  119. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +2 -2
  120. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +2 -2
  121. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +2 -2
  122. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +2 -2
  123. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +2 -2
  124. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +2 -2
  125. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +2 -2
  126. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/Component.js +1 -1
  127. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/controller/Root.controller.js +1 -1
  128. package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/helper/Extractor.js +1 -1
  129. package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +2 -2
  130. package/src/sap/ui/fl/themes/base/library.source.less +1 -1
  131. package/src/sap/ui/fl/themes/sap_hcb/library.source.less +1 -1
  132. package/src/sap/ui/fl/transport/TransportDialog.js +1 -1
  133. package/src/sap/ui/fl/transport/TransportSelection.js +2 -2
  134. package/src/sap/ui/fl/util/IFrame.flexibility.js +1 -1
  135. package/src/sap/ui/fl/util/IFrame.js +2 -2
  136. package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
  137. package/src/sap/ui/fl/util/ManagedObjectModel.js +2 -2
  138. package/src/sap/ui/fl/util/getContainerUserInfo.js +1 -1
  139. package/src/sap/ui/fl/variants/VariantManagement.js +1 -1
  140. package/src/sap/ui/fl/variants/VariantModel.js +2 -2
  141. package/src/sap/ui/fl/write/_internal/SaveAs.js +1 -1
  142. package/src/sap/ui/fl/write/_internal/Storage.js +2 -2
  143. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +2 -2
  144. package/src/sap/ui/fl/write/_internal/Versions.js +2 -2
  145. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +2 -2
  146. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +2 -2
  147. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
  148. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +2 -2
  149. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +2 -2
  150. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +2 -2
  151. package/src/sap/ui/fl/write/_internal/condenser/Utils.js +1 -1
  152. package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +1 -1
  153. package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +1 -1
  154. package/src/sap/ui/fl/write/_internal/condenser/classifications/LastOneWins.js +1 -1
  155. package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +1 -1
  156. package/src/sap/ui/fl/write/_internal/condenser/classifications/Reverse.js +1 -1
  157. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +2 -2
  158. package/src/sap/ui/fl/write/_internal/connectors/JsObjectConnector.js +1 -1
  159. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +2 -2
  160. package/src/sap/ui/fl/write/_internal/connectors/LocalStorageConnector.js +1 -1
  161. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +2 -2
  162. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +2 -2
  163. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +2 -2
  164. package/src/sap/ui/fl/write/_internal/connectors/ObjectStorageConnector.js +1 -1
  165. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +2 -2
  166. package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +1 -1
  167. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +2 -2
  168. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +2 -2
  169. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +2 -2
  170. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +2 -2
  171. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +2 -2
  172. package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +1 -1
  173. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +2 -2
  174. package/src/sap/ui/fl/write/_internal/transport/Transports.js +2 -2
  175. package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +1 -1
  176. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +1 -1
  177. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +1 -1
  178. package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +1 -1
  179. package/src/sap/ui/fl/write/api/FeaturesAPI.js +1 -1
  180. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +3 -2
  181. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +1 -1
  182. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +1 -1
  183. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -1
  184. package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +1 -1
  185. package/src/sap/ui/fl/write/api/VersionsAPI.js +1 -1
  186. package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +1 -1
  187. package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +1 -1
  188. package/src/sap/ui/fl/write/connectors/BaseConnector.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.fl",
3
- "version": "1.84.20",
3
+ "version": "1.84.21",
4
4
  "description": "OpenUI5 UI Library sap.ui.fl",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.84.20",
18
- "@openui5/sap.ui.core": "1.84.20"
17
+ "@openui5/sap.m": "1.84.21",
18
+ "@openui5/sap.ui.core": "1.84.21"
19
19
  }
20
20
  }
@@ -4,9 +4,9 @@
4
4
  <name>sap.ui.fl</name>
5
5
  <vendor>SAP SE</vendor>
6
6
  <copyright>OpenUI5
7
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
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.84.20</version>
9
+ <version>1.84.21</version>
10
10
 
11
11
  <documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
12
12
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -24,7 +24,7 @@ function(
24
24
  * @alias sap.ui.fl.Cache
25
25
  * @experimental Since 1.25.0
26
26
  * @author SAP SE
27
- * @version 1.84.20
27
+ * @version 1.84.21
28
28
  */
29
29
  var Cache = function() {};
30
30
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -850,26 +850,22 @@ sap.ui.define([
850
850
  /**
851
851
  * Removes unsaved changes and reverts these.
852
852
  *
853
- * @param {string} sLayer - Layer for which changes shall be deleted
853
+ * @param {string|string[]} vLayer - Layer or multiple layers for which changes shall be deleted
854
854
  * @param {sap.ui.core.Component} oComponent - Component instance
855
- * @param {string} oControl - Control for which the changes should be removed
855
+ * @param {string} [oControl] - Control for which the changes should be deleted. If omitted, all changes for the app component are considered.
856
856
  * @param {string} [sGenerator] - Generator of changes (optional)
857
857
  * @param {string[]} [aChangeTypes] - Types of changes (optional)
858
858
  *
859
859
  * @returns {Promise} Promise that resolves after the deletion took place
860
860
  */
861
- ChangePersistence.prototype.removeDirtyChanges = function(sLayer, oComponent, oControl, sGenerator, aChangeTypes) {
862
- if (!oControl) {
863
- Log.error("The selectorId must be provided");
864
- return Promise.reject("The selectorId must be provided");
865
- }
866
-
861
+ ChangePersistence.prototype.removeDirtyChanges = function(vLayer, oComponent, oControl, sGenerator, aChangeTypes) {
862
+ var aLayers = [].concat(vLayer);
867
863
  var aDirtyChanges = this._aDirtyChanges;
868
864
 
869
865
  var aChangesToBeRemoved = aDirtyChanges.filter(function (oChange) {
870
866
  var bChangeValid = true;
871
867
 
872
- if (oChange.getLayer() !== sLayer) {
868
+ if (aLayers.indexOf(oChange.getLayer()) === -1) {
873
869
  return false;
874
870
  }
875
871
 
@@ -877,8 +873,10 @@ sap.ui.define([
877
873
  return false;
878
874
  }
879
875
 
880
- var vSelector = oChange.getSelector();
881
- bChangeValid = oControl.getId() === JsControlTreeModifier.getControlIdBySelector(vSelector, oComponent);
876
+ if (oControl) {
877
+ var vSelector = oChange.getSelector();
878
+ bChangeValid = oControl.getId() === JsControlTreeModifier.getControlIdBySelector(vSelector, oComponent);
879
+ }
882
880
 
883
881
  if (aChangeTypes) {
884
882
  bChangeValid = bChangeValid && aChangeTypes.indexOf(oChange.getChangeType()) !== -1;
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @alias sap.ui.fl.ChangePersistenceFactory
24
24
  * @experimental Since 1.27.0
25
25
  * @author SAP SE
26
- * @version 1.84.20
26
+ * @version 1.84.21
27
27
  */
28
28
  var ChangePersistenceFactory = {};
29
29
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @author SAP SE
48
48
  * @experimental Since 1.56
49
49
  * @since 1.56
50
- * @version 1.84.20
50
+ * @version 1.84.21
51
51
  * @private
52
52
  * @ui5-restricted
53
53
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -14,7 +14,7 @@ sap.ui.define(function () {
14
14
  * @alias sap.ui.fl.EventHistory
15
15
  * @experimental Since 1.47.0
16
16
  * @author SAP SE
17
- * @version 1.84.20
17
+ * @version 1.84.21
18
18
  */
19
19
  var EventHistory = function () {
20
20
  };
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -88,9 +88,7 @@ sap.ui.define([
88
88
  synchronous: {
89
89
  clearAll: function (oStorage) {
90
90
  var fnRemoveItem = function(sKey) {
91
- var bIsFlexObject = sKey.includes(FL_PREFIX);
92
-
93
- if (!bIsFlexObject) {
91
+ if (sKey.indexOf(FL_PREFIX) === -1) {
94
92
  return;
95
93
  }
96
94
 
@@ -115,9 +113,7 @@ sap.ui.define([
115
113
  getNumberOfChanges: function(oStorage, sReference) {
116
114
  var iCount = 0;
117
115
  Object.keys(oStorage).map(function(sKey) {
118
- var bIsFlexObject = sKey.includes(FL_PREFIX);
119
-
120
- if (!bIsFlexObject) {
116
+ if (sKey.indexOf(FL_PREFIX) === -1) {
121
117
  return;
122
118
  }
123
119
  var oFlexObject = JSON.parse(oStorage.getItem(sKey));
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -20,7 +20,7 @@ function(
20
20
  * @class
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.84.20
23
+ * @version 1.84.21
24
24
  *
25
25
  * @private
26
26
  * @static
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -20,7 +20,7 @@ function(
20
20
  * @class
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.84.20
23
+ * @version 1.84.21
24
24
  *
25
25
  * @private
26
26
  * @static
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  *
18
18
  * @author SAP SE
19
- * @version 1.84.20
19
+ * @version 1.84.21
20
20
  *
21
21
  * @private
22
22
  * @static
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  ) {
40
40
  "use strict";
41
41
 
42
- function revertChangesAndUpdateVariantModel(oComponent, aChanges) {
42
+ function revertChangesAndUpdateVariantModel(oComponent, bSkipUrlUpdate, aChanges) {
43
43
  return Promise.resolve()
44
44
  .then(function () {
45
45
  if (aChanges.length !== 0) {
@@ -61,12 +61,14 @@ sap.ui.define([
61
61
  }
62
62
  });
63
63
 
64
- URLHandler.update({
65
- parameters: [],
66
- updateURL: true,
67
- updateHashEntry: true,
68
- model: oModel
69
- });
64
+ if (!bSkipUrlUpdate) {
65
+ URLHandler.update({
66
+ parameters: [],
67
+ updateURL: true,
68
+ updateHashEntry: true,
69
+ model: oModel
70
+ });
71
+ }
70
72
  }
71
73
  }
72
74
 
@@ -83,7 +85,7 @@ sap.ui.define([
83
85
  * @alias sap.ui.fl.FlexController
84
86
  * @experimental Since 1.27.0
85
87
  * @author SAP SE
86
- * @version 1.84.20
88
+ * @version 1.84.21
87
89
  */
88
90
  var FlexController = function(sComponentName) {
89
91
  this._oChangePersistence = undefined;
@@ -434,21 +436,35 @@ sap.ui.define([
434
436
  return Promise.all(aPromises);
435
437
  };
436
438
 
439
+ FlexController.prototype._removeOtherLayerChanges = function(oAppComponent, sLayer, bRemoveOtherLayerChanges) {
440
+ if (bRemoveOtherLayerChanges && sLayer) {
441
+ var aLayersToReset = Object.values(Layer).filter(function(sLayerToCheck) {
442
+ return sLayerToCheck !== sLayer;
443
+ });
444
+ return this.removeDirtyChanges(aLayersToReset, oAppComponent, undefined, undefined, undefined, true);
445
+ }
446
+ return Promise.resolve();
447
+ };
448
+
437
449
  /**
438
450
  * Saves all changes of a persistence instance.
439
451
  *
440
452
  * @param {sap.ui.core.UIComponent} [oAppComponent] - AppComponent instance
441
453
  * @param {boolean} [bSkipUpdateCache=false] - Indicates the cache should not be updated
442
454
  * @param {boolean} [bDraft=false] - Indicates if changes should be written as a draft
455
+ * @param {string} [sLayer] - Layer for which the changes should be saved
456
+ * @param {boolean} [bRemoveOtherLayerChanges=false] - Whether to remove changes on other layers before saving
443
457
  * @returns {Promise} resolving with an array of responses or rejecting with the first error
444
458
  * @public
445
459
  */
446
- FlexController.prototype.saveAll = function(oAppComponent, bSkipUpdateCache, bDraft) {
460
+ FlexController.prototype.saveAll = function(oAppComponent, bSkipUpdateCache, bDraft, sLayer, bRemoveOtherLayerChanges) {
447
461
  var nParentVersion = bDraft ? Versions.getVersionsModel({
448
462
  reference: Utils.normalizeReference(this._sComponentName),
449
463
  layer: Layer.CUSTOMER // only the customer layer has draft active
450
464
  }).getProperty("/persistedVersion") : undefined;
451
- return this._oChangePersistence.saveDirtyChanges(oAppComponent, bSkipUpdateCache, undefined, nParentVersion)
465
+
466
+ return this._removeOtherLayerChanges(oAppComponent, sLayer, bRemoveOtherLayerChanges)
467
+ .then(this._oChangePersistence.saveDirtyChanges.bind(this._oChangePersistence, oAppComponent, bSkipUpdateCache, undefined, nParentVersion))
452
468
  .then(function(oResult) {
453
469
  if (bDraft && oResult && oResult.response) {
454
470
  var vChangeDefinition = oResult.response;
@@ -575,23 +591,24 @@ sap.ui.define([
575
591
  */
576
592
  FlexController.prototype.resetChanges = function(sLayer, sGenerator, oComponent, aSelectorIds, aChangeTypes) {
577
593
  return this._oChangePersistence.resetChanges(sLayer, sGenerator, aSelectorIds, aChangeTypes)
578
- .then(revertChangesAndUpdateVariantModel.bind(this, oComponent));
594
+ .then(revertChangesAndUpdateVariantModel.bind(this, oComponent, undefined));
579
595
  };
580
596
 
581
597
  /**
582
- * Removes unsaved changes and reverts these.
598
+ * Removes unsaved changes and reverts these. If no control is provided, all dirty changes are removed.
583
599
  *
584
- * @param {string} sLayer - Layer for which changes shall be deleted
600
+ * @param {string|string[]} vLayer - Layer or multiple layers for which changes shall be deleted
585
601
  * @param {sap.ui.core.Component} oComponent - Component instance
586
- * @param {sap.ui.core.Control} oControl - Control for which the changes should be removed
602
+ * @param {sap.ui.core.Control} [oControl] - Control for which the changes should be removed
587
603
  * @param {string} [sGenerator] - Generator of changes (optional)
588
604
  * @param {string[]} [aChangeTypes] - Types of changes (optional)
605
+ * @param {boolean} [bSkipUrlUpdate] - Whether to skip soft reload during variant model update
589
606
  *
590
607
  * @returns {Promise} Promise that resolves after the deletion took place
591
608
  */
592
- FlexController.prototype.removeDirtyChanges = function(sLayer, oComponent, oControl, sGenerator, aChangeTypes) {
593
- return this._oChangePersistence.removeDirtyChanges(sLayer, oComponent, oControl, sGenerator, aChangeTypes)
594
- .then(revertChangesAndUpdateVariantModel.bind(this, oComponent));
609
+ FlexController.prototype.removeDirtyChanges = function(vLayer, oComponent, oControl, sGenerator, aChangeTypes, bSkipUrlUpdate) {
610
+ return this._oChangePersistence.removeDirtyChanges(vLayer, oComponent, oControl, sGenerator, aChangeTypes)
611
+ .then(revertChangesAndUpdateVariantModel.bind(this, oComponent, bSkipUrlUpdate));
595
612
  };
596
613
 
597
614
  /**
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @alias sap.ui.fl.FlexControllerFactory
31
31
  * @experimental Since 1.27.0
32
32
  * @author SAP SE
33
- * @version 1.84.20
33
+ * @version 1.84.21
34
34
  */
35
35
  var FlexControllerFactory = {};
36
36
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -39,7 +39,7 @@ function(
39
39
  *
40
40
  * @namespace sap.ui.fl.LayerUtils
41
41
  * @author SAP SE
42
- * @version 1.84.20
42
+ * @version 1.84.21
43
43
  */
44
44
  var LayerUtils = {
45
45
  _mLayersIndex: mLayersIndex,
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -35,7 +35,7 @@ function(
35
35
  * @class
36
36
  * @constructor
37
37
  * @author SAP SE
38
- * @version 1.84.20
38
+ * @version 1.84.21
39
39
  * @experimental Since 1.27.0
40
40
  */
41
41
  var PreprocessorImpl = function() {};
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @class
41
41
  * @constructor
42
42
  * @author SAP SE
43
- * @version 1.84.20
43
+ * @version 1.84.21
44
44
  * @experimental Since 1.43.0
45
45
  */
46
46
  var RegistrationDelegator = {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -45,7 +45,7 @@ function(
45
45
  * @namespace
46
46
  * @alias sap.ui.fl.Utils
47
47
  * @author SAP SE
48
- * @version 1.84.20
48
+ * @version 1.84.21
49
49
  * @experimental Since 1.25.0
50
50
  */
51
51
  var Utils = {
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @class Variant class.
34
34
  * @extends sap.ui.base.ManagedObject
35
35
  * @author SAP SE
36
- * @version 1.84.20
36
+ * @version 1.84.21
37
37
  * @alias sap.ui.fl.Variant
38
38
  * @experimental Since 1.52.0
39
39
  */
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @class
27
27
  * @constructor
28
28
  * @author SAP SE
29
- * @version 1.84.20
29
+ * @version 1.84.21
30
30
  * @experimental Since 1.27.0
31
31
  */
32
32
  var XmlPreprocessorImpl = function() {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
  sap.ui.define([
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  *
22
22
  * @private
23
23
  * @author SAP SE
24
- * @version 1.84.20
24
+ * @version 1.84.21
25
25
  *
26
26
  * @experimental Since 1.80 This class is experimental and provides only limited functionality. Also the API might be
27
27
  * changed in future.
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @alias sap.ui.fl.FlexCustomData
29
29
  * @experimental Since 1.61.0
30
30
  * @author SAP SE
31
- * @version 1.84.20
31
+ * @version 1.84.21
32
32
  */
33
33
  var FlexCustomData = {};
34
34
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * ! OpenUI5
3
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
3
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @namespace sap.ui.fl.apply._internal.connectors.changes.Utils
24
24
  * @since 1.70
25
- * @version 1.84.20
25
+ * @version 1.84.21
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl.apply._internal, sap.ui.fl.write._internal
28
28
  */
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*!
3
3
  * OpenUI5
4
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
5
5
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*!
3
3
  * OpenUI5
4
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
5
5
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*!
3
3
  * OpenUI5
4
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
5
5
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
6
6
  */
7
7
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*!
3
3
  * OpenUI5
4
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
5
5
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
6
6
  */
7
7
 
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.Preprocessor
29
29
  * @experimental
30
30
  * @since 1.74
31
- * @version 1.84.20
31
+ * @version 1.84.21
32
32
  * @private
33
33
  * @ui5-restricted sap.ui.fl.apply._internal
34
34
  */
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*!
3
3
  * OpenUI5
4
- * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
5
5
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
6
6
  */
7
7
 
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.Registration
21
21
  * @experimental
22
22
  * @since 1.74
23
- * @version 1.84.20
23
+ * @version 1.84.21
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */