@openui5/sap.ui.fl 1.128.0 → 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 (170) 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 +13 -421
  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 +27 -51
  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 +1 -1
  13. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  14. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  15. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +5 -5
  17. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +5 -4
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewDataSource.js +152 -0
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +12 -18
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +67 -0
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +1 -1
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +11 -9
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +5 -3
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +18 -5
  45. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +2 -2
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +2 -4
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +19 -10
  50. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +4 -3
  51. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +4 -3
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +16 -12
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +17 -20
  54. package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +4 -3
  55. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +6 -5
  56. package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +1 -1
  57. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +4 -3
  58. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
  59. package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +4 -4
  60. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +17 -61
  61. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  62. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  63. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  64. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  65. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +10 -6
  66. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
  67. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
  68. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +16 -15
  69. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +10 -12
  70. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -6
  71. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  72. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
  73. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  74. package/src/sap/ui/fl/apply/api/AnnotationChangeHandlerAPI.js +63 -0
  75. package/src/sap/ui/fl/changeHandler/AddIFrame.js +4 -4
  76. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  77. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +2 -1
  78. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  79. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
  81. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  82. package/src/sap/ui/fl/changeHandler/HideControl.js +26 -5
  83. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  84. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  85. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  86. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  87. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  88. package/src/sap/ui/fl/changeHandler/UnhideControl.js +33 -1
  89. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  90. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  91. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +14 -13
  92. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  93. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  94. package/src/sap/ui/fl/designtime/util/editIFrame.js +2 -1
  95. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  96. package/src/sap/ui/fl/initial/_internal/Storage.js +10 -8
  97. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
  98. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +3 -3
  99. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +23 -1
  100. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +54 -22
  101. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  102. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  103. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  104. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  105. package/src/sap/ui/fl/library.js +43 -43
  106. package/src/sap/ui/fl/registry/Settings.js +1 -1
  107. package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +29 -58
  108. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
  109. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +12 -66
  110. package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +7 -4
  111. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +30 -19
  112. package/src/sap/ui/fl/support/api/SupportAPI.js +8 -4
  113. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  114. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  115. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  116. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  117. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  118. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  119. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  120. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  121. package/src/sap/ui/fl/util/DescriptorChangeCheck.js +106 -12
  122. package/src/sap/ui/fl/util/IFrame.js +3 -3
  123. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  124. package/src/sap/ui/fl/util/changePropertyValueByPath.js +15 -4
  125. package/src/sap/ui/fl/util/resolveBinding.js +9 -9
  126. package/src/sap/ui/fl/variants/VariantModel.js +49 -32
  127. package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -2
  128. package/src/sap/ui/fl/write/_internal/SaveAs.js +12 -3
  129. package/src/sap/ui/fl/write/_internal/Storage.js +6 -6
  130. package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
  131. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  132. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  133. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  134. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  135. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +3 -3
  136. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  137. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  138. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  139. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  140. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +43 -2
  141. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  142. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +3 -3
  143. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  144. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  145. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  146. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  147. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  148. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  149. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  150. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  151. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +122 -77
  152. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  153. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  154. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  155. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +18 -18
  156. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  157. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +12 -11
  158. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +6 -8
  159. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectManager.js +181 -5
  160. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  161. package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +86 -0
  162. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +43 -43
  163. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  164. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  165. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +22 -19
  166. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +56 -30
  167. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  168. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +28 -51
  169. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +11 -7
  170. package/src/sap/ui/fl/write/api/VersionsAPI.js +6 -4
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
27
27
  * @alias sap.ui.fl.apply._internal.flexObjects.UIChange
28
28
  * @since 1.109
29
- * @version 1.128.0
29
+ * @version 1.129.0
30
30
  * @private
31
31
  * @ui5-restricted
32
32
  */
