@openui5/sap.ui.fl 1.127.0 → 1.128.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 (165) hide show
  1. package/package.json +3 -3
  2. package/src/sap/ui/fl/.library +1 -1
  3. package/src/sap/ui/fl/ChangePersistence.js +37 -47
  4. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  5. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
  6. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
  7. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  8. package/src/sap/ui/fl/FlexController.js +11 -9
  9. package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
  10. package/src/sap/ui/fl/LayerUtils.js +1 -1
  11. package/src/sap/ui/fl/Utils.js +17 -12
  12. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  13. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +3 -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 +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +2 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +3 -1
  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/AddNewInbound.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +75 -0
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +76 -0
  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/SetAch.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +44 -0
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +56 -9
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +66 -0
  45. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
  50. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +12 -1
  51. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
  54. package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +41 -1
  55. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +39 -39
  56. package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +3 -0
  57. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  59. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  60. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  61. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  62. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
  63. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +9 -2
  64. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +2 -2
  65. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
  66. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
  67. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  68. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
  69. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  70. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  71. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  72. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  73. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  74. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  75. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +13 -4
  76. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  77. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  78. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  79. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  81. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  82. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  83. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  84. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  85. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  86. package/src/sap/ui/fl/descriptorRelated/Utils.js +19 -0
  87. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  88. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  89. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  90. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  91. package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
  92. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
  93. package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -0
  94. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -1
  95. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
  96. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
  97. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  98. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  99. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  100. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  101. package/src/sap/ui/fl/library.js +43 -43
  102. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +9 -59
  103. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  104. package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +53 -0
  105. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
  106. package/src/sap/ui/fl/support/api/SupportAPI.js +56 -5
  107. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  108. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  109. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  110. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  111. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  112. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  113. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  114. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  115. package/src/sap/ui/fl/util/IFrame.js +1 -1
  116. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  117. package/src/sap/ui/fl/util/changePropertyValueByPath.js +13 -2
  118. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  119. package/src/sap/ui/fl/variants/VariantManagement.js +23 -14
  120. package/src/sap/ui/fl/variants/VariantModel.js +7 -6
  121. package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +12 -12
  122. package/src/sap/ui/fl/write/_internal/SaveAs.js +11 -12
  123. package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
  124. package/src/sap/ui/fl/write/_internal/Versions.js +8 -68
  125. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  126. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  127. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  128. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +65 -16
  129. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  130. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  131. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  132. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  133. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  134. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
  135. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  136. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  137. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  138. package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +1 -0
  139. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  140. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  141. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  142. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  143. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  144. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  145. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  146. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  147. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  148. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  149. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  150. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  151. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  152. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  153. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  154. package/src/sap/ui/fl/write/_internal/flexState/{FlexObjectState.js → FlexObjectManager.js} +26 -56
  155. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  156. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +9 -6
  157. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  158. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  159. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +6 -6
  160. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +4 -2
  161. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  162. package/src/sap/ui/fl/write/api/LocalResetAPI.js +3 -4
  163. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +8 -8
  164. package/src/sap/ui/fl/write/api/TranslationAPI.js +6 -6
  165. package/src/sap/ui/fl/write/api/VersionsAPI.js +34 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.fl",
3
- "version": "1.127.0",
3
+ "version": "1.128.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.0",
18
- "@openui5/sap.ui.core": "1.127.0"
17
+ "@openui5/sap.m": "1.128.0",
18
+ "@openui5/sap.ui.core": "1.128.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.0</version>
9
+ <version>1.128.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
12
12
 
@@ -68,7 +68,7 @@ sap.ui.define([
68
68
  *
69
69
  * @constructor
70
70
  * @author SAP SE
71
- * @version 1.127.0
71
+ * @version 1.128.0
72
72
  * @since 1.25.0
73
73
  * @private
74
74
  * @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
@@ -82,7 +82,6 @@ sap.ui.define([
82
82
  throw new Error("Missing component name.");
83
83
  }
84
84
 
85
- this._aDirtyChanges = [];
86
85
  this._oMessagebundle = undefined;
87
86
  oVariantIndependentUIChangesDataSelector.clearCachedResult({reference: this._mComponent.name});
88
87
  };
@@ -207,29 +206,25 @@ sap.ui.define([
207
206
  return aNewChanges;
208
207
  };
209
208
 
209
+ function createChange(vChange) {
210
+ return (
211
+ typeof vChange.isA === "function"
212
+ && vChange.isA("sap.ui.fl.apply._internal.flexObjects.FlexObject")
213
+ )
214
+ ? vChange
215
+ : FlexObjectFactory.createFromFileContent(vChange);
216
+ }
217
+
210
218
  /**
211
219
  * Adds a new dirty change.
212
220
  *
213
221
  * @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
222
  * @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} The prepared change object
216
223
  * @public
217
224
  */
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
- }
225
+ ChangePersistence.prototype.addDirtyChange = function(vChange) {
226
+ const oNewChange = createChange(vChange);
227
+ FlexState.addDirtyFlexObject(this._mComponent.name, oNewChange);
233
228
  return oNewChange;
234
229
  };
235
230
 
@@ -241,9 +236,7 @@ sap.ui.define([
241
236
  * @public
242
237
  */
243
238
  ChangePersistence.prototype.addDirtyChanges = function(aChanges) {
244
- var aNewChanges = aChanges.map(function(oChange) {
245
- return this.addDirtyChange(oChange, true);
246
- }.bind(this));
239
+ const aNewChanges = aChanges.map(createChange);
247
240
  FlexState.addDirtyFlexObjects(this._mComponent.name, aNewChanges);
248
241
  return aNewChanges;
249
242
  };
@@ -417,7 +410,7 @@ sap.ui.define([
417
410
  * @param {string[]} [aDraftFilenames] - Filenames from persisted changes draft version
418
411
  * @param {boolean} [bCondenseAnyLayer] - This will enable condensing regardless of the current layer
419
412
  * @param {string} [sLayer] - Layer for which the changes should be saved
420
- * @returns {Promise} Resolving after all changes have been saved
413
+ * @returns {Promise<object>} Resolving with the storage response after all changes have been saved
421
414
  */
422
415
  ChangePersistence.prototype.saveDirtyChanges = function(
423
416
  oAppComponent,
@@ -428,7 +421,7 @@ sap.ui.define([
428
421
  bCondenseAnyLayer,
429
422
  sLayer
430
423
  ) {
431
- var aDirtyChanges = aChanges || this._aDirtyChanges;
424
+ var aDirtyChanges = aChanges || FlexObjectState.getDirtyFlexObjects(this._mComponent.name);
432
425
  var sCurrentLayer = aDirtyChanges.length && aDirtyChanges[0].getLayer() || sLayer;
433
426
  var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(
434
427
  this,
@@ -491,9 +484,9 @@ sap.ui.define([
491
484
  * @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
485
  * therefore, the cache update of the current app is skipped because the dirty change is not saved for the running app.
493
486
  * @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
487
+ * @returns {Promise<object>} resolving with the collected storage response after all changes have been saved
495
488
  */
496
- ChangePersistence.prototype.saveSequenceOfDirtyChanges = function(aDirtyChanges, bSkipUpdateCache, sParentVersion) {
489
+ ChangePersistence.prototype.saveSequenceOfDirtyChanges = async function(aDirtyChanges, bSkipUpdateCache, sParentVersion) {
497
490
  var oFirstNewChange;
498
491
  if (sParentVersion) {
499
492
  // in case of changes saved for a draft only the first writing operation must have the parentVersion targeting the basis
@@ -504,11 +497,20 @@ sap.ui.define([
504
497
  oFirstNewChange = [].concat(aNewChanges).shift();
505
498
  }
506
499
 
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());
500
+ // A successful save operation returns the flexObject in the response
501
+ // The flexObjects are returned to the calling function where they will be set to persisted
502
+ const oCollectedResponse = {
503
+ response: []
504
+ };
505
+
506
+ for (const oDirtyChange of aDirtyChanges) {
507
+ const oResponse = await performSingleSaveAction(oDirtyChange, oFirstNewChange, sParentVersion);
508
+ this._updateCacheAndDirtyState(oDirtyChange, bSkipUpdateCache);
509
+ if (oResponse?.response) {
510
+ oCollectedResponse.response.push(...oResponse.response);
511
+ }
512
+ }
513
+ return oCollectedResponse;
512
514
  };
513
515
 
514
516
  function performSingleSaveAction(oDirtyChange, oFirstChange, sParentVersion) {
@@ -542,10 +544,6 @@ sap.ui.define([
542
544
  * therefore, the cache update of the current app is skipped
543
545
  */
544
546
  ChangePersistence.prototype._updateCacheAndDirtyState = function(oDirtyChange, bSkipUpdateCache) {
545
- this._aDirtyChanges = this._aDirtyChanges.filter(function(oExistingDirtyChange) {
546
- return oDirtyChange.getId() !== oExistingDirtyChange.getId();
547
- });
548
-
549
547
  if (!bSkipUpdateCache) {
550
548
  switch (oDirtyChange.getState()) {
551
549
  case States.LifecycleState.NEW:
@@ -568,6 +566,8 @@ sap.ui.define([
568
566
  break;
569
567
  default:
570
568
  }
569
+ oDirtyChange.setState(States.LifecycleState.PERSISTED);
570
+ FlexState.getFlexObjectsDataSelector().checkUpdate({reference: this._mComponent.name});
571
571
  }
572
572
  };
573
573
 
@@ -618,10 +618,6 @@ sap.ui.define([
618
618
  return aChanges;
619
619
  }
620
620
 
621
- ChangePersistence.prototype.getDirtyChanges = function() {
622
- return this._aDirtyChanges;
623
- };
624
-
625
621
  /**
626
622
  * Prepares a change to be deleted with the next call to
627
623
  * @see {ChangePersistence#saveDirtyChanges};
@@ -637,13 +633,12 @@ sap.ui.define([
637
633
  * @param {boolean} [bSkipRemoveFromFlexState] set if the change should not be removed from the FlexState
638
634
  */
639
635
  ChangePersistence.prototype.deleteChange = function(oChange, bRunTimeCreatedChange, bSkipRemoveFromFlexState) {
640
- var nIndexInDirtyChanges = this._aDirtyChanges.indexOf(oChange);
636
+ const nIndexInDirtyChanges = FlexObjectState.getDirtyFlexObjects(this._mComponent.name).indexOf(oChange);
641
637
 
642
638
  if (nIndexInDirtyChanges > -1) {
643
639
  if (oChange.getState() === States.LifecycleState.DELETED) {
644
640
  return;
645
641
  }
646
- this._aDirtyChanges.splice(nIndexInDirtyChanges, 1);
647
642
  if (!bSkipRemoveFromFlexState) {
648
643
  FlexState.removeDirtyFlexObject(this._mComponent.name, oChange);
649
644
  }
@@ -673,12 +668,7 @@ sap.ui.define([
673
668
  };
674
669
 
675
670
  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
- }
671
+ FlexState.removeDirtyFlexObject(this._mComponent.name, oChange);
682
672
  this._deleteChangeInMap(oChange);
683
673
  };
684
674
 
@@ -756,7 +746,7 @@ sap.ui.define([
756
746
  */
757
747
  ChangePersistence.prototype.removeDirtyChanges = function(vLayer, oComponent, oControl, sGenerator, aChangeTypes) {
758
748
  var aLayers = [].concat(vLayer || []);
759
- var aDirtyChanges = this._aDirtyChanges;
749
+ var aDirtyChanges = FlexObjectState.getDirtyFlexObjects(this._mComponent.name);
760
750
 
761
751
  var aChangesToBeRemoved = aDirtyChanges.filter(function(oChange) {
762
752
  var bChangeValid = true;
@@ -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.0
22
+ * @version 1.128.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.0
23
+ * @version 1.128.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.0
23
+ * @version 1.128.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.0
20
+ * @version 1.128.0
21
21
  *
22
22
  * @private
23
23
  * @since 1.48
@@ -5,20 +5,22 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "sap/ui/fl/Layer",
9
- "sap/ui/fl/ChangePersistenceFactory",
10
- "sap/ui/fl/write/_internal/Versions",
11
8
  "sap/ui/fl/apply/_internal/changes/Reverter",
12
9
  "sap/ui/fl/apply/_internal/flexObjects/States",
10
+ "sap/ui/fl/apply/_internal/flexState/FlexObjectState",
13
11
  "sap/ui/fl/apply/_internal/flexState/FlexState",
12
+ "sap/ui/fl/write/_internal/Versions",
13
+ "sap/ui/fl/ChangePersistenceFactory",
14
+ "sap/ui/fl/Layer",
14
15
  "sap/ui/core/util/reflection/JsControlTreeModifier"
15
16
  ], function(
16
- Layer,
17
- ChangePersistenceFactory,
18
- Versions,
19
17
  Reverter,
20
18
  States,
19
+ FlexObjectState,
21
20
  FlexState,
21
+ Versions,
22
+ ChangePersistenceFactory,
23
+ Layer,
22
24
  JsControlTreeModifier
23
25
  ) {
24
26
  "use strict";
@@ -46,7 +48,7 @@ sap.ui.define([
46
48
  * @since 1.27.0
47
49
  * @private
48
50
  * @author SAP SE
49
- * @version 1.127.0
51
+ * @version 1.128.0
50
52
  */
51
53
  var FlexController = function(sComponentName) {
52
54
  this._oChangePersistence = undefined;
@@ -171,12 +173,12 @@ sap.ui.define([
171
173
  *
172
174
  * @param {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} [aDirtyChanges] - Dirty changes to be saved
173
175
  * @param {sap.ui.core.UIComponent} [oAppComponent] - AppComponent instance
174
- * @returns {Promise<object>} Resolves when all changes have been saved with the backend response
176
+ * @returns {Promise<object>} Resolves with the backend response when all changes have been saved
175
177
  * @public
176
178
  */
177
179
  FlexController.prototype.saveSequenceOfDirtyChanges = async function(aDirtyChanges, oAppComponent) {
178
180
  // the same fallback is used in the ChangePersistence, but to update the state we need the changes also here
179
- const aChanges = aDirtyChanges || this._oChangePersistence.getDirtyChanges();
181
+ const aChanges = aDirtyChanges || FlexObjectState.getDirtyFlexObjects(this._sComponentName);
180
182
  const oResponse = await this._oChangePersistence.saveDirtyChanges(oAppComponent, false, aChanges);
181
183
 
182
184
  if (oResponse?.response?.length) {
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @alias sap.ui.fl.FlexControllerFactory
23
23
  * @since 1.27.0
24
24
  * @author SAP SE
25
- * @version 1.127.0
25
+ * @version 1.128.0
26
26
  *
27
27
  * @private
28
28
  * @ui5-restricted sap.ui.fl
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  *
42
42
  * @namespace sap.ui.fl.LayerUtils
43
43
  * @author SAP SE
44
- * @version 1.127.0
44
+ * @version 1.128.0
45
45
  */
46
46
  var LayerUtils = {
47
47
  _mLayersIndex: mLayersIndex,
@@ -65,7 +65,7 @@ sap.ui.define([
65
65
  * @namespace
66
66
  * @alias sap.ui.fl.Utils
67
67
  * @author SAP SE
68
- * @version 1.127.0
68
+ * @version 1.128.0
69
69
  *
70
70
  * @private
71
71
  * @ui5-restricted sap.ui.fl, sap.ui.rta
@@ -181,7 +181,7 @@ sap.ui.define([
181
181
  }
182
182
 
183
183
  if (oComponent?.getManifestEntry) {
184
- var oSapApp = oComponent.getManifestEntry("sap.app");
184
+ const oSapApp = oComponent.getManifestEntry("sap.app");
185
185
 
186
186
  if (oSapApp?.type && oSapApp.type !== "application") {
187
187
  if (oComponent instanceof Component) {
@@ -452,18 +452,19 @@ sap.ui.define([
452
452
  * @param {array.<function>} aPromiseQueue - List of asynchronous functions that returns promises
453
453
  * @param {boolean} bThrowError - true: errors will be rethrown and therefore break the execution
454
454
  * @param {boolean} bAsync - true: asynchronous processing with Promise, false: synchronous processing with FakePromise
455
+ * @param {boolean} bSupressAdditionalErrorMessage - true: additional error message will be suppressed
455
456
  * @returns {Promise} Returns empty resolved Promise or FakePromise when all passed promises inside functions have been executed
456
457
  */
457
- execPromiseQueueSequentially(aPromiseQueue, bThrowError, bAsync) {
458
+ execPromiseQueueSequentially(aPromiseQueue, bThrowError, bAsync, bSupressAdditionalErrorMessage) {
458
459
  if (aPromiseQueue.length === 0) {
459
460
  if (bAsync) {
460
461
  return Promise.resolve();
461
462
  }
462
463
  return (Utils.FakePromise ? new Utils.FakePromise() : Promise.resolve());
463
464
  }
464
- var fnPromise = aPromiseQueue.shift();
465
+ const fnPromise = aPromiseQueue.shift();
465
466
  if (typeof fnPromise === "function") {
466
- var vResult;
467
+ let vResult;
467
468
  try {
468
469
  vResult = fnPromise();
469
470
  } catch (e) {
@@ -476,21 +477,25 @@ sap.ui.define([
476
477
  }
477
478
  })
478
479
  .catch(function(e) {
479
- var sErrorMessage = "Error during execPromiseQueueSequentially processing occurred";
480
+ let sErrorMessage = "Error during execPromiseQueueSequentially processing occurred";
480
481
  sErrorMessage += e ? `: ${e.message}` : "";
481
482
  Log.error(sErrorMessage, e);
482
483
 
483
484
  if (bThrowError) {
484
- throw new Error(sErrorMessage);
485
+ if (bSupressAdditionalErrorMessage) {
486
+ throw new Error(e.message);
487
+ } else {
488
+ throw new Error(sErrorMessage);
489
+ }
485
490
  }
486
491
  })
487
492
  .then(function() {
488
- return this.execPromiseQueueSequentially(aPromiseQueue, bThrowError, bAsync);
493
+ return this.execPromiseQueueSequentially(aPromiseQueue, bThrowError, bAsync, bSupressAdditionalErrorMessage);
489
494
  }.bind(this));
490
495
  }
491
496
 
492
497
  Log.error("Changes could not be applied, promise not wrapped inside function.");
493
- return this.execPromiseQueueSequentially(aPromiseQueue, bThrowError, bAsync);
498
+ return this.execPromiseQueueSequentially(aPromiseQueue, bThrowError, bAsync, bSupressAdditionalErrorMessage);
494
499
  },
495
500
 
496
501
  /**
@@ -515,15 +520,15 @@ sap.ui.define([
515
520
  this.vError = vError;
516
521
  this.bContinueWithFakePromise = arguments.length < 3 || (sInitialPromiseIdentifier === Utils.FakePromise.fakePromiseIdentifier);
517
522
 
518
- var fnResolveOrReject = function(vParam, fn) {
523
+ const fnResolveOrReject = function(vParam, fn) {
519
524
  try {
520
- var vResolve = fn(vParam, Utils.FakePromise.fakePromiseIdentifier);
525
+ const vResolve = fn(vParam, Utils.FakePromise.fakePromiseIdentifier);
521
526
  if (SyncPromise.isThenable(vResolve)) {
522
527
  return vResolve;
523
528
  }
524
529
  return new Utils.FakePromise(vResolve);
525
530
  } catch (oError) {
526
- var vReject = oError;
531
+ const vReject = oError;
527
532
  return new Utils.FakePromise(undefined, vReject);
528
533
  }
529
534
  };
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @private
24
24
  * @author SAP SE
25
- * @version 1.127.0
25
+ * @version 1.128.0
26
26
  *
27
27
  */
28
28
  const DelegateMediator = {};
@@ -59,7 +59,9 @@ sap.ui.define([
59
59
  "appdescr_card_designtime",
60
60
  "appdescr_fiori_setAbstract",
61
61
  "appdescr_fe_changePageConfiguration",
62
- "appdescr_ui5_changeModel"
62
+ "appdescr_ui5_changeModel",
63
+ "appdescr_ui_generic_app_addNewObjectPage",
64
+ "appdescr_ui_generic_app_changePageConfiguration"
63
65
  ];
64
66
  },
65
67
  getCondensableChangeTypes() {
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @since 1.61.0
32
32
  * @private
33
33
  * @author SAP SE
34
- * @version 1.127.0
34
+ * @version 1.128.0
35
35
  */
36
36
  var FlexCustomData = {};
37
37
 
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @namespace sap.ui.fl.apply._internal.changes.Utils
24
24
  * @since 1.70
25
- * @version 1.127.0
25
+ * @version 1.128.0
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl.apply._internal, sap.ui.fl.write._internal
28
28
  */
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  *
28
28
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.Preprocessor
29
29
  * @since 1.74
30
- * @version 1.127.0
30
+ * @version 1.128.0
31
31
  * @private
32
32
  * @ui5-restricted sap.ui.fl.apply._internal
33
33
  */
@@ -17,13 +17,14 @@ sap.ui.define([
17
17
  *
18
18
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.Registration
19
19
  * @since 1.74
20
- * @version 1.127.0
20
+ * @version 1.128.0
21
21
  * @private
22
22
  * @ui5-restricted sap.ui.fl.apply._internal
23
23
  */
24
24
  var Registration = {
25
25
  appdescr_ui5_addLibraries: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary"),
26
26
  appdescr_app_setTitle: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle"),
27
+ appdescr_app_setDescription: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription"),
27
28
  appdescr_ovp_changeCard: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard"),
28
29
  appdescr_ovp_addNewCard: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard"),
29
30
  appdescr_ovp_removeCard: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard"),
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild
22
22
  * @since 1.77
23
- * @version 1.127.0
23
+ * @version 1.128.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -35,8 +35,10 @@ sap.ui.define([
35
35
  appdescr_app_addAnnotationsToOData: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData"),
36
36
  appdescr_app_removeAllInboundsExceptOne: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne"),
37
37
  appdescr_app_changeInbound: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound"),
38
+ appdescr_app_changeOutbound: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound"),
38
39
  appdescr_app_addNewInbound: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound"),
39
40
  appdescr_app_setAch: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch"),
41
+ appdescr_app_addTechnicalAttributes: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes"),
40
42
  appdescr_fiori_setAbstract: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract"),
41
43
  appdescr_fiori_setCloudDevAdaptationStatus: requireAsync.bind(this, "sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus")
42
44
  };
@@ -135,7 +135,7 @@ sap.ui.define([
135
135
  * @namespace
136
136
  * @alias sap.ui.fl.apply._internal.changes.descriptor.app.AddAnnotationsToOData
137
137
  * @since 1.87
138
- * @version 1.127.0
138
+ * @version 1.128.0
139
139
  * @private
140
140
  * @ui5-restricted sap.ui.fl.apply._internal
141
141
  */
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  *
35
35
  * @namespace
36
36
  * @alias sap.ui.fl.apply._internal.changes.descriptor.app.AddNewInbound
37
- * @version 1.127.0
37
+ * @version 1.128.0
38
38
  * @private
39
39
  * @ui5-restricted sap.ui.fl.apply._internal
40
40
  */
@@ -0,0 +1,75 @@
1
+
2
+ /*!
3
+ * OpenUI5
4
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
5
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
6
+ */
7
+
8
+ sap.ui.define([
9
+
10
+ ], function(
11
+
12
+ ) {
13
+ "use strict";
14
+
15
+ const regex = new RegExp("^[A-Z0-9_\\-\\/]+$");
16
+
17
+ /**
18
+ * Descriptor change merger for change type <code>appdescr_app_addTechnicalAttributes</code>.
19
+ * Adds tags to sap.app/tags/technicalAttributes.
20
+ *
21
+ * Available only for build {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
22
+ *
23
+ * @namespace
24
+ * @alias sap.ui.fl.apply._internal.changes.descriptor.app.AddTechnicalAttributes
25
+ * @version 1.128.0
26
+ * @private
27
+ * @ui5-restricted sap.ui.fl.apply._internal
28
+ */
29
+ const AddTechnicalAttributes = {
30
+
31
+ /**
32
+ * Applies the <code>appdescr_app_addTechnicalAttributes</code> change to the manifest.
33
+ *
34
+ * @param {object} oManifest - Original manifest
35
+ * @param {sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange} oChange - Change with type <code>appdescr_app_addTechnicalAttributes</code>
36
+ * @param {object} oChange.content - Details of the change
37
+ * @param {Array<string>} oChange.content.technicalAttributes - Array of technicalAttributes in <code>sap.app/tags/technicalAttributes</code> that is being changed
38
+ * @returns {object} Updated manifest with changed <code>sap.app/tags/technicalAttributes</code>
39
+ *
40
+ * @private
41
+ * @ui5-restricted sap.ui.fl.apply._internal
42
+ */
43
+ applyChange(oManifest, oChange) {
44
+ oManifest["sap.app"] ||= {};
45
+ oManifest["sap.app"].tags ||= {};
46
+ const oTags = oManifest["sap.app"].tags;
47
+ oTags.technicalAttributes ||= [];
48
+ const aManifestTechnicalAttributes = oTags.technicalAttributes;
49
+
50
+ const aTechnicalAttributes = oChange.getContent().technicalAttributes;
51
+ if (!oChange.getContent().hasOwnProperty("technicalAttributes")) {
52
+ throw new Error("Property 'technicalAttributes' in change content is not provided");
53
+ }
54
+
55
+ if (!Array.isArray(aTechnicalAttributes)) {
56
+ throw new Error(`The property 'technicalAttributes' has type '${typeof aTechnicalAttributes}'. Only allowed types for property 'technicalAttributes' is 'array'`);
57
+ }
58
+
59
+ if (!aTechnicalAttributes.every((element) => typeof element === "string")) {
60
+ throw new Error(`The array for the property 'technicalAttributes' does not only consist of strings. Only allowed values for the array is string`);
61
+ }
62
+
63
+ if (!aTechnicalAttributes.every((element) => regex.test(element))) {
64
+ throw new Error(`The array contains disallowed values. Supported values for 'technicalAttributes' should adhere to the regular expression ${regex}`);
65
+ }
66
+
67
+ oTags.technicalAttributes = Array.from(new Set(aManifestTechnicalAttributes.concat(aTechnicalAttributes)));
68
+
69
+ return oManifest;
70
+ }
71
+
72
+ };
73
+
74
+ return AddTechnicalAttributes;
75
+ });
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  *
31
31
  * @namespace
32
32
  * @alias sap.ui.fl.apply._internal.changes.descriptor.app.ChangeDataSource
33
- * @version 1.127.0
33
+ * @version 1.128.0
34
34
  * @private
35
35
  * @ui5-restricted sap.ui.fl.apply._internal
36
36
  */
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  *
32
32
  * @namespace
33
33
  * @alias sap.ui.fl.apply._internal.changes.descriptor.app.ChangeInbound
34
- * @version 1.127.0
34
+ * @version 1.128.0
35
35
  * @private
36
36
  * @ui5-restricted sap.ui.fl.apply._internal
37
37
  */