@openui5/sap.ui.fl 1.127.1 → 1.129.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 (180) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +3 -3
  3. package/src/sap/ui/fl/.library +1 -1
  4. package/src/sap/ui/fl/ChangePersistence.js +33 -451
  5. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  6. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
  7. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
  8. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  9. package/src/sap/ui/fl/FlexController.js +35 -57
  10. package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
  11. package/src/sap/ui/fl/LayerUtils.js +1 -1
  12. package/src/sap/ui/fl/Utils.js +17 -12
  13. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  14. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +3 -1
  15. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +5 -5
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +2 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +7 -4
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewDataSource.js +152 -0
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +12 -18
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +67 -0
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +75 -0
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +11 -9
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +78 -0
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +44 -0
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +56 -9
  42. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +18 -5
  46. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +66 -0
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +2 -4
  50. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +19 -10
  51. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +4 -3
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +4 -3
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +16 -12
  54. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +27 -19
  55. package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +4 -3
  56. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +6 -5
  57. package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +4 -3
  59. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
  60. package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +44 -4
  61. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +53 -97
  62. package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +3 -0
  63. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  64. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  65. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  66. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  67. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +10 -6
  68. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
  69. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +9 -2
  70. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +2 -2
  71. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +16 -15
  72. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +10 -12
  73. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -6
  74. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  75. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
  76. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  77. package/src/sap/ui/fl/apply/api/AnnotationChangeHandlerAPI.js +63 -0
  78. package/src/sap/ui/fl/changeHandler/AddIFrame.js +4 -4
  79. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +2 -1
  81. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  82. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  83. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +13 -4
  84. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  85. package/src/sap/ui/fl/changeHandler/HideControl.js +26 -5
  86. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  87. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  88. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  89. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  90. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  91. package/src/sap/ui/fl/changeHandler/UnhideControl.js +33 -1
  92. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  93. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  94. package/src/sap/ui/fl/descriptorRelated/Utils.js +19 -0
  95. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +14 -13
  96. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  97. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  98. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  99. package/src/sap/ui/fl/initial/_internal/Storage.js +10 -8
  100. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
  101. package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -0
  102. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +4 -3
  103. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +23 -1
  104. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +54 -22
  105. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  106. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  107. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  108. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  109. package/src/sap/ui/fl/library.js +43 -43
  110. package/src/sap/ui/fl/registry/Settings.js +1 -1
  111. package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +29 -58
  112. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +9 -59
  113. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +12 -66
  114. package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +56 -0
  115. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +30 -19
  116. package/src/sap/ui/fl/support/api/SupportAPI.js +62 -7
  117. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  118. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  119. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  120. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  121. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  122. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  123. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  124. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  125. package/src/sap/ui/fl/util/DescriptorChangeCheck.js +106 -12
  126. package/src/sap/ui/fl/util/IFrame.js +3 -3
  127. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  128. package/src/sap/ui/fl/util/changePropertyValueByPath.js +28 -6
  129. package/src/sap/ui/fl/util/resolveBinding.js +9 -9
  130. package/src/sap/ui/fl/variants/VariantManagement.js +23 -14
  131. package/src/sap/ui/fl/variants/VariantModel.js +54 -36
  132. package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -2
  133. package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +12 -12
  134. package/src/sap/ui/fl/write/_internal/SaveAs.js +22 -14
  135. package/src/sap/ui/fl/write/_internal/Storage.js +6 -6
  136. package/src/sap/ui/fl/write/_internal/Versions.js +8 -68
  137. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  138. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  139. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  140. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +65 -16
  141. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +3 -3
  142. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  143. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  144. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  145. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  146. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +43 -2
  147. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  148. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +3 -3
  149. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  150. package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +1 -0
  151. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  152. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  153. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  154. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  155. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  156. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  157. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  158. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +122 -77
  159. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  160. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  161. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  162. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +18 -18
  163. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  164. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +12 -11
  165. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +6 -8
  166. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectManager.js +382 -0
  167. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  168. package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +86 -0
  169. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +50 -47
  170. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  171. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  172. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +28 -25
  173. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +60 -32
  174. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  175. package/src/sap/ui/fl/write/api/LocalResetAPI.js +3 -4
  176. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +35 -58
  177. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +11 -7
  178. package/src/sap/ui/fl/write/api/TranslationAPI.js +6 -6
  179. package/src/sap/ui/fl/write/api/VersionsAPI.js +36 -9
  180. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +0 -236
package/THIRDPARTY.txt CHANGED
@@ -468,7 +468,7 @@ License: Apache-2.0
468
468
  License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
469
469
  Contained in: lib/jsdoc/ui5/plugin.js
470
470
 
471
- Component: SAP Theming Base Content, version: 11.16.1
471
+ Component: SAP Theming Base Content, version: 11.18.0
472
472
  Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
473
473
  License: Apache-2.0
474
474
  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.fl",
3
- "version": "1.127.1",
3
+ "version": "1.129.0",
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.127.1",
18
- "@openui5/sap.ui.core": "1.127.1"
17
+ "@openui5/sap.m": "1.129.0",
18
+ "@openui5/sap.ui.core": "1.129.0"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.127.1</version>
9
+ <version>1.129.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
12
12
 
@@ -6,69 +6,41 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/base/Log",
9
- "sap/ui/core/util/reflection/JsControlTreeModifier",
10
- "sap/ui/core/Component",
11
- "sap/ui/fl/apply/_internal/changes/Applier",
12
- "sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
13
9
  "sap/ui/fl/apply/_internal/flexObjects/States",
14
10
  "sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
15
11
  "sap/ui/fl/apply/_internal/flexState/changes/UIChangesState",
16
- "sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
17
- "sap/ui/fl/apply/_internal/flexState/DataSelector",
18
12
  "sap/ui/fl/apply/_internal/flexState/FlexObjectState",
19
13
  "sap/ui/fl/apply/_internal/flexState/FlexState",
20
14
  "sap/ui/fl/initial/api/Version",
21
15
  "sap/ui/fl/registry/Settings",
22
16
  "sap/ui/fl/write/_internal/condenser/Condenser",
17
+ "sap/ui/fl/write/_internal/flexState/FlexObjectManager",
23
18
  "sap/ui/fl/write/_internal/Storage",
24
19
  "sap/ui/fl/Layer",
25
- "sap/ui/fl/LayerUtils",
26
- "sap/ui/fl/Utils"
20
+ "sap/ui/fl/LayerUtils"
27
21
  ], function(
28
22
  Log,
29
- JsControlTreeModifier,
30
- Component,
31
- Applier,
32
- FlexObjectFactory,
33
23
  States,
34
24
  DependencyHandler,
35
25
  UIChangesState,
36
- VariantManagementState,
37
- DataSelector,
38
26
  FlexObjectState,
39
27
  FlexState,
40
28
  Version,
41
29
  Settings,
42
30
  Condenser,
31
+ FlexObjectManager,
43
32
  Storage,
44
33
  Layer,
45
- LayerUtils,
46
- Utils
34
+ LayerUtils
47
35
  ) {
48
36
  "use strict";
49
37
 
50
- const oVariantIndependentUIChangesDataSelector = new DataSelector({
51
- id: "variantIndependentUIChanges",
52
- parentDataSelector: FlexState.getFlexObjectsDataSelector(),
53
- executeFunction(aFlexObjects) {
54
- return aFlexObjects.filter(function(oFlexObject) {
55
- const bIsUIChange = oFlexObject.isA("sap.ui.fl.apply._internal.flexObjects.UIChange");
56
- const bIsControllerExtension = oFlexObject.isA("sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange");
57
- const bCorrectFileType = oFlexObject.getFileType() === "change" || oFlexObject.getFileType() === "codeExt";
58
- return (bIsUIChange || bIsControllerExtension)
59
- && bCorrectFileType
60
- && !oFlexObject.getVariantReference()
61
- && !oFlexObject.getSelector().persistencyKey;
62
- });
63
- }
64
- });
65
-
66
38
  /**
67
39
  * Helper object to access a change from the back end. Access helper object for each change (and variant) which was fetched from the back end
68
40
  *
69
41
  * @constructor
70
42
  * @author SAP SE
71
- * @version 1.127.1
43
+ * @version 1.129.0
72
44
  * @since 1.25.0
73
45
  * @private
74
46
  * @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
@@ -82,194 +54,7 @@ sap.ui.define([
82
54
  throw new Error("Missing component name.");
83
55
  }
84
56
 
85
- this._aDirtyChanges = [];
86
57
  this._oMessagebundle = undefined;
87
- oVariantIndependentUIChangesDataSelector.clearCachedResult({reference: this._mComponent.name});
88
- };
89
-
90
- async function getChangesFromFlexState(sReference, mPropertyBag, bInvalidateCache) {
91
- try {
92
- if (bInvalidateCache) {
93
- await FlexState.update(mPropertyBag);
94
- }
95
-
96
- await FlexState.getStorageResponse(sReference);
97
- } catch (oError) {
98
- Log.warning("Problem during ChangePersistence.prototype.getChangesForComponent");
99
- }
100
- }
101
-
102
- /**
103
- * Calls the back end asynchronously and fetches all changes for the component
104
- * New changes (dirty state) that are not yet saved to the back end won't be returned.
105
- * @param {object} [mPropertyBag] Contains additional data needed for reading changes
106
- * @param {object} [mPropertyBag.appDescriptor] Manifest that belongs to the current running component
107
- * @param {string} [mPropertyBag.siteId] ID of the site belonging to the current running component
108
- * @param {string} [mPropertyBag.currentLayer] Specifies a single layer for loading changes. If this parameter is set, the max layer filtering is not applied
109
- * @param {boolean} [mPropertyBag.ignoreMaxLayerParameter] Indicates that changes shall be loaded without layer filtering
110
- * @param {boolean} [mPropertyBag.includeCtrlVariants] - Indicates that control variant changes shall be included
111
- * @param {string} [mPropertyBag.cacheKey] Key to validate the cache entry stored on client side
112
- * @param {string} [mPropertyBag.version] Number of the version to retrieve changes for
113
- * @param {boolean} bInvalidateCache - should the cache be invalidated
114
- * @returns {Promise} Promise resolving with an array of changes
115
- * @public
116
- */
117
- ChangePersistence.prototype.getChangesForComponent = async function(mPropertyBag, bInvalidateCache) {
118
- mPropertyBag ||= {};
119
- await getChangesFromFlexState(this._mComponent.name, mPropertyBag, bInvalidateCache);
120
-
121
- const aAllChanges = FlexState.getFlexObjectsDataSelector().get({reference: this._mComponent.name});
122
- if (!aAllChanges.length) {
123
- return [];
124
- }
125
-
126
- // TODO: remove and use UIChangesState
127
- let aRelevantUIChanges = oVariantIndependentUIChangesDataSelector.get({reference: this._mComponent.name});
128
-
129
- if (!mPropertyBag.includeCtrlVariants) {
130
- aRelevantUIChanges = aRelevantUIChanges.concat(
131
- VariantManagementState.getInitialUIChanges({reference: this._mComponent.name})
132
- );
133
- } else {
134
- aRelevantUIChanges = aRelevantUIChanges.concat(
135
- VariantManagementState.getVariantDependentFlexObjects(this._mComponent.name)
136
- );
137
- }
138
-
139
- if (mPropertyBag.currentLayer) {
140
- aRelevantUIChanges = LayerUtils.filterChangeOrChangeDefinitionsByCurrentLayer(aRelevantUIChanges, mPropertyBag.currentLayer);
141
- }
142
- return aRelevantUIChanges;
143
- };
144
-
145
- /**
146
- * Adds a new change into dependency map positioned right after the referenced change and updates the change dependencies
147
- *
148
- * @param {sap.ui.core.Component} oAppComponent - Application component for the view
149
- * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change instance
150
- * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} [oReferenceChange] - Reference change. New change is positioned right after this one in the dependency map
151
- */
152
- ChangePersistence.prototype.addChangeAndUpdateDependencies = function(oAppComponent, oChange, oReferenceChange) {
153
- // the change status should always be initial when it gets added to the map / dependencies
154
- // if the component gets recreated the status of the change might not be initial
155
- oChange.setInitialApplyState();
156
- if (oReferenceChange) {
157
- DependencyHandler.insertChange(oChange, this.getDependencyMapForComponent(), oReferenceChange);
158
- }
159
- DependencyHandler.addChangeAndUpdateDependencies(oChange, oAppComponent, this.getDependencyMapForComponent());
160
- };
161
-
162
- ChangePersistence.prototype._addRunTimeCreatedChangeToDependencyMap = function(oAppComponent, oChange) {
163
- DependencyHandler.addRuntimeChangeToMap(oChange, oAppComponent, this.getDependencyMapForComponent());
164
- };
165
-
166
- /**
167
- * Getter for the private aggregation containing sap.ui.fl.apply._internal.flexObjects.FlexObject objects mapped by their selector ids.
168
- * @return {Object<string,object>} mChanges mapping with changes sorted by their selector ids
169
- * @public
170
- */
171
- ChangePersistence.prototype.getDependencyMapForComponent = function() {
172
- return FlexObjectState.getLiveDependencyMap(this._mComponent.name);
173
- };
174
-
175
- function finalizeChangeCreation(oChange, oAppComponent) {
176
- this._addRunTimeCreatedChangeToDependencyMap(oAppComponent, oChange);
177
- this._addPropagationListener(oAppComponent);
178
- }
179
-
180
- /**
181
- * Adds a new change and returns the id of the new change.
182
- *
183
- * @param {object} vChange - The complete and finalized JSON object representation the file content of the change or a Change instance
184
- * @param {sap.ui.core.Component} oAppComponent - Application component instance
185
- * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} the newly created change
186
- * @public
187
- */
188
- ChangePersistence.prototype.addChange = function(vChange, oAppComponent) {
189
- var oChange = this.addDirtyChange(vChange);
190
- finalizeChangeCreation.call(this, oChange, oAppComponent);
191
- return oChange;
192
- };
193
-
194
- /**
195
- * Adds new changes and returns the ids of the new changes.
196
- *
197
- * @param {object[]} aChanges - Array with complete and finalized JSON object representation the file content of the changes or Change instances
198
- * @param {sap.ui.core.Component} oAppComponent - Application component instance
199
- * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} the newly created changes
200
- * @public
201
- */
202
- ChangePersistence.prototype.addChanges = function(aChanges, oAppComponent) {
203
- var aNewChanges = this.addDirtyChanges(aChanges);
204
- aNewChanges.forEach(function(oChange) {
205
- finalizeChangeCreation.call(this, oChange, oAppComponent);
206
- }.bind(this));
207
- return aNewChanges;
208
- };
209
-
210
- /**
211
- * Adds a new dirty change.
212
- *
213
- * @param {object} vChange - JSON object of change or change object
214
- * @param {boolean} [bSkipAddToState] - If set to true, the change won't be added to the FlexState
215
- * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} The prepared change object
216
- * @public
217
- */
218
- ChangePersistence.prototype.addDirtyChange = function(vChange, bSkipAddToState) {
219
- var oNewChange;
220
- if (typeof vChange.isA === "function" && vChange.isA("sap.ui.fl.apply._internal.flexObjects.FlexObject")) {
221
- oNewChange = vChange;
222
- } else {
223
- oNewChange = FlexObjectFactory.createFromFileContent(vChange);
224
- }
225
-
226
- // don't add the same change twice
227
- if (this._aDirtyChanges.indexOf(oNewChange) === -1) {
228
- this._aDirtyChanges.push(oNewChange);
229
- if (!bSkipAddToState) {
230
- FlexState.addDirtyFlexObject(this._mComponent.name, oNewChange);
231
- }
232
- }
233
- return oNewChange;
234
- };
235
-
236
- /**
237
- * Adds new dirty changes.
238
- *
239
- * @param {object[]} aChanges - JSON objects of changes or change objects
240
- * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} The prepared change objects
241
- * @public
242
- */
243
- ChangePersistence.prototype.addDirtyChanges = function(aChanges) {
244
- var aNewChanges = aChanges.map(function(oChange) {
245
- return this.addDirtyChange(oChange, true);
246
- }.bind(this));
247
- FlexState.addDirtyFlexObjects(this._mComponent.name, aNewChanges);
248
- return aNewChanges;
249
- };
250
-
251
- /**
252
- * If the first changes were created, the <code>propagationListener</code> of <code>sap.ui.fl</code> might not yet
253
- * be attached to the application component and must be added then.
254
- *
255
- * @param {sap.ui.core.UIComponent} oComponent Component having an app component that might not have a propagation listener yet
256
- * @private
257
- */
258
- ChangePersistence.prototype._addPropagationListener = function(oComponent) {
259
- var oAppComponent = Utils.getAppComponentForControl(oComponent);
260
- if (oAppComponent instanceof Component) {
261
- var fnCheckIsNotFlPropagationListener = function(fnPropagationListener) {
262
- return !fnPropagationListener._bIsSapUiFlFlexControllerApplyChangesOnControl;
263
- };
264
-
265
- var bNoFlPropagationListenerAttached = oAppComponent.getPropagationListeners().every(fnCheckIsNotFlPropagationListener);
266
-
267
- if (bNoFlPropagationListenerAttached) {
268
- var fnPropagationListener = Applier.applyAllChangesForControl.bind(Applier, oAppComponent, this._mComponent.name);
269
- fnPropagationListener._bIsSapUiFlFlexControllerApplyChangesOnControl = true;
270
- oAppComponent.addPropagationListener(fnPropagationListener);
271
- }
272
- }
273
58
  };
274
59
 
275
60
  ChangePersistence.prototype._deleteNotSavedChanges = function(aChanges, aCondensedChanges, bAlreadyDeletedViaCondense) {
@@ -283,7 +68,10 @@ sap.ui.define([
283
68
  // Remove also from Cache if the persisted change is still there (e.g. navigate away and back to the app)
284
69
  FlexState.updateStorageResponse(this._mComponent.name, [{flexObject: oChange.convertToFileContent(), type: "delete"}]);
285
70
  } else {
286
- this.deleteChange(oChange);
71
+ FlexObjectManager.deleteFlexObjects({
72
+ reference: this._mComponent.name,
73
+ flexObjects: [oChange]
74
+ });
287
75
  }
288
76
  }.bind(this));
289
77
  };
@@ -417,7 +205,7 @@ sap.ui.define([
417
205
  * @param {string[]} [aDraftFilenames] - Filenames from persisted changes draft version
418
206
  * @param {boolean} [bCondenseAnyLayer] - This will enable condensing regardless of the current layer
419
207
  * @param {string} [sLayer] - Layer for which the changes should be saved
420
- * @returns {Promise} Resolving after all changes have been saved
208
+ * @returns {Promise<object>} Resolving with the storage response after all changes have been saved
421
209
  */
422
210
  ChangePersistence.prototype.saveDirtyChanges = function(
423
211
  oAppComponent,
@@ -428,7 +216,7 @@ sap.ui.define([
428
216
  bCondenseAnyLayer,
429
217
  sLayer
430
218
  ) {
431
- var aDirtyChanges = aChanges || this._aDirtyChanges;
219
+ var aDirtyChanges = aChanges || FlexObjectState.getDirtyFlexObjects(this._mComponent.name);
432
220
  var sCurrentLayer = aDirtyChanges.length && aDirtyChanges[0].getLayer() || sLayer;
433
221
  var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(
434
222
  this,
@@ -491,9 +279,9 @@ sap.ui.define([
491
279
  * @param {boolean} [bSkipUpdateCache] If true, then the dirty change shall be saved for the new created app variant, but not for the current app;
492
280
  * therefore, the cache update of the current app is skipped because the dirty change is not saved for the running app.
493
281
  * @param {string} [sParentVersion] - Indicates if changes should be written as a draft and on which version the changes should be based on
494
- * @returns {Promise} resolving after all changes have been saved
282
+ * @returns {Promise<object>} resolving with the collected storage response after all changes have been saved
495
283
  */
496
- ChangePersistence.prototype.saveSequenceOfDirtyChanges = function(aDirtyChanges, bSkipUpdateCache, sParentVersion) {
284
+ ChangePersistence.prototype.saveSequenceOfDirtyChanges = async function(aDirtyChanges, bSkipUpdateCache, sParentVersion) {
497
285
  var oFirstNewChange;
498
286
  if (sParentVersion) {
499
287
  // in case of changes saved for a draft only the first writing operation must have the parentVersion targeting the basis
@@ -504,11 +292,20 @@ sap.ui.define([
504
292
  oFirstNewChange = [].concat(aNewChanges).shift();
505
293
  }
506
294
 
507
- return aDirtyChanges.reduce(function(oPreviousPromise, oDirtyChange) {
508
- return oPreviousPromise
509
- .then(performSingleSaveAction.bind(undefined, oDirtyChange, oFirstNewChange, sParentVersion))
510
- .then(this._updateCacheAndDirtyState.bind(this, oDirtyChange, bSkipUpdateCache));
511
- }.bind(this), Promise.resolve());
295
+ // A successful save operation returns the flexObject in the response
296
+ // The flexObjects are returned to the calling function where they will be set to persisted
297
+ const oCollectedResponse = {
298
+ response: []
299
+ };
300
+
301
+ for (const oDirtyChange of aDirtyChanges) {
302
+ const oResponse = await performSingleSaveAction(oDirtyChange, oFirstNewChange, sParentVersion);
303
+ this._updateCacheAndDirtyState(oDirtyChange, bSkipUpdateCache);
304
+ if (oResponse?.response) {
305
+ oCollectedResponse.response.push(...oResponse.response);
306
+ }
307
+ }
308
+ return oCollectedResponse;
512
309
  };
513
310
 
514
311
  function performSingleSaveAction(oDirtyChange, oFirstChange, sParentVersion) {
@@ -542,10 +339,6 @@ sap.ui.define([
542
339
  * therefore, the cache update of the current app is skipped
543
340
  */
544
341
  ChangePersistence.prototype._updateCacheAndDirtyState = function(oDirtyChange, bSkipUpdateCache) {
545
- this._aDirtyChanges = this._aDirtyChanges.filter(function(oExistingDirtyChange) {
546
- return oDirtyChange.getId() !== oExistingDirtyChange.getId();
547
- });
548
-
549
342
  if (!bSkipUpdateCache) {
550
343
  switch (oDirtyChange.getState()) {
551
344
  case States.LifecycleState.NEW:
@@ -560,7 +353,7 @@ sap.ui.define([
560
353
  flexObject: oDirtyChange.convertToFileContent()
561
354
  }]);
562
355
  break;
563
- case States.LifecycleState.DIRTY:
356
+ case States.LifecycleState.UPDATED:
564
357
  FlexState.updateStorageResponse(this._mComponent.name, [{
565
358
  type: "update",
566
359
  flexObject: oDirtyChange.convertToFileContent()
@@ -568,6 +361,8 @@ sap.ui.define([
568
361
  break;
569
362
  default:
570
363
  }
364
+ oDirtyChange.setState(States.LifecycleState.PERSISTED);
365
+ FlexState.getFlexObjectsDataSelector().checkUpdate({reference: this._mComponent.name});
571
366
  }
572
367
  };
573
368
 
@@ -618,67 +413,8 @@ sap.ui.define([
618
413
  return aChanges;
619
414
  }
620
415
 
621
- ChangePersistence.prototype.getDirtyChanges = function() {
622
- return this._aDirtyChanges;
623
- };
624
-
625
- /**
626
- * Prepares a change to be deleted with the next call to
627
- * @see {ChangePersistence#saveDirtyChanges};
628
- *
629
- * If the given change is already in the dirty changes and
630
- * has the 'NEW' state it will be removed, assuming,
631
- * it has just been created in the current session;
632
- *
633
- * Otherwise it will be marked for deletion.
634
- *
635
- * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange the change to be deleted
636
- * @param {boolean} [bRunTimeCreatedChange] set if the change was created at runtime
637
- * @param {boolean} [bSkipRemoveFromFlexState] set if the change should not be removed from the FlexState
638
- */
639
- ChangePersistence.prototype.deleteChange = function(oChange, bRunTimeCreatedChange, bSkipRemoveFromFlexState) {
640
- var nIndexInDirtyChanges = this._aDirtyChanges.indexOf(oChange);
641
-
642
- if (nIndexInDirtyChanges > -1) {
643
- if (oChange.getState() === States.LifecycleState.DELETED) {
644
- return;
645
- }
646
- this._aDirtyChanges.splice(nIndexInDirtyChanges, 1);
647
- if (!bSkipRemoveFromFlexState) {
648
- FlexState.removeDirtyFlexObject(this._mComponent.name, oChange);
649
- }
650
- this._deleteChangeInMap(oChange, bRunTimeCreatedChange);
651
- return;
652
- }
653
-
654
- oChange.markForDeletion();
655
- this.addDirtyChange(oChange);
656
- this._deleteChangeInMap(oChange, bRunTimeCreatedChange);
657
- };
658
-
659
- /**
660
- * Prepares multiple changes to be deleted with the next call to
661
- * @see {ChangePersistence#saveDirtyChanges};
662
- *
663
- * Removal from the FlexState happens in one go to trigger only one invalidation.
664
- *
665
- * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} aChanges the changes to be deleted
666
- * @param {boolean} [bRunTimeCreatedChanges] set if the change was created at runtime
667
- */
668
- ChangePersistence.prototype.deleteChanges = function(aChanges, bRunTimeCreatedChanges) {
669
- aChanges.forEach(function(oChange) {
670
- this.deleteChange(oChange, bRunTimeCreatedChanges, true);
671
- }.bind(this));
672
- FlexState.removeDirtyFlexObjects(this._mComponent.name, aChanges);
673
- };
674
-
675
416
  ChangePersistence.prototype.removeChange = function(oChange) {
676
- var nIndexInDirtyChanges = this._aDirtyChanges.indexOf(oChange);
677
-
678
- if (nIndexInDirtyChanges > -1) {
679
- this._aDirtyChanges.splice(nIndexInDirtyChanges, 1);
680
- FlexState.removeDirtyFlexObject(this._mComponent.name, oChange);
681
- }
417
+ FlexState.removeDirtyFlexObjects(this._mComponent.name, [oChange]);
682
418
  this._deleteChangeInMap(oChange);
683
419
  };
684
420
 
@@ -691,164 +427,10 @@ sap.ui.define([
691
427
  */
692
428
  ChangePersistence.prototype._deleteChangeInMap = function(oChange, bRunTimeCreatedChange) {
693
429
  var sChangeKey = oChange.getId();
694
- DependencyHandler.removeChangeFromMap(this.getDependencyMapForComponent(), sChangeKey);
430
+ DependencyHandler.removeChangeFromMap(FlexObjectState.getLiveDependencyMap(this._mComponent.name), sChangeKey);
695
431
  if (!bRunTimeCreatedChange) {
696
- DependencyHandler.removeChangeFromDependencies(this.getDependencyMapForComponent(), sChangeKey);
697
- }
698
- };
699
-
700
- function isLocalAndInLayer(sLayer, oObject) {
701
- return (oObject.getRequest() === "$TMP" || oObject.getRequest() === "") && oObject.getLayer() === sLayer;
702
- }
703
-
704
- function isPersistedAndInLayer(sLayer, oObject) {
705
- return oObject.getState() === States.LifecycleState.PERSISTED && oObject.getLayer() === sLayer;
706
- }
707
-
708
- function getAllCompVariantsEntities() {
709
- var aCompVariantEntities = [];
710
- var mCompVariantsMap = FlexState.getCompVariantsMap(this._mComponent.name);
711
- for (var sPersistencyKey in mCompVariantsMap) {
712
- for (var sId in mCompVariantsMap[sPersistencyKey].byId) {
713
- aCompVariantEntities.push(mCompVariantsMap[sPersistencyKey].byId[sId]);
714
- }
715
- }
716
- return aCompVariantEntities;
717
- }
718
- /**
719
- * Transports all the UI changes and app variant descriptor (if exists) to the target system
720
- *
721
- * @param {object} oRootControl - the root control of the running application
722
- * @param {string} sStyleClass - RTA style class name
723
- * @param {string} sLayer - Working layer
724
- * @param {array} [aAppVariantDescriptors] - an array of app variant descriptors which needs to be transported
725
- * @returns {Promise} promise that resolves when all the artifacts are successfully transported
726
- */
727
- ChangePersistence.prototype.transportAllUIChanges = function(oRootControl, sStyleClass, sLayer, aAppVariantDescriptors) {
728
- return this.getChangesForComponent({currentLayer: sLayer, includeCtrlVariants: true}).then(function(aLocalChanges) {
729
- var aCompVariantEntities = getAllCompVariantsEntities.call(this);
730
-
731
- aLocalChanges = aLocalChanges.concat(
732
- aCompVariantEntities.filter(isLocalAndInLayer.bind(this, sLayer)));
733
-
734
- return Storage.publish({
735
- transportDialogSettings: {
736
- styleClass: sStyleClass
737
- },
738
- layer: sLayer,
739
- reference: this._mComponent.name,
740
- localChanges: aLocalChanges,
741
- appVariantDescriptors: aAppVariantDescriptors
742
- });
743
- }.bind(this));
744
- };
745
-
746
- /**
747
- * Removes unsaved changes.
748
- *
749
- * @param {string|string[]} [vLayer] - Layer or multiple layers for which changes shall be deleted. If omitted, changes on all layers are considered.
750
- * @param {sap.ui.core.Component} [oComponent] - Component instance, required if oControl is specified
751
- * @param {string} [oControl] - Control for which the changes should be deleted. If omitted, all changes for the app component are considered.
752
- * @param {string} [sGenerator] - Generator of changes (optional)
753
- * @param {string[]} [aChangeTypes] - Types of changes (optional)
754
- *
755
- * @returns {Promise} Promise that resolves after the deletion took place
756
- */
757
- ChangePersistence.prototype.removeDirtyChanges = function(vLayer, oComponent, oControl, sGenerator, aChangeTypes) {
758
- var aLayers = [].concat(vLayer || []);
759
- var aDirtyChanges = this._aDirtyChanges;
760
-
761
- var aChangesToBeRemoved = aDirtyChanges.filter(function(oChange) {
762
- var bChangeValid = true;
763
-
764
- if (aLayers.length && !aLayers.includes(oChange.getLayer())) {
765
- return false;
766
- }
767
-
768
- if (sGenerator && oChange.getSupportInformation().generator !== sGenerator) {
769
- return false;
770
- }
771
-
772
- if (oControl) {
773
- var vSelector = oChange.getSelector();
774
- bChangeValid = oControl.getId() === JsControlTreeModifier.getControlIdBySelector(vSelector, oComponent);
775
- }
776
-
777
- if (aChangeTypes) {
778
- bChangeValid &&= aChangeTypes.indexOf(oChange.getChangeType()) !== -1;
779
- }
780
-
781
- return bChangeValid;
782
- });
783
-
784
- FlexState.removeDirtyFlexObjects(this._mComponent.name, aChangesToBeRemoved);
785
- aChangesToBeRemoved.forEach(function(oChange) {
786
- var nIndex = aDirtyChanges.indexOf(oChange);
787
- aDirtyChanges.splice(nIndex, 1);
788
- });
789
-
790
- return Promise.resolve(aChangesToBeRemoved);
791
- };
792
-
793
- /**
794
- * Reset changes on the server. Specification of a generator, selector string or change type string is optional
795
- * but at least one of these parameters has to be filled.
796
- * This function returns an array of changes which need to be reverted from UI. When neither a selector nor a change type is provided,
797
- * an empty array is returned (this triggers a reset of the changes for an entire application component and reloads it).
798
- *
799
- * @param {string} sLayer Layer for which changes shall be deleted
800
- * @param {string} [sGenerator] Generator of changes (optional)
801
- * @param {string[]} [aSelectorIds] Selector IDs in local format (optional)
802
- * @param {string[]} [aChangeTypes] Types of changes (optional)
803
- *
804
- * @returns {Promise} Promise that resolves with an array of changes which need to be reverted from UI
805
- */
806
- ChangePersistence.prototype.resetChanges = async function(sLayer, sGenerator, aSelectorIds, aChangeTypes) {
807
- const bSelectorIdsProvided = aSelectorIds && aSelectorIds.length > 0;
808
- const bChangeTypesProvided = aChangeTypes && aChangeTypes.length > 0;
809
-
810
- // In case of application reset and PUBLIC layer available, also includes comp variant entities
811
- const isPublicLayerAvailable = Settings.getInstanceOrUndef() && Settings.getInstanceOrUndef().isPublicLayerAvailable();
812
- const isApplicationReset = sGenerator === undefined && aSelectorIds === undefined && aChangeTypes === undefined;
813
- const aCompVariantsEntries = (isPublicLayerAvailable && isApplicationReset) ?
814
- getAllCompVariantsEntities.call(this).filter(isPersistedAndInLayer.bind(this, sLayer))
815
- : [];
816
-
817
- const aUiChanges = await this.getChangesForComponent({currentLayer: sLayer, includeCtrlVariants: true});
818
- const aFlexObjects = aUiChanges.concat(aCompVariantsEntries);
819
- const mParams = {
820
- reference: this._mComponent.name,
821
- layer: sLayer,
822
- changes: aFlexObjects
823
- };
824
- if (sGenerator) {
825
- mParams.generator = sGenerator;
826
- }
827
- if (bSelectorIdsProvided) {
828
- mParams.selectorIds = aSelectorIds;
829
- }
830
- if (bChangeTypesProvided) {
831
- mParams.changeTypes = aChangeTypes;
832
- }
833
-
834
- const oResponse = await Storage.reset(mParams);
835
- // If reset changes for control, returns an array of deleted changes for reverting
836
- if (aSelectorIds || aChangeTypes) {
837
- const aNames = [];
838
- if (oResponse && oResponse.response && oResponse.response.length > 0) {
839
- oResponse.response.forEach(function(oChangeContentId) {
840
- aNames.push(oChangeContentId.fileName);
841
- });
842
- }
843
- const aChangesToRevert = UIChangesState.getAllUIChanges(this._mComponent.name).filter(function(oChange) {
844
- return aNames.indexOf(oChange.getId()) !== -1;
845
- });
846
- FlexState.updateStorageResponse(this._mComponent.name, aChangesToRevert.map((oFlexObject) => {
847
- return {flexObject: oFlexObject.convertToFileContent(), type: "delete"};
848
- }));
849
- return aChangesToRevert;
432
+ DependencyHandler.removeChangeFromDependencies(FlexObjectState.getLiveDependencyMap(this._mComponent.name), sChangeKey);
850
433
  }
851
- return [];
852
434
  };
853
435
 
854
436
  return ChangePersistence;
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @alias sap.ui.fl.ChangePersistenceFactory
20
20
  * @since 1.27.0
21
21
  * @author SAP SE
22
- * @version 1.127.1
22
+ * @version 1.129.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl
25
25
  */
@@ -20,7 +20,7 @@ function(
20
20
  * @namespace
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.127.1
23
+ * @version 1.129.0
24
24
  *
25
25
  * @private
26
26
  * @since 1.48
@@ -20,7 +20,7 @@ function(
20
20
  * @namespace
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.127.1
23
+ * @version 1.129.0
24
24
  *
25
25
  * @private
26
26
  * @since 1.58
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @namespace
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.127.1
20
+ * @version 1.129.0
21
21
  *
22
22
  * @private
23
23
  * @since 1.48