@@ -113,13 +113,14 @@ sap.ui.define([
113
113
  * @static
114
114
  */
115
115
  UIChange.getMappingInfo = function() {
116
- return Object.assign(FlexObject.getMappingInfo(), {
116
+ return {
117
+ ...FlexObject.getMappingInfo(),
117
118
  selector: "selector",
118
119
  dependentSelectors: "dependentSelector",
119
120
  jsOnly: "jsOnly",
120
121
  variantReference: "variantReference",
121
122
  isChangeOnStandardVariant: "isChangeOnStandardVariant"
122
- });
123
+ };
123
124
  };
124
125
 
125
126
  /**
@@ -335,7 +336,7 @@ sap.ui.define([
335
336
  throw new Error("Parameter mPropertyBag is mandatory");
336
337
  }
337
338
 
338
- var oCurrentDependentSelectors = Object.assign({}, this.getDependentSelectors());
339
+ var oCurrentDependentSelectors = { ...this.getDependentSelectors() };
339
340
 
340
341
  if (oCurrentDependentSelectors[sAlias]) {
341
342
  throw new Error(`Alias '${sAlias}' already exists in the change.`);
@@ -469,7 +470,7 @@ sap.ui.define([
469
470
  */
470
471
  UIChange.prototype.getExtensionPointInfo = function() {
471
472
  if (isPlainObject(this._oExtensionPointInfo)) {
472
- return Object.assign({}, this._oExtensionPointInfo);
473
+ return { ...this._oExtensionPointInfo };
473
474
  }
474
475
  return this._oExtensionPointInfo;
475
476
  };
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @static
41
41
  */
42
42
  UpdatableChange.getMappingInfo = function() {
43
- return Object.assign(UIChange.getMappingInfo(), {});
43
+ return { ...UIChange.getMappingInfo() };
44
44
  };
45
45
 
46
46
  UpdatableChange.prototype.popLatestRevertInfo = function() {
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
20
20
  * @alias sap.ui.fl.apply._internal.flexObjects.Variant
21
21
  * @since 1.103
22
- * @version 1.128.0
22
+ * @version 1.129.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl
25
25
  */
@@ -94,11 +94,12 @@ sap.ui.define([
94
94
  * @static
95
95
  */
96
96
  Variant.getMappingInfo = function() {
97
- return Object.assign(FlexObject.getMappingInfo(), {
97
+ return {
98
+ ...FlexObject.getMappingInfo(),
98
99
  favorite: "favorite",
99
100
  executeOnSelection: "executeOnSelection",
100
101
  contexts: "contexts"
101
- });
102
+ };
102
103
  };
103
104
 
104
105
  /**
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  *
22
22
  * @function
23
23
  * @since 1.121
24
- * @version 1.128.0
24
+ * @version 1.129.0
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl
27
27
  * @alias module:sap/ui/fl/apply/_internal/flexState/compVariants/getVariantAuthor
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @namespace
40
40
  * @alias sap.ui.fl.apply._internal.flexState.FlexObjectState
41
41
  * @since 1.83
42
- * @version 1.128.0
42
+ * @version 1.129.0
43
43
  * @private
44
44
  * @ui5-restricted sap.ui.fl
45
45
  */
@@ -58,13 +58,13 @@ sap.ui.define([
58
58
 
59
59
  function getCompleteDependency(oChange, sReference) {
60
60
  const mInitialDependencies = FlexObjectState.getCompleteDependencyMap(sReference).mDependencies;
61
- return mInitialDependencies[oChange.getId()] && Object.assign({}, mInitialDependencies[oChange.getId()]);
61
+ return mInitialDependencies[oChange.getId()] && { ...mInitialDependencies[oChange.getId()] };
62
62
  }
63
63
 
64
64
  function copyDependencies(oInitialDependency, aNewValidDependencies, oAppComponent, oChange, sReference) {
65
65
  const aNewValidControlDependencies = [];
66
66
  const oDependencyMap = FlexObjectState.getLiveDependencyMap(sReference);
67
- const oModifiedDependency = Object.assign({}, oInitialDependency);
67
+ const oModifiedDependency = { ...oInitialDependency };
68
68
  oInitialDependency.controlsDependencies.forEach((oDependentControlSelector) => {
69
69
  // if the control is already available we don't need to add a dependency to it
70
70
  if (!JsControlTreeModifier.bySelector(oDependentControlSelector, oAppComponent)) {
@@ -231,7 +231,7 @@ sap.ui.define([
231
231
  oSelector.changeTypes ||= [];
232
232
  const mChangesMap = FlexObjectState.getLiveDependencyMap(sFlexReference);
233
233
  let aPromises = [];
234
- const mDependencies = Object.assign({}, mChangesMap.mDependencies);
234
+ const mDependencies = { ...mChangesMap.mDependencies };
235
235
  const {mChanges} = mChangesMap;
236
236
  const aChangesForControl = mChanges[oControl.getId()] || [];
237
237
 
@@ -89,7 +89,7 @@ sap.ui.define([
89
89
  *
90
90
  * @namespace sap.ui.fl.apply._internal.flexState.FlexState
91
91
  * @since 1.73
92
- * @version 1.128.0
92
+ * @version 1.129.0
93
93
  * @private
94
94
  * @ui5-restricted sap.ui.fl.apply._internal
95
95
  */
@@ -145,11 +145,7 @@ sap.ui.define([
145
145
  );
146
146
  // If the parent variant no longer exists, change the reference to the standard variant
147
147
  if (!bParentVariantExists) {
148
- return Object.assign(
149
- {},
150
- oVariant,
151
- { variantReference: oVariant.variantManagementReference }
152
- );
148
+ return { ...oVariant, variantReference: oVariant.variantManagementReference };
153
149
  }
154
150
  return oVariant;
155
151
  });
@@ -306,7 +302,8 @@ sap.ui.define([
306
302
  });
307
303
  });
308
304
 
309
- _mInstances[sReference].runtimePersistence = Object.assign(oRuntimePersistence, {
305
+ _mInstances[sReference].runtimePersistence = {
306
+ ...oRuntimePersistence,
310
307
  flexObjects: aChangeDefinitions.map(function(oChangeDef) {
311
308
  var iObjectIndex;
312
309
  // Only keep FlexObjects found in the storage change definitions
@@ -328,7 +325,7 @@ sap.ui.define([
328
325
  Log.error(sErrorText);
329
326
  throw new Error(sErrorText);
330
327
  })
331
- });
328
+ };
332
329
 
333
330
  // If the final length is different, an object is no longer there (e.g. new version requested)
334
331
  if (iInitialFlexObjectsLength !== _mInstances[sReference].runtimePersistence.flexObjects.length) {
@@ -416,7 +413,7 @@ sap.ui.define([
416
413
  var oResponse = mResponse && mResponse.changes || {};
417
414
  var oFlexInfoSession = FlexInfoSession.getByReference(sReference);
418
415
  if (oResponse.info !== undefined) {
419
- oFlexInfoSession = Object.assign(oFlexInfoSession, oResponse.info);
416
+ oFlexInfoSession = { ...oFlexInfoSession, ...oResponse.info };
420
417
  }
421
418
  FlexInfoSession.setByReference(oFlexInfoSession, sReference);
422
419
  }
@@ -756,97 +753,55 @@ sap.ui.define([
756
753
  }
757
754
  };
758
755
 
759
- /**
760
- * Adds a dirty flex object to the flex state.
761
- *
762
- * @param {string} sReference - Flexibility reference of the app
763
- * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oFlexObject - Flexibility object
764
- */
765
- FlexState.addDirtyFlexObject = function(sReference, oFlexObject) {
766
- if (!_mInstances[sReference]) {
767
- initializeEmptyState(sReference);
768
- }
769
- const sAdaptationLayer = FlexInfoSession.getByReference(sReference).adaptationLayer;
770
- const bFlexObjectsOverAdaptationLayer = !!sAdaptationLayer
771
- && LayerUtils.isOverLayer(oFlexObject.getLayer(), sAdaptationLayer);
772
- const bAlreadyInRuntimePersistence = _mInstances[sReference].runtimePersistence.flexObjects.includes(oFlexObject);
773
- // FIXME: Currently called from the ChangePersistence which might be
774
- // independent of FlexState in some test cases
775
- // Once the ChangePersistence is no longer used
776
- // make sure to remove the safeguard
777
- if (!bFlexObjectsOverAdaptationLayer && _mInstances[sReference] && !bAlreadyInRuntimePersistence) {
778
- _mInstances[sReference].runtimePersistence.flexObjects.push(oFlexObject);
779
- oFlexObjectsDataSelector.checkUpdate(
780
- { reference: sReference },
781
- [{ type: "addFlexObject", updatedObject: oFlexObject }]
782
- );
783
- }
784
- };
785
-
786
756
  /**
787
757
  * Adds a list of dirty flex objects to the flex state.
788
758
  *
789
759
  * @param {string} sReference - Flexibility reference of the app
790
- * @param {array.<sap.ui.fl.apply._internal.flexObjects.FlexObject>} aFlexObjects - Flexibility objects
760
+ * @param {array.<sap.ui.fl.apply._internal.flexObjects.FlexObject>} aFlexObjects - Flex objects
761
+ * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} The flex objects that were added
791
762
  */
792
763
  FlexState.addDirtyFlexObjects = function(sReference, aFlexObjects) {
793
764
  if (!_mInstances[sReference]) {
794
765
  initializeEmptyState(sReference);
795
766
  }
796
767
  const sAdaptationLayer = FlexInfoSession.getByReference(sReference).adaptationLayer;
797
- aFlexObjects = aFlexObjects
768
+ const aFilteredFlexObjects = aFlexObjects
798
769
  .filter((oFlexObject) => !sAdaptationLayer || !LayerUtils.isOverLayer(oFlexObject.getLayer(), sAdaptationLayer))
799
770
  .filter((oFlexObject) => (
800
771
  !_mInstances[sReference].runtimePersistence.flexObjects
801
772
  .some((oExistingFlexObject) => (oExistingFlexObject.getId() === oFlexObject.getId()))
802
773
  ));
803
774
 
804
- if (aFlexObjects.length > 0 && _mInstances[sReference]) {
775
+ if (aFilteredFlexObjects.length > 0) {
805
776
  _mInstances[sReference].runtimePersistence.flexObjects =
806
- _mInstances[sReference].runtimePersistence.flexObjects.concat(aFlexObjects);
777
+ _mInstances[sReference].runtimePersistence.flexObjects.concat(aFilteredFlexObjects);
807
778
  oFlexObjectsDataSelector.checkUpdate(
808
779
  { reference: sReference },
809
- aFlexObjects.map(function(oFlexObject) {
780
+ aFilteredFlexObjects.map(function(oFlexObject) {
810
781
  return { type: "addFlexObject", updatedObject: oFlexObject };
811
782
  })
812
783
  );
813
784
  }
814
- };
815
785
 
816
- FlexState.removeDirtyFlexObject = function(sReference, oFlexObject) {
817
- // FIXME: Currently called from the ChangePersistence which might be
818
- // independent of FlexState in some test cases
819
- // Once the ChangePersistence is no longer used
820
- // make sure to remove the safeguard
821
- if (_mInstances[sReference]) {
822
- const aFlexObjects = _mInstances[sReference].runtimePersistence.flexObjects;
823
- const iIndex = aFlexObjects.indexOf(oFlexObject);
824
- if (iIndex >= 0) {
825
- aFlexObjects.splice(iIndex, 1);
826
- oFlexObjectsDataSelector.checkUpdate(
827
- { reference: sReference },
828
- [{ type: "removeFlexObject", updatedObject: oFlexObject }]
829
- );
830
- }
831
- }
786
+ return aFilteredFlexObjects;
832
787
  };
833
788
 
834
789
  FlexState.removeDirtyFlexObjects = function(sReference, aFlexObjects) {
790
+ const aRemovedFlexObjects = [];
835
791
  // FIXME: Currently called from the ChangePersistence which might be
836
792
  // independent of FlexState in some test cases
837
793
  // Once the ChangePersistence is no longer used
838
794
  // make sure to remove the safeguard
839
795
  if (_mInstances[sReference] && aFlexObjects.length > 0) {
840
- let bFlexObjectRemoved = false;
841
796
  const aCurrentFlexObjects = _mInstances[sReference].runtimePersistence.flexObjects;
842
797
  aFlexObjects.forEach(function(oFlexObject) {
843
798
  const iIndex = aCurrentFlexObjects.indexOf(oFlexObject);
844
799
  if (iIndex >= 0) {
845
- bFlexObjectRemoved = true;
800
+ aRemovedFlexObjects.push(oFlexObject);
846
801
  aCurrentFlexObjects.splice(iIndex, 1);
847
802
  }
848
803
  });
849
- if (bFlexObjectRemoved) {
804
+ if (aRemovedFlexObjects.length > 0) {
850
805
  oFlexObjectsDataSelector.checkUpdate(
851
806
  { reference: sReference },
852
807
  aFlexObjects.map(function(oFlexObject) {
@@ -855,6 +810,7 @@ sap.ui.define([
855
810
  );
856
811
  }
857
812
  }
813
+ return aRemovedFlexObjects;
858
814
  };
859
815
 
860
816
  FlexState.getComponentIdForReference = function(sReference) {
@@ -102,7 +102,7 @@ sap.ui.define([
102
102
  *
103
103
  * @namespace sap.ui.fl.apply._internal.flexState.Loader
104
104
  * @since 1.74
105
- * @version 1.128.0
105
+ * @version 1.129.0
106
106
  * @private
107
107
  * @ui5-restricted sap.ui.fl.apply._internal.flexState
108
108
  */
@@ -78,7 +78,7 @@ function(
78
78
  *
79
79
  * @namespace sap.ui.fl.apply._internal.flexState.ManifestUtils
80
80
  * @since 1.74
81
- * @version 1.128.0
81
+ * @version 1.129.0
82
82
  * @private
83
83
  */
84
84
  var ManifestUtils = {
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  *
17
17
  * @namespace sap.ui.fl.apply._internal.flexState.UI2Personalization.UI2PersonalizationState
18
18
  * @since 1.75
19
- * @version 1.128.0
19
+ * @version 1.129.0
20
20
  * @private
21
21
  * @ui5-restricted
22
22
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.flexState.changes.DependencyHandler
22
22
  * @since 1.74
23
- * @version 1.128.0
23
+ * @version 1.129.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl
26
26
  */
@@ -12,11 +12,11 @@ sap.ui.define([
12
12
  "sap/ui/fl/apply/_internal/changes/Utils",
13
13
  "sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
14
14
  "sap/ui/fl/apply/_internal/flexObjects/States",
15
+ "sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
15
16
  "sap/ui/fl/apply/_internal/flexState/FlexObjectState",
16
17
  "sap/ui/fl/apply/_internal/flexState/FlexState",
17
18
  "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
18
19
  "sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage",
19
- "sap/ui/fl/ChangePersistenceFactory",
20
20
  "sap/ui/fl/Utils"
21
21
  ], (
22
22
  _omit,
@@ -26,11 +26,11 @@ sap.ui.define([
26
26
  ChangesUtils,
27
27
  FlexObjectFactory,
28
28
  FlexObjectStates,
29
+ DependencyHandler,
29
30
  FlexObjectState,
30
31
  FlexState,
31
32
  ManifestUtils,
32
33
  ChangeHandlerStorage,
33
- ChangePersistenceFactory,
34
34
  Utils
35
35
  ) => {
36
36
  "use strict";
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  *
42
42
  * @namespace sap.ui.fl.apply._internal.flexState.changes.ExtensionPointState
43
43
  * @since 1.79
44
- * @version 1.128.0
44
+ * @version 1.129.0
45
45
  * @private
46
46
  * @ui5-restricted
47
47
  */
@@ -167,7 +167,6 @@ sap.ui.define([
167
167
  */
168
168
  ExtensionPointState.enhanceExtensionPointChanges = function(mPropertyBag, mExtensionPointInfo) {
169
169
  mPropertyBag.extensionPointName = mExtensionPointInfo.name;
170
- const oChangePersistence = ChangePersistenceFactory.getChangePersistenceForControl(mExtensionPointInfo.targetControl);
171
170
  const sReference = ManifestUtils.getFlexReferenceForControl(mExtensionPointInfo.targetControl);
172
171
 
173
172
  const aChanges = ExtensionPointState.getChangesForExtensionPoint(sReference, mPropertyBag);
@@ -183,7 +182,9 @@ sap.ui.define([
183
182
  // If the component creation is async, the changesMap already created without changes on EP --> it need to be updated
184
183
  // Otherwise, update the selector of changes is enough, change map will be created later correctly
185
184
  if (FlexState.isInitialized(mPropertyBag)) {
186
- oChangePersistence.addChangeAndUpdateDependencies(mPropertyBag.appComponent, oChange);
185
+ DependencyHandler.addChangeAndUpdateDependencies(
186
+ oChange, mPropertyBag.appComponent, FlexObjectState.getLiveDependencyMap(sReference)
187
+ );
187
188
  }
188
189
  } else if (isValidForRuntimeOnlyChanges(oChange, mExtensionPointInfo)) {
189
190
  // Change is applied but we need to create additional runtime only changes
@@ -217,7 +218,10 @@ sap.ui.define([
217
218
  oFlexObjectMetadata.moduleName = oChange.getFlexObjectMetadata().moduleName;
218
219
  oRuntimeOnlyChange.setFlexObjectMetadata(oFlexObjectMetadata);
219
220
  oRuntimeOnlyChange.setCreation(oChange.getCreation());
220
- oChangePersistence.addChangeAndUpdateDependencies(mPropertyBag.appComponent, oRuntimeOnlyChange, oChange);
221
+ DependencyHandler.insertChange(oRuntimeOnlyChange, FlexObjectState.getLiveDependencyMap(sReference), oChange);
222
+ DependencyHandler.addChangeAndUpdateDependencies(
223
+ oRuntimeOnlyChange, mPropertyBag.appComponent, FlexObjectState.getLiveDependencyMap(sReference)
224
+ );
221
225
  aPromises.push(oRuntimeOnlyChange);
222
226
  })
223
227
  );
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @namespace
25
25
  * @alias sap.ui.fl.apply._internal.flexState.changes.UIChangesState
26
26
  * @since 1.121
27
- * @version 1.128.0
27
+ * @version 1.129.0
28
28
  * @private
29
29
  * @ui5-restricted
30
30
  */
@@ -125,7 +125,7 @@ sap.ui.define([
125
125
  *
126
126
  * @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
127
127
  * @since 1.86
128
- * @version 1.128.0
128
+ * @version 1.129.0
129
129
  * @private
130
130
  * @ui5-restricted sap.ui.fl
131
131
  */
@@ -215,7 +215,7 @@ sap.ui.define([
215
215
  *
216
216
  * @function
217
217
  * @since 1.89
218
- * @version 1.128.0
218
+ * @version 1.129.0
219
219
  * @private
220
220
  * @ui5-restricted sap.ui.fl
221
221
  *
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
 
34
34
  function initialize(mMap, mAuthors, sPersistencyKey, aVariants, sSVMControlId) {
35
35
  aVariants ||= [];
36
- var mMapOfKey = getOrCreate(mMap, sPersistencyKey);
36
+ const mMapOfKey = getOrCreate(mMap, sPersistencyKey);
37
37
  mMapOfKey.controlId = sSVMControlId;
38
38
 
39
39
  // clear all non-persisted variants in case of a reinitialization
@@ -42,11 +42,15 @@ sap.ui.define([
42
42
  });
43
43
 
44
44
  mMapOfKey.nonPersistedVariants = aVariants.map(function(oVariant) {
45
- var oVariantInstance = Object.assign({
46
- id: oVariant.id,
47
- persisted: false
48
- }, oVariant);
49
- oVariantInstance = CompVariantMerger.createVariant(sPersistencyKey, oVariantInstance, mAuthors);
45
+ const oVariantInstance = CompVariantMerger.createVariant(
46
+ sPersistencyKey,
47
+ {
48
+ id: oVariant.id,
49
+ persisted: false,
50
+ ...oVariant
51
+ },
52
+ mAuthors
53
+ );
50
54
  mMapOfKey.byId[oVariant.id] = oVariantInstance;
51
55
  return oVariantInstance;
52
56
  });
@@ -55,19 +59,16 @@ sap.ui.define([
55
59
  }
56
60
 
57
61
  function buildSectionMap(mCompSection, sSubSection, mCompVariants, mAuthors) {
58
- var aFlexObjects = mCompSection[sSubSection].map(function(oCompVariantChangeDefinition) {
59
- var oFlexObject;
60
- if (sSubSection === "variants") {
61
- oFlexObject = FlexObjectFactory.createCompVariant(oCompVariantChangeDefinition, mAuthors);
62
- } else {
63
- oFlexObject = FlexObjectFactory.createFromFileContent(oCompVariantChangeDefinition, UpdatableChange);
64
- }
62
+ const aFlexObjects = mCompSection[sSubSection].map(function(oCompVariantChangeDefinition) {
63
+ const oFlexObject = sSubSection === "variants"
64
+ ? FlexObjectFactory.createCompVariant(oCompVariantChangeDefinition, mAuthors)
65
+ : FlexObjectFactory.createFromFileContent(oCompVariantChangeDefinition, UpdatableChange);
65
66
  oFlexObject.setState(States.LifecycleState.PERSISTED); // prevent persisting these anew
66
67
  return oFlexObject;
67
68
  });
68
69
 
69
70
  aFlexObjects.forEach(function(oFlexObject) {
70
- var sPersistencyKey = oFlexObject.getPersistencyKey
71
+ const sPersistencyKey = oFlexObject.getPersistencyKey
71
72
  ? oFlexObject.getPersistencyKey()
72
73
  : oFlexObject.getSelector().persistencyKey;
73
74
  getOrCreate(
@@ -99,7 +100,7 @@ sap.ui.define([
99
100
  * @returns {object} The prepared map for compVariants
100
101
  */
101
102
  return function(mPropertyBag) {
102
- var mCompVariants = {};
103
+ const mCompVariants = {};
103
104
 
104
105
  // provide the function for fl-internal consumers reuse
105
106
  mCompVariants._getOrCreate = getOrCreate.bind(undefined, mCompVariants);
@@ -34,19 +34,17 @@ sap.ui.define([
34
34
  * @ui5-restricted
35
35
  */
36
36
  function getControlChangesForVariantSwitch(mPropertyBag) {
37
- var aCurrentVariantChanges = VariantManagementState.getControlChangesForVariant(
38
- Object.assign(
39
- _pick(mPropertyBag, ["vmReference", "variantsMap", "reference"]), {
40
- vReference: mPropertyBag.currentVReference
41
- }
42
- )
37
+ const aCurrentVariantChanges = VariantManagementState.getControlChangesForVariant(
38
+ {
39
+ ...(_pick(mPropertyBag, ["vmReference", "variantsMap", "reference"])),
40
+ vReference: mPropertyBag.currentVReference
41
+ }
43
42
  );
44
43
  var aNewChanges = VariantManagementState.getControlChangesForVariant(
45
- Object.assign(
46
- _pick(mPropertyBag, ["vmReference", "variantsMap", "reference"]), {
47
- vReference: mPropertyBag.newVReference
48
- }
49
- )
44
+ {
45
+ ...(_pick(mPropertyBag, ["vmReference", "variantsMap", "reference"])),
46
+ vReference: mPropertyBag.newVReference
47
+ }
50
48
  );
51
49
 
52
50
  var aRevertChanges = [];
@@ -77,7 +75,7 @@ sap.ui.define([
77
75
  *
78
76
  * @namespace sap.ui.fl.apply._internal.flexState.controlVariants.Switcher
79
77
  * @since 1.74
80
- * @version 1.128.0
78
+ * @version 1.129.0
81
79
  * @private
82
80
  * @ui5-restricted
83
81
  */
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  *
33
33
  * @namespace sap.ui.fl.apply._internal.flexState.controlVariants.VariantManagementState
34
34
  * @since 1.74
35
- * @version 1.128.0
35
+ * @version 1.129.0
36
36
  * @private
37
37
  * @ui5-restricted
38
38
  */
@@ -60,6 +60,11 @@ sap.ui.define([
60
60
  });
61
61
 
62
62
  // Check if variant is set via url parameter
63
+ // Legacy URLs can have multiple variant technical parameter instances (length > 1)
64
+ if (aVariantReferencesFromUrl.length === 1) {
65
+ aVariantReferencesFromUrl = aVariantReferencesFromUrl[0].split(",");
66
+ }
67
+
63
68
  var sDesiredSelectedVariantId = aVariantKeys.find((sVariantKey) => {
64
69
  return aVariantReferencesFromUrl.includes(sVariantKey);
65
70
  });
@@ -603,7 +608,7 @@ sap.ui.define([
603
608
  * @ui5-restricted
604
609
  */
605
610
  VariantManagementState.getInitialUIChanges = function(mPropertyBag) {
606
- var oVariantsMap = oVariantManagementMapDataSelector.get({
611
+ const oVariantsMap = oVariantManagementMapDataSelector.get({
607
612
  reference: mPropertyBag.reference
608
613
  });
609
614
  mPropertyBag.includeDirtyChanges = !!mPropertyBag.includeDirtyChanges;
@@ -612,10 +617,11 @@ sap.ui.define([
612
617
  (mPropertyBag.vmReference && mPropertyBag.vmReference === sVMReference)
613
618
  || !mPropertyBag.vmReference
614
619
  ) {
615
- var mArguments = Object.assign({}, mPropertyBag, {
620
+ const mArguments = {
621
+ ...mPropertyBag,
616
622
  vmReference: sVMReference,
617
623
  vReference: oVariantsMap[sVMReference].currentVariant
618
- });
624
+ };
619
625
 
620
626
  // Concatenate with the previous flex changes
621
627
  return aInitialChanges.concat(VariantManagementState.getControlChangesForVariant(mArguments));
@@ -643,10 +649,11 @@ sap.ui.define([
643
649
  (mPropertyBag.vmReference && mPropertyBag.vmReference === sVMReference)
644
650
  || !mPropertyBag.vmReference
645
651
  ) {
646
- const mArguments = Object.assign({}, mPropertyBag, {
652
+ const mArguments = {
653
+ ...mPropertyBag,
647
654
  vmReference: sVMReference,
648
655
  vReference: oVariantsMap[sVMReference].currentVariant
649
- });
656
+ };
650
657
  const oVariant = VariantManagementState.getVariant(mArguments);
651
658
  return aInitialChanges
652
659
  .concat(oVariant.variantChanges)
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @class
27
27
  * @constructor
28
28
  * @author SAP SE
29
- * @version 1.128.0
29
+ * @version 1.129.0
30
30
  * @since 1.27.0
31
31
  * @private
32
32
  * @ui5-restricted sap.ui.fl, sap.ui.core
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @class
41
41
  * @constructor
42
42
  * @author SAP SE
43
- * @version 1.128.0
43
+ * @version 1.129.0
44
44
  * @since 1.43.0
45
45
  * @private
46
46
  */
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @class
39
39
  * @constructor
40
40
  * @author SAP SE
41
- * @version 1.128.0
41
+ * @version 1.129.0
42
42
  * @since 1.27.0
43
43
  * @private
44
44
  */