@openui5/sap.ui.fl 1.112.2 → 1.114.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 (211) 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/Cache.js +1 -1
  5. package/src/sap/ui/fl/ChangePersistence.js +42 -32
  6. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  7. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
  8. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
  9. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  10. package/src/sap/ui/fl/FlexController.js +1 -1
  11. package/src/sap/ui/fl/FlexControllerFactory.js +22 -18
  12. package/src/sap/ui/fl/LayerUtils.js +1 -1
  13. package/src/sap/ui/fl/Utils.js +1 -1
  14. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  15. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +5 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +6 -6
  40. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +2 -2
  41. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +19 -13
  43. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +9 -3
  45. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +46 -25
  46. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +2 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
  49. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +3 -1
  50. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +4 -2
  51. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +2 -2
  52. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  54. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  55. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +6 -2
  56. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
  57. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  59. package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
  60. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
  61. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  62. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +29 -9
  63. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  64. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  65. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  66. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  67. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  68. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
  69. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  70. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  71. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  72. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  73. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  74. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  75. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  76. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  77. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  78. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  79. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  80. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  81. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  82. package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +3 -3
  83. package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +36 -31
  84. package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
  85. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -1
  86. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
  87. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +40 -12
  88. package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +2 -1
  89. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  90. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  91. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  92. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  93. package/src/sap/ui/fl/library.js +43 -43
  94. package/src/sap/ui/fl/messagebundle_sl.properties +2 -2
  95. package/src/sap/ui/fl/registry/Settings.js +1 -2
  96. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  97. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
  98. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  99. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  100. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  101. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  102. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  103. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  104. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +11 -13
  105. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  106. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  107. package/src/sap/ui/fl/util/IFrame.js +2 -2
  108. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  109. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  110. package/src/sap/ui/fl/variants/VariantModel.js +7 -2
  111. package/src/sap/ui/fl/variants/context/Component.js +11 -0
  112. package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +4 -0
  113. package/src/sap/ui/fl/variants/context/i18n/i18n.properties +2 -0
  114. package/src/sap/ui/fl/variants/context/i18n/i18n_ar.properties +1 -0
  115. package/src/sap/ui/fl/variants/context/i18n/i18n_bg.properties +1 -0
  116. package/src/sap/ui/fl/variants/context/i18n/i18n_ca.properties +1 -0
  117. package/src/sap/ui/fl/variants/context/i18n/i18n_cs.properties +1 -0
  118. package/src/sap/ui/fl/variants/context/i18n/i18n_cy.properties +1 -0
  119. package/src/sap/ui/fl/variants/context/i18n/i18n_da.properties +1 -0
  120. package/src/sap/ui/fl/variants/context/i18n/i18n_de.properties +1 -0
  121. package/src/sap/ui/fl/variants/context/i18n/i18n_el.properties +1 -0
  122. package/src/sap/ui/fl/variants/context/i18n/i18n_en.properties +1 -0
  123. package/src/sap/ui/fl/variants/context/i18n/i18n_en_GB.properties +1 -0
  124. package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_sappsd.properties +1 -0
  125. package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saprigi.properties +1 -0
  126. package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +1 -0
  127. package/src/sap/ui/fl/variants/context/i18n/i18n_es.properties +1 -0
  128. package/src/sap/ui/fl/variants/context/i18n/i18n_es_MX.properties +1 -0
  129. package/src/sap/ui/fl/variants/context/i18n/i18n_et.properties +1 -0
  130. package/src/sap/ui/fl/variants/context/i18n/i18n_fi.properties +1 -0
  131. package/src/sap/ui/fl/variants/context/i18n/i18n_fr.properties +1 -0
  132. package/src/sap/ui/fl/variants/context/i18n/i18n_fr_CA.properties +1 -0
  133. package/src/sap/ui/fl/variants/context/i18n/i18n_hi.properties +1 -0
  134. package/src/sap/ui/fl/variants/context/i18n/i18n_hr.properties +1 -0
  135. package/src/sap/ui/fl/variants/context/i18n/i18n_hu.properties +1 -0
  136. package/src/sap/ui/fl/variants/context/i18n/i18n_id.properties +1 -0
  137. package/src/sap/ui/fl/variants/context/i18n/i18n_it.properties +1 -0
  138. package/src/sap/ui/fl/variants/context/i18n/i18n_iw.properties +1 -0
  139. package/src/sap/ui/fl/variants/context/i18n/i18n_ja.properties +1 -0
  140. package/src/sap/ui/fl/variants/context/i18n/i18n_kk.properties +1 -0
  141. package/src/sap/ui/fl/variants/context/i18n/i18n_ko.properties +1 -0
  142. package/src/sap/ui/fl/variants/context/i18n/i18n_lt.properties +1 -0
  143. package/src/sap/ui/fl/variants/context/i18n/i18n_lv.properties +1 -0
  144. package/src/sap/ui/fl/variants/context/i18n/i18n_ms.properties +1 -0
  145. package/src/sap/ui/fl/variants/context/i18n/i18n_nl.properties +1 -0
  146. package/src/sap/ui/fl/variants/context/i18n/i18n_no.properties +1 -0
  147. package/src/sap/ui/fl/variants/context/i18n/i18n_pl.properties +1 -0
  148. package/src/sap/ui/fl/variants/context/i18n/i18n_pt.properties +1 -0
  149. package/src/sap/ui/fl/variants/context/i18n/i18n_pt_PT.properties +1 -0
  150. package/src/sap/ui/fl/variants/context/i18n/i18n_ro.properties +1 -0
  151. package/src/sap/ui/fl/variants/context/i18n/i18n_ru.properties +1 -0
  152. package/src/sap/ui/fl/variants/context/i18n/i18n_sh.properties +1 -0
  153. package/src/sap/ui/fl/variants/context/i18n/i18n_sk.properties +1 -0
  154. package/src/sap/ui/fl/variants/context/i18n/i18n_sl.properties +1 -0
  155. package/src/sap/ui/fl/variants/context/i18n/i18n_sv.properties +1 -0
  156. package/src/sap/ui/fl/variants/context/i18n/i18n_th.properties +1 -0
  157. package/src/sap/ui/fl/variants/context/i18n/i18n_tr.properties +1 -0
  158. package/src/sap/ui/fl/variants/context/i18n/i18n_uk.properties +1 -0
  159. package/src/sap/ui/fl/variants/context/i18n/i18n_vi.properties +1 -0
  160. package/src/sap/ui/fl/variants/context/i18n/i18n_zh_CN.properties +1 -0
  161. package/src/sap/ui/fl/variants/context/i18n/i18n_zh_TW.properties +1 -0
  162. package/src/sap/ui/fl/variants/context/view/ContextVisibility.view.xml +1 -1
  163. package/src/sap/ui/fl/write/_internal/Storage.js +24 -3
  164. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
  165. package/src/sap/ui/fl/write/_internal/Versions.js +8 -2
  166. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  167. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  168. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  169. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +23 -1
  170. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +24 -9
  171. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +36 -27
  172. package/src/sap/ui/fl/write/_internal/condenser/Utils.js +1 -1
  173. package/src/sap/ui/fl/write/_internal/condenser/classifications/Update.js +10 -1
  174. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  175. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  176. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +17 -5
  177. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  178. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  179. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  180. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  181. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  182. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
  183. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  184. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  185. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  186. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  187. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  188. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  189. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  190. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  191. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  192. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  193. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  194. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  195. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  196. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +11 -7
  197. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +22 -1
  198. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  199. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  200. package/src/sap/ui/fl/write/api/Adaptations.js +23 -0
  201. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +41 -7
  202. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +375 -22
  203. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +34 -14
  204. package/src/sap/ui/fl/write/api/FeaturesAPI.js +19 -9
  205. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  206. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +1 -0
  207. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +28 -0
  208. package/src/sap/ui/fl/write/api/VersionsAPI.js +22 -6
  209. package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +2 -1
  210. package/src/sap/ui/fl/write/connectors/BaseConnector.js +6 -0
  211. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +0 -115
@@ -7,6 +7,7 @@
7
7
  sap.ui.define([
8
8
  "sap/base/util/restricted/_isEqual",
9
9
  "sap/base/util/each",
10
+ "sap/base/util/ObjectPath",
10
11
  "sap/ui/fl/changeHandler/condenser/Classification",
11
12
  "sap/ui/fl/write/_internal/condenser/classifications/Create",
12
13
  "sap/ui/fl/write/_internal/condenser/classifications/Destroy",
@@ -15,6 +16,7 @@ sap.ui.define([
15
16
  ], function(
16
17
  _isEqual,
17
18
  each,
19
+ ObjectPath,
18
20
  CondenserClassification,
19
21
  Create,
20
22
  Destroy,
@@ -29,7 +31,7 @@ sap.ui.define([
29
31
  * @namespace
30
32
  * @alias sap.ui.fl.write._internal.condenser.UIReconstruction
31
33
  * @author SAP SE
32
- * @version 1.112.2
34
+ * @version 1.114.0
33
35
  */
34
36
  var UIReconstruction = {};
35
37
 
@@ -69,21 +71,23 @@ sap.ui.define([
69
71
  var mContainers = {};
70
72
  forEveryMapInMap(mUIReconstructions, function(mUIState, sContainerKey, mUIAggregationState, sAggregationName) {
71
73
  var aTargetElementIds = mUIAggregationState[Utils.TARGET_UI];
74
+ var aSourceElementIds = mUIAggregationState[Utils.INITIAL_UI];
72
75
 
73
- aTargetElementIds.forEach(function(sTargetElementId) {
74
- aCondenserInfos.forEach(function(oCondenserInfo) {
75
- if (sTargetElementId === oCondenserInfo.affectedControl) {
76
- if (!mContainers[sContainerKey]) {
77
- mContainers[sContainerKey] = {};
78
- }
79
- var mAggregations = mContainers[sContainerKey];
80
- if (!mAggregations[sAggregationName]) {
81
- mAggregations[sAggregationName] = [];
82
- }
83
- var aContainerElements = mAggregations[sAggregationName];
84
- aContainerElements.push(oCondenserInfo);
76
+ aCondenserInfos.forEach(function(oCondenserInfo) {
77
+ var bElementPartOfInitialOrTargetUi = aTargetElementIds.indexOf(oCondenserInfo.affectedControl) > -1
78
+ || aSourceElementIds.indexOf(oCondenserInfo.affectedControl) > -1;
79
+
80
+ if (sAggregationName === oCondenserInfo.targetAggregation && bElementPartOfInitialOrTargetUi) {
81
+ if (!mContainers[sContainerKey]) {
82
+ mContainers[sContainerKey] = {};
85
83
  }
86
- });
84
+ var mAggregations = mContainers[sContainerKey];
85
+ if (!mAggregations[sAggregationName]) {
86
+ mAggregations[sAggregationName] = [];
87
+ }
88
+ var aContainerElements = mAggregations[sAggregationName];
89
+ aContainerElements.push(oCondenserInfo);
90
+ }
87
91
  });
88
92
  });
89
93
  return mContainers;
@@ -213,23 +217,28 @@ sap.ui.define([
213
217
  * @param {Map} mUIReconstructions - Map of UI reconstructions
214
218
  */
215
219
  function updateTargetIndex(mReducedChanges, mUIReconstructions) {
216
- function updateCondenserChange(iIndex, oCondenserChange) {
217
- // setting the target index will most likely make the change dirty,
218
- // but the condenser needs the current state of the change.
219
- // so in this function the state should not change
220
- var sOldState = oCondenserChange.change.getState();
221
- oCondenserChange.setTargetIndex(oCondenserChange.change, iIndex);
222
- oCondenserChange.change.setState(sOldState);
220
+ function updateCondenserChange(iIndex, oCondenserInfo) {
221
+ if (getTargetIndex(oCondenserInfo) !== iIndex) {
222
+ // setting the target index will most likely make the change dirty,
223
+ // but the condenser needs the current state of the change.
224
+ // so in this function the state should not change
225
+ var sOldState = oCondenserInfo.change.getState();
226
+ oCondenserInfo.setTargetIndex(oCondenserInfo.change, iIndex);
227
+ oCondenserInfo.change.setState(sOldState);
228
+ if (oCondenserInfo.change.isPersisted()) {
229
+ oCondenserInfo.change.condenserState = "update";
230
+ }
231
+ }
223
232
  }
224
233
 
225
234
  function adjustReconstructionMap(mUIStates, sContainerId, mUIAggregationState) {
226
235
  mUIAggregationState[Utils.TARGET_UI].forEach(function(sTargetElementId, iIndex) {
227
236
  if (!Utils.isUnknown(sTargetElementId)) {
228
237
  var mTypes = mReducedChanges[sTargetElementId];
229
- var mSubtypes = mTypes[Utils.INDEX_RELEVANT];
230
- each(mSubtypes, function(sSubtypeKey, aCondenserChanges) {
238
+ var mAggregations = mTypes[Utils.INDEX_RELEVANT];
239
+ forEveryMapInMap(mAggregations, function(mSubtypes, sAggregationName, aCondenserInfos, sSubtypeKey) {
231
240
  if (sSubtypeKey !== CondenserClassification.Destroy) {
232
- aCondenserChanges.forEach(updateCondenserChange.bind(this, iIndex));
241
+ aCondenserInfos.forEach(updateCondenserChange.bind(this, iIndex));
233
242
  }
234
243
  });
235
244
  }
@@ -254,7 +263,7 @@ sap.ui.define([
254
263
  aTargetElementIds.forEach(function(sTargetElementId) {
255
264
  var mTypes = mReducedChanges[sTargetElementId];
256
265
  if (mTypes !== undefined) {
257
- each(mTypes[Utils.INDEX_RELEVANT], function(sClassification, aCondenserInfos) {
266
+ forEveryMapInMap(mTypes[Utils.INDEX_RELEVANT], function(mSubtypes, sAggregationName, aCondenserInfos) {
258
267
  aCondenserInfos.forEach(function(oCondenserInfo) {
259
268
  oCondenserInfo.change.condenserState = "delete";
260
269
  });
@@ -275,12 +284,12 @@ sap.ui.define([
275
284
  * @param {Map} mUIReconstructions - Map of UI reconstructions
276
285
  */
277
286
  function updateTargetUIReconstructions(mReducedChanges, mUIReconstructions) {
278
- forEveryMapInMap(mUIReconstructions, function(mUIStates, sContainerId, mUIAggregationState) {
287
+ forEveryMapInMap(mUIReconstructions, function(mUIStates, sContainerId, mUIAggregationState, sAggregationName) {
279
288
  var aInitialElementIds = mUIAggregationState[Utils.INITIAL_UI];
280
289
  var aTargetElementIds = mUIAggregationState[Utils.TARGET_UI];
281
290
  aInitialElementIds.forEach(function(initialElementId, index) {
282
291
  var mTypes = mReducedChanges[initialElementId];
283
- if (!mTypes || !mTypes[Utils.INDEX_RELEVANT]) {
292
+ if (!mTypes || !ObjectPath.get([Utils.INDEX_RELEVANT, sAggregationName], mTypes)) {
284
293
  var sPlaceholder = Utils.PLACEHOLDER + index;
285
294
  var iTargetIndex = aTargetElementIds.indexOf(initialElementId);
286
295
  if (iTargetIndex >= 0) {
@@ -74,7 +74,7 @@ sap.ui.define([
74
74
  return Promise.resolve(aCustomAggregation || JsControlTreeModifier.getAggregation(oContainer, sAggregationName))
75
75
  .then(function(aContainerElements) {
76
76
  return aContainerElements.map(function(oElement) {
77
- return sAffectedControlIdProperty ? oElement.sAffectedControlIdProperty : oElement.getId();
77
+ return sAffectedControlIdProperty ? oElement[sAffectedControlIdProperty] : oElement.getId();
78
78
  });
79
79
  });
80
80
  };
@@ -5,8 +5,9 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/base/util/each"
8
9
  ], function(
9
-
10
+ each
10
11
  ) {
11
12
  "use strict";
12
13
 
@@ -27,6 +28,14 @@ sap.ui.define([
27
28
  } else {
28
29
  oChange.condenserState = "delete";
29
30
  }
31
+ },
32
+
33
+ getChangesFromMap: function(mObjects, sUniqueKey) {
34
+ var aChanges = [];
35
+ each(mObjects[sUniqueKey], function(sKey, oCondenserInfo) {
36
+ aChanges.push(oCondenserInfo.change);
37
+ });
38
+ return aChanges;
30
39
  }
31
40
  };
32
41
  });
@@ -74,7 +74,7 @@ sap.ui.define([
74
74
  *
75
75
  * @namespace sap.ui.fl.write._internal.connectors.BackendConnector
76
76
  * @since 1.72
77
- * @version 1.112.2
77
+ * @version 1.114.0
78
78
  * @private
79
79
  * @ui5-restricted sap.ui.fl.write._internal.connectors
80
80
  */
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  *
33
33
  * @namespace sap.ui.fl.write._internal.connectors.KeyUserConnector
34
34
  * @since 1.70
35
- * @version 1.112.2
35
+ * @version 1.114.0
36
36
  * @private
37
37
  * @ui5-restricted sap.ui.fl.write._internal.Storage
38
38
  */
@@ -59,6 +59,8 @@ sap.ui.define([
59
59
  MANI_FIRST_SUPPORTED: "/sap/bc/ui2/app_index/ui5_app_mani_first_supported"
60
60
  };
61
61
 
62
+ var ADAPTATIONS_SEGMENTATION = "/adaptations/";
63
+
62
64
  /**
63
65
  * Write flex data into LRep back end or update an existing flex data stored in LRep back end
64
66
  *
@@ -89,9 +91,7 @@ sap.ui.define([
89
91
  } else if (mPropertyBag.isCondensingEnabled) {
90
92
  sRoute = ROUTES.CONDENSE;
91
93
  } else if (mPropertyBag.isContextBasedAdaptationEnabled) {
92
- sRoute = ROUTES.CONTEXT_BASED_ADAPTATION + mPropertyBag.reference + "/adaptations/";
93
- //delete reference is needed, otherwise the reference occures twice in the route (is added again to the route in InitialUtils.getUrl())
94
- delete mPropertyBag.reference;
94
+ sRoute = ROUTES.CONTEXT_BASED_ADAPTATION + mPropertyBag.appId + ADAPTATIONS_SEGMENTATION;
95
95
  } else {
96
96
  sRoute = ROUTES.CHANGES;
97
97
  }
@@ -166,7 +166,7 @@ sap.ui.define([
166
166
  *
167
167
  * @namespace sap.ui.fl.write._internal.connectors.LrepConnector
168
168
  * @since 1.67
169
- * @version 1.112.2
169
+ * @version 1.114.0
170
170
  * @private
171
171
  * @ui5-restricted sap.ui.fl.write._internal.Storage
172
172
  */
@@ -618,15 +618,27 @@ sap.ui.define([
618
618
  mPropertyBag.method = "PUT";
619
619
  return _doWrite(mPropertyBag);
620
620
  },
621
+ update: function(mPropertyBag) {
622
+ mPropertyBag.isContextBasedAdaptationEnabled = true;
623
+ mPropertyBag.method = "PUT";
624
+ mPropertyBag.reference = mPropertyBag.adaptationId;
625
+ return _doWrite(mPropertyBag);
626
+ },
621
627
  load: function(mPropertyBag) {
622
628
  var aParameters = ["version"];
623
629
  var mParameters = _pick(mPropertyBag, aParameters);
624
630
  InitialConnector._addClientInfo(mParameters);
625
- mPropertyBag.reference = mPropertyBag.reference + "/adaptations/";
631
+ mPropertyBag.reference = mPropertyBag.appId + ADAPTATIONS_SEGMENTATION;
626
632
  var sDataUrl = InitialUtils.getUrl(ROUTES.CONTEXT_BASED_ADAPTATION, mPropertyBag, mParameters);
627
633
  return InitialUtils.sendRequest(sDataUrl, "GET", {initialConnector: InitialConnector}).then(function (oResult) {
628
634
  return oResult.response;
629
635
  });
636
+ },
637
+ remove: function(mPropertyBag) {
638
+ mPropertyBag.isContextBasedAdaptationEnabled = true;
639
+ mPropertyBag.method = "DELETE";
640
+ mPropertyBag.reference = mPropertyBag.adaptationId;
641
+ return _doWrite(mPropertyBag);
630
642
  }
631
643
  },
632
644
  ui2Personalization: {
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  *
26
26
  * @namespace sap.ui.fl.write._internal.connectors.NeoLrepConnector
27
27
  * @since 1.81
28
- * @version 1.112.2
28
+ * @version 1.114.0
29
29
  * @private
30
30
  * @ui5-restricted sap.ui.fl.write._internal.Storage
31
31
  */
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @namespace sap.ui.fl.write._internal.connectors.ObjectPathConnector
26
26
  * @since 1.73
27
- * @version 1.112.2
27
+ * @version 1.114.0
28
28
  * @private
29
29
  * @ui5-restricted sap.ui.fl.write._internal.Storage
30
30
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  *
29
29
  * @namespace sap.ui.fl.write._internal.connectors.PersonalizationConnector
30
30
  * @since 1.70
31
- * @version 1.112.2
31
+ * @version 1.114.0
32
32
  * @private
33
33
  * @ui5-restricted sap.ui.fl.write._internal.Storage
34
34
  */
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  *
17
17
  * @namespace sap.ui.fl.write._internal.connectors.Utils
18
18
  * @since 1.70
19
- * @version 1.112.2
19
+ * @version 1.114.0
20
20
  * @private
21
21
  * @ui5-restricted sap.ui.fl.write._internal.connectors, sap.ui.fl.write._internal.transport
22
22
  */
@@ -28,7 +28,7 @@ function(
28
28
  * @class
29
29
  * @constructor
30
30
  * @author SAP SE
31
- * @version 1.112.2
31
+ * @version 1.114.0
32
32
  */
33
33
  var Processor = {
34
34
  applyExtensionPoint: function(oExtensionPoint) {
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @alias sap.ui.fl.write._internal.extensionPoint.Registry
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.112.2
23
+ * @version 1.114.0
24
24
  *
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPAccess
41
41
  * @experimental Since 1.87.0
42
42
  * @author SAP SE
43
- * @version 1.112.2
43
+ * @version 1.114.0
44
44
  */
45
45
  var ABAPAccess = {};
46
46
 
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @class
18
18
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariant
19
19
  * @since 1.87
20
- * @version 1.112.2
20
+ * @version 1.114.0
21
21
  * @public
22
22
  * @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
23
23
  */
@@ -117,7 +117,7 @@ sap.ui.define([
117
117
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
118
118
  * @experimental Since 1.87.0
119
119
  * @author SAP SE
120
- * @version 1.112.2
120
+ * @version 1.114.0
121
121
  */
122
122
  var ABAPExtensibilityVariantFactory = {};
123
123
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.MultiTenantABAPExtensibilityVariant
26
26
  * @since 1.87
27
- * @version 1.112.2
27
+ * @version 1.114.0
28
28
  * @public
29
29
  */
30
30
 
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ServiceValidation
20
20
  * @experimental Since 1.87.0
21
21
  * @author SAP SE
22
- * @version 1.112.2
22
+ * @version 1.114.0
23
23
  */
24
24
  var ServiceValidation = {};
25
25
 
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  *
44
44
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant
45
45
  * @since 1.87
46
- * @version 1.112.2
46
+ * @version 1.114.0
47
47
  * @public
48
48
  */
49
49
 
@@ -134,7 +134,7 @@ sap.ui.define([
134
134
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.UriParser
135
135
  * @experimental Since 1.87.0
136
136
  * @author SAP SE
137
- * @version 1.112.2
137
+ * @version 1.114.0
138
138
  */
139
139
  var UriParser = {};
140
140
 
@@ -249,7 +249,7 @@ sap.ui.define([
249
249
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.Utils
250
250
  * @experimental Since 1.87.0
251
251
  * @author SAP SE
252
- * @version 1.112.2
252
+ * @version 1.114.0
253
253
  */
254
254
  var Utils = {};
255
255
 
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @experimental Since 1.93
23
23
  * @private
24
24
  * @author SAP SE
25
- * @version 1.112.2
25
+ * @version 1.114.0
26
26
  */
27
27
  var CAPAccess = {};
28
28
 
@@ -80,7 +80,7 @@ sap.ui.define([
80
80
  * @extends sap.ui.base.ManagedObject
81
81
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog
82
82
  * @author SAP SE
83
- * @version 1.112.2
83
+ * @version 1.114.0
84
84
  * @since 1.93
85
85
  * @experimental Since 1.93
86
86
  * @private
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.booleanEditor.BooleanEditor
19
19
  * @author SAP SE
20
20
  * @since 1.93
21
- * @version 1.112.2
21
+ * @version 1.114.0
22
22
  *
23
23
  * @private
24
24
  * @experimental 1.93
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor
21
21
  * @author SAP SE
22
22
  * @since 1.93
23
- * @version 1.112.2
23
+ * @version 1.114.0
24
24
  *
25
25
  * @private
26
26
  * @experimental 1.93
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor
23
23
  * @author SAP SE
24
24
  * @since 1.93
25
- * @version 1.112.2
25
+ * @version 1.114.0
26
26
  *
27
27
  * @private
28
28
  * @experimental 1.93
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @namespace
38
38
  * @alias sap.ui.fl.write._internal.flexState.FlexObjectState
39
39
  * @since 1.83
40
- * @version 1.112.2
40
+ * @version 1.114.0
41
41
  * @private
42
42
  * @ui5-restricted sap.ui.fl
43
43
  */
@@ -101,8 +101,13 @@ sap.ui.define([
101
101
  // 1. Get current variant references
102
102
  var oComponent = Utils.getAppComponentForControl(oControl);
103
103
  var oModel = oComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
104
- var sFlexReference = oModel && oModel.sFlexReference;
105
- var aVariantManagementReferences = VariantManagementState.getVariantManagementReferences(sFlexReference);
104
+ var aVariantManagementReferences;
105
+ if (oModel) {
106
+ var sFlexReference = oModel && oModel.sFlexReference;
107
+ aVariantManagementReferences = VariantManagementState.getVariantManagementReferences(sFlexReference);
108
+ } else {
109
+ aVariantManagementReferences = [];
110
+ }
106
111
 
107
112
  if (aVariantManagementReferences.length === 0) {
108
113
  return aChanges;
@@ -166,6 +171,7 @@ sap.ui.define([
166
171
  * @param {object} mPropertyBag - Object with parameters as properties
167
172
  * @param {sap.ui.fl.Selector} mPropertyBag.selector - Retrieves the associated flex persistence
168
173
  * @param {string} [mPropertyBag.layer] - Specifies a single layer for loading change; if this parameter is set, the max layer filtering is not applied
174
+ * @param {string} [mPropertyBar.currentLayer] - Specifies a single layer to filtering changes (without filtering ctrl variant changes)
169
175
  * @param {boolean} [mPropertyBag.invalidateCache] - Flag if the cache should be invalidated
170
176
  * @param {boolean} [mPropertyBag.includeCtrlVariants] - Flag if control variant changes should be included
171
177
  * @param {boolean} [mPropertyBag.includeDirtyChanges] - Flag if dirty UI changes should be included
@@ -238,10 +244,8 @@ sap.ui.define([
238
244
  */
239
245
  FlexObjectState.saveFlexObjects = function(mPropertyBag) {
240
246
  var oAppComponent = ChangesController.getAppComponentForSelector(mPropertyBag.selector);
241
- return Promise.all([
242
- saveCompEntities(mPropertyBag),
243
- saveChangePersistenceEntities(mPropertyBag, oAppComponent)
244
- ])
247
+ return saveCompEntities(mPropertyBag)
248
+ .then(saveChangePersistenceEntities.bind(this, mPropertyBag, oAppComponent))
245
249
  .then(function() {
246
250
  if (mPropertyBag.layer) {
247
251
  //TODO: sync the layer parameter name with new persistence and remove this line
@@ -254,13 +254,25 @@ sap.ui.define([
254
254
  return oVariant;
255
255
  }
256
256
 
257
+ function setAuthor(oChangeSpecificData) {
258
+ if (oChangeSpecificData.layer === Layer.VENDOR) {
259
+ oChangeSpecificData.support = {
260
+ user: "SAP"
261
+ };
262
+ } else if (Settings.getInstanceOrUndef() && Settings.getInstanceOrUndef().getUserId()) {
263
+ oChangeSpecificData.support = {
264
+ user: Settings.getInstanceOrUndef().getUserId()
265
+ };
266
+ }
267
+ }
268
+
257
269
  /**
258
270
  * CompVariant state class to handle the state of the compVariants and its changes.
259
271
  * This class is in charge of updating the maps stored in the <code>sap.ui.fl.apply._internal.flexState.FlexState</code>.
260
272
  *
261
273
  * @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
262
274
  * @since 1.83
263
- * @version 1.112.2
275
+ * @version 1.114.0
264
276
  * @private
265
277
  * @ui5-restricted sap.ui.fl
266
278
  */
@@ -388,6 +400,7 @@ sap.ui.define([
388
400
  oChangeSpecificData.layer = determineLayer(oChangeSpecificData);
389
401
  oChangeSpecificData.changeType = oChangeSpecificData.type;
390
402
  oChangeSpecificData.texts = getTexts(oChangeSpecificData);
403
+ setAuthor(oChangeSpecificData);
391
404
  var oFileContent = Object.assign({}, oChangeSpecificData, _omit(mPropertyBag, "changeSpecificData"));
392
405
  var oFlexObject = FlexObjectFactory.createCompVariant(oFileContent);
393
406
 
@@ -538,6 +551,10 @@ sap.ui.define([
538
551
  }
539
552
  });
540
553
 
554
+ if (mPropertyBag.changeSpecificData && mPropertyBag.changeSpecificData.adaptationId !== undefined) {
555
+ oChange.setAdaptationId(mPropertyBag.changeSpecificData.adaptationId);
556
+ }
557
+
541
558
  if (mPropertyBag.name) {
542
559
  oChange.setText("variantName", mPropertyBag.name, "XFLD", true);
543
560
  }
@@ -782,6 +799,10 @@ sap.ui.define([
782
799
  */
783
800
  CompVariantState.persist = function(mPropertyBag) {
784
801
  function writeObjectAndAddToState(oFlexObject, oStoredResponse, sParentVersion) {
802
+ // new public variant should not be visible for other users
803
+ if (oFlexObject.getLayer() === Layer.PUBLIC) {
804
+ oFlexObject.setFavorite(false);
805
+ }
785
806
  // TODO: remove this line as soon as layering and a condensing is in place
786
807
  return Storage.write({
787
808
  flexObjects: [oFlexObject.convertToFileContent ? oFlexObject.convertToFileContent() : oFlexObject.getDefinition()],
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @private
27
27
  * @alias sap.ui.fl.write._internal.transport.TransportSelection
28
28
  * @author SAP SE
29
- * @version 1.112.2
29
+ * @version 1.114.0
30
30
  * @since 1.74.0
31
31
  * Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
32
32
  * of the SmartVariant control.
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * Entity that handles ABAP transport related information.
28
28
  * @alias sap.ui.fl.write._internal.transport.Transports
29
29
  * @author SAP SE
30
- * @version 1.112.2
30
+ * @version 1.114.0
31
31
  * @since 1.74.0
32
32
  * @private
33
33
  * @ui5-restricted sap.ui.fl.write._internal.transport
@@ -0,0 +1,23 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([], function() {
8
+ "use strict";
9
+
10
+ /**
11
+ * Specific adaptation of key user adaptations
12
+ *
13
+ * @enum {string}
14
+ */
15
+ return {
16
+ UrlParameter: "sap-ui-fl-adaptation",
17
+ Type: {
18
+ Default: "DEFAULT",
19
+ Baseline: "BASELINE",
20
+ ContextBased: "CONTEXTBASED"
21
+ }
22
+ };
23
+ });