@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
@@ -0,0 +1,76 @@
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
+ "sap/ui/fl/util/changePropertyValueByPath",
10
+ "sap/ui/fl/util/DescriptorChangeCheck"
11
+ ], function(
12
+ changePropertyValueByPath,
13
+ DescriptorChangeCheck
14
+ ) {
15
+ "use strict";
16
+
17
+ const SUPPORTED_OPERATIONS = ["UPDATE", "UPSERT"];
18
+ const SUPPORTED_PROPERTIES = ["semanticObject", "action", "additionalParameters", "parameters/*"];
19
+
20
+ // Only list properties with limitation
21
+ const PROPERTIES_PATTERNS = {
22
+ semanticObject: "^[\\w\\*]{0,30}$",
23
+ action: "^[\\w\\*]{0,60}$",
24
+ additionalParameters: "^(ignored|allowed|notallowed)$"
25
+ };
26
+
27
+ /**
28
+ * Descriptor change merger for change type <code>appdescr_app_changeOutbound</code>.
29
+ * Changes the outbound object of the app by changing the manifest value <code>sap.app/crossNavigation/outbounds</code>.
30
+ *
31
+ * Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
32
+ *
33
+ * @namespace
34
+ * @alias sap.ui.fl.apply._internal.changes.descriptor.app.ChangeOutbound
35
+ * @version 1.128.0
36
+ * @private
37
+ * @ui5-restricted sap.ui.fl.apply._internal
38
+ */
39
+ const ChangeOutbound = /** @lends sap.ui.fl.apply._internal.changes.descriptor.app.ChangeOutbound */ {
40
+
41
+ /**
42
+ * Applies the <code>appdescr_app_changeOutbound</code> change to the manifest.
43
+ *
44
+ * @param {object} oManifest - Original manifest
45
+ * @param {sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange} oChange - Change with type <code>appdescr_app_changeOutbound</code>
46
+ * @param {object} oChange.content - Details of the change
47
+ * @param {string} oChange.content.outboundId - ID of <code>sap.app/crossNavigation/outbounds/outbound</code> that is being changed
48
+ * @param {object|array} oChange.content.entityPropertyChange - Entity property change or an array of multiple entity property changes
49
+ * @param {string} oChange.content.entityPropertyChange.propertyPath - Path to the property which should be changed. Supported properties: <code>semanticObject</code>,<code>action</code> and <code>additionalParameters</code>
50
+ * @param {string} oChange.content.entityPropertyChange.operation - Operation that is performed on the property defined under propertyPath. Possible values: <code>UPDATE</code> and <code>UPSERT</code>
51
+ * @param {string} oChange.content.entityPropertyChange.propertyValue - New value of the <code>outbound</code> property defined under propertyPath
52
+ * @returns {object} Updated manifest with changed <code>sap.app/crossNavigation/outbounds/outbound</code>
53
+ *
54
+ * @private
55
+ * @ui5-restricted sap.ui.fl.apply._internal
56
+ */
57
+ applyChange(oManifest, oChange) {
58
+ const oCrossNavigation = oManifest["sap.app"].crossNavigation;
59
+ const oChangeContent = oChange.getContent();
60
+ DescriptorChangeCheck.checkEntityPropertyChange(oChangeContent, SUPPORTED_PROPERTIES, SUPPORTED_OPERATIONS, PROPERTIES_PATTERNS);
61
+ if (oCrossNavigation && oCrossNavigation.outbounds) {
62
+ const oOutbound = oCrossNavigation.outbounds[oChangeContent.outboundId];
63
+ if (oOutbound) {
64
+ changePropertyValueByPath(oChangeContent.entityPropertyChange, oOutbound);
65
+ } else {
66
+ throw new Error(`Nothing to update. outbound with ID "${oChangeContent.outboundId}" does not exist.`);
67
+ }
68
+ } else {
69
+ throw new Error("sap.app/crossNavigation or sap.app/crossNavigation/outbounds sections have not been found in manifest.json");
70
+ }
71
+ return oManifest;
72
+ }
73
+ };
74
+
75
+ return ChangeOutbound;
76
+ });
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  *
45
45
  * @namespace
46
46
  * @alias sap.ui.fl.apply._internal.changes.descriptor.app.RemoveAllInboundsExceptOne
47
- * @version 1.127.0
47
+ * @version 1.128.0
48
48
  * @private
49
49
  * @ui5-restricted sap.ui.fl.apply._internal
50
50
  */
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @namespace
24
24
  * @alias sap.ui.fl.apply._internal.changes.descriptor.app.SetAch
25
- * @version 1.127.0
25
+ * @version 1.128.0
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl.apply._internal
28
28
  */
@@ -0,0 +1,44 @@
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
+ /**
16
+ * Descriptor change merger for change type <code>appdescr_app_setDescription</code>.
17
+ * Sets the description of the app by changing the manifest value <code>sap.app/description</code>.
18
+ *
19
+ * Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
20
+ *
21
+ * @namespace sap.ui.fl.apply._internal.changes.descriptor.app.SetDescription
22
+ * @version 1.128.0
23
+ * @private
24
+ * @ui5-restricted sap.ui.fl.apply._internal
25
+ */
26
+ const SetDescription = {
27
+
28
+ /**
29
+ * Applies the <code>appdescr_app_setDescription</code> change to the manifest.
30
+ * @param {object} oManifest - Original manifest
31
+ * @returns {object} Updated manifest with changed description used as a placeholder for postprocessing
32
+ *
33
+ * @private
34
+ * @ui5-restricted sap.ui.fl.apply._internal
35
+ */
36
+ applyChange(oManifest) {
37
+ oManifest["sap.app"].description = `{{${oManifest["sap.app"].id}_sap.app.description}}`;
38
+ return oManifest;
39
+ }
40
+
41
+ };
42
+
43
+ return SetDescription;
44
+ });
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.app.SetTitle
22
- * @version 1.127.0
22
+ * @version 1.128.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl.apply._internal
25
25
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace
22
22
  * @alias sap.ui.fl.apply._internal.changes.descriptor.fiori.SetAbstract
23
- * @version 1.127.0
23
+ * @version 1.128.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @namespace
24
24
  * @alias sap.ui.fl.apply._internal.changes.descriptor.fiori.SetCloudDevAdaptationStatus
25
- * @version 1.127.0
25
+ * @version 1.128.0
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl.apply._internal
28
28
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace
22
22
  * @alias sap.ui.fl.apply._internal.changes.descriptor.fiori.SetRegistrationIds
23
- * @version 1.127.0
23
+ * @version 1.128.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  *
20
20
  * @namespace
21
21
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ovp.AddNewCard
22
- * @version 1.127.0
22
+ * @version 1.128.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl.apply._internal
25
25
  */
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  *
20
20
  * @namespace
21
21
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ovp.ChangeCard
22
- * @version 1.127.0
22
+ * @version 1.128.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl.apply._internal
25
25
  */
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
19
19
  *
20
20
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ovp.DeleteCard
21
- * @version 1.127.0
21
+ * @version 1.128.0
22
22
  * @private
23
23
  * @ui5-restricted sap.ui.fl.apply._internal
24
24
  */
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  *
20
20
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.AddComponentUsages
21
21
  * @since 1.86
22
- * @version 1.127.0
22
+ * @version 1.128.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl.apply._internal
25
25
  */
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @namespace
49
49
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.AddLibrary
50
50
  * @since 1.74
51
- * @version 1.127.0
51
+ * @version 1.128.0
52
52
  * @private
53
53
  * @ui5-restricted sap.ui.fl.apply._internal
54
54
  */
@@ -95,7 +95,7 @@ sap.ui.define([
95
95
  * @namespace
96
96
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModel
97
97
  * @since 1.87
98
- * @version 1.127.0
98
+ * @version 1.128.0
99
99
  * @private
100
100
  * @ui5-restricted sap.ui.fl.apply._internal
101
101
  */
@@ -14,6 +14,41 @@ sap.ui.define([
14
14
  ) {
15
15
  "use strict";
16
16
 
17
+ /**
18
+ * Checks if condition is met to convert bundleUrl to bundleName, which is the case if
19
+ * no bundleName is present but an bundleUrl
20
+ * @param {object} oChangeContent - Details of the change
21
+ * @param {sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange} oChange - Change with type <code>appdescr_ui5_addNewModelEnhanceWith</code>
22
+ * @returns {boolean} - Indicator if bundleUrl can be converted to bundleName
23
+ */
24
+ function hasBundleUrlAndNotBundleName(oChangeContent) {
25
+ const sErrorMessage = "A schema violation has been identified. Either bundleName or bundleUrl property must be used.";
26
+ if (oChangeContent.bundleUrl) {
27
+ if (oChangeContent.bundleName) {
28
+ throw Error(sErrorMessage);
29
+ }
30
+ return true;
31
+ }
32
+ return false;
33
+ }
34
+
35
+ /**
36
+ * Process terminologies to convert bundleUrl to bundleName
37
+ * @param {object} oChangeContent - Details of the change
38
+ * @param {string} sAppId - ID of the application
39
+ */
40
+ function processTerminologies(oChangeContent, sAppId) {
41
+ const aTermoinologiesKeys = Object.keys(oChangeContent.terminologies || {});
42
+ if (aTermoinologiesKeys.length > 0) {
43
+ aTermoinologiesKeys.forEach((sTerminology) => {
44
+ const oTerminologyObject = oChangeContent.terminologies[sTerminology];
45
+ if (hasBundleUrlAndNotBundleName(oTerminologyObject)) {
46
+ oTerminologyObject.bundleName = ApplyUtil.formatBundleName(sAppId, oTerminologyObject.bundleUrl);
47
+ delete oTerminologyObject.bundleUrl;
48
+ }
49
+ });
50
+ }
51
+ }
17
52
  /**
18
53
  * Descriptor change merger for change type <code>appdescr_ui5_addNewModelEnhanceWith</code>.
19
54
  * Adds a <code>settings/enhanceWith</code> node of an existing model with a path to an i18n properties file relative to the location of the manifest.
@@ -23,11 +58,11 @@ sap.ui.define([
23
58
  *
24
59
  * @namespace
25
60
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith
26
- * @version 1.127.0
61
+ * @version 1.128.0
27
62
  * @private
28
63
  * @ui5-restricted sap.ui.fl.apply._internal
29
64
  */
30
- var AddNewModelEnhanceWith = /** @lends sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith */ {
65
+ const AddNewModelEnhanceWith = /** @lends sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith */ {
31
66
 
32
67
  /**
33
68
  * Method to apply the <code>appdescr_ui5_addNewModelEnhanceWith</code> change to the manifest.
@@ -42,17 +77,30 @@ sap.ui.define([
42
77
  * @ui5-restricted sap.ui.fl.apply._internal
43
78
  */
44
79
  applyChange(oManifest, oChange) {
45
- var sModelId = oChange.getContent().modelId;
46
- var sI18N = ApplyUtil.formatBundleName(oManifest["sap.app"].id, oChange.getTexts().i18n);
47
-
48
- var oModel = oManifest["sap.ui5"].models[sModelId];
80
+ const oChangeContent = oChange.getContent();
81
+ const sModelId = oChangeContent.modelId;
82
+ const oModel = oManifest["sap.ui5"].models[sModelId];
49
83
  if (oModel) {
50
84
  if (oModel.type && oModel.type === "sap.ui.model.resource.ResourceModel") {
51
85
  if (!(oModel.settings && oModel.settings.enhanceWith)) {
52
86
  ObjectPath.set("settings.enhanceWith", [], oModel);
53
87
  }
54
- var oEnhanceWith = oModel.settings.enhanceWith;
55
- oEnhanceWith.push({bundleName: sI18N});
88
+ const sAppId = oManifest["sap.app"].id;
89
+ const sI18n = oChange.getTexts()?.i18n;
90
+ const oEnhanceWith = oModel.settings.enhanceWith;
91
+ if (sI18n) {
92
+ oEnhanceWith.push({bundleName: ApplyUtil.formatBundleName(sAppId, sI18n)});
93
+ return oManifest;
94
+ }
95
+ if (hasBundleUrlAndNotBundleName(oChangeContent)) {
96
+ oChangeContent.bundleName = ApplyUtil.formatBundleName(sAppId, oChangeContent.bundleUrl);
97
+ delete oChangeContent.bundleUrl;
98
+ }
99
+ processTerminologies(oChangeContent, sAppId);
100
+ delete oChangeContent.modelId;
101
+ if (Object.keys(oChangeContent).length > 0) {
102
+ oEnhanceWith.push(oChangeContent);
103
+ }
56
104
  }
57
105
  }
58
106
  return oManifest;
@@ -60,6 +108,5 @@ sap.ui.define([
60
108
  skipPostprocessing: true
61
109
 
62
110
  };
63
-
64
111
  return AddNewModelEnhanceWith;
65
112
  });
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace
22
22
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.SetFlexExtensionPointEnabled
23
- * @version 1.127.0
23
+ * @version 1.128.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  *
22
22
  * @namespace
23
23
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.SetMinUI5Version
24
- * @version 1.127.0
24
+ * @version 1.128.0
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl.apply._internal
27
27
  */
@@ -12,7 +12,7 @@ sap.ui.define([], function() {
12
12
  *
13
13
  * @namespace sap.ui.fl.initial._internal.connectors.Utils
14
14
  * @since 1.70
15
- * @version 1.127.0
15
+ * @version 1.128.0
16
16
  * @private
17
17
  * @ui5-restricted sap.ui.fl.initial._internal, sap.ui.fl.write._internal
18
18
  */
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @class
37
37
  * @constructor
38
38
  * @author SAP SE
39
- * @version 1.127.0
39
+ * @version 1.128.0
40
40
  */
41
41
  var Processor;
42
42
 
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @alias sap.ui.fl.apply._internal.extensionPoint.Registry
19
19
  *
20
20
  * @author SAP SE
21
- * @version 1.127.0
21
+ * @version 1.128.0
22
22
  *
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl
@@ -0,0 +1,66 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2024 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([
8
+ "sap/ui/fl/apply/_internal/flexObjects/FlexObject"
9
+ ], function(
10
+ FlexObject
11
+ ) {
12
+ "use strict";
13
+
14
+ /**
15
+ * Flexibility AnnotationChange Class. Changes annotations on underlying V2 and V4 models.
16
+ *
17
+ * @class Flexibility Annotation Change Class.
18
+ * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
19
+ * @alias sap.ui.fl.apply._internal.flexObjects.AnnotationChange
20
+ * @since 1.128
21
+ * @version 1.128.0
22
+ * @private
23
+ * @ui5-restricted
24
+ */
25
+ var AnnotationChange = FlexObject.extend("sap.ui.fl.apply._internal.flexObjects.AnnotationChange", {
26
+
27
+ metadata: {
28
+ properties: {
29
+ /**
30
+ * The selector is required to enable the FlexCommand.
31
+ */
32
+ selector: {
33
+ type: "object",
34
+ defaultValue: {}
35
+ }
36
+ }
37
+ },
38
+
39
+ // eslint-disable-next-line object-shorthand
40
+ constructor: function(...aArgs) {
41
+ FlexObject.apply(this, aArgs);
42
+ this.setFileType("annotation_change");
43
+ }
44
+
45
+ });
46
+
47
+ /**
48
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
49
+ * @returns {object} Mapping information
50
+ * @static
51
+ */
52
+ AnnotationChange.getMappingInfo = function() {
53
+ return Object.assign(FlexObject.getMappingInfo(), {});
54
+ };
55
+
56
+ /**
57
+ * Returns the mapping between flex object properties and file content properties in the back-end response.
58
+ * Can be overridden to avoid access of static mapping within base methods.
59
+ * @returns {object} Mapping information
60
+ */
61
+ AnnotationChange.prototype.getMappingInfo = function() {
62
+ return AnnotationChange.getMappingInfo();
63
+ };
64
+
65
+ return AnnotationChange;
66
+ });
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
19
19
  * @alias sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange
20
20
  * @since 1.105
21
- * @version 1.127.0
21
+ * @version 1.128.0
22
22
  * @private
23
23
  * @ui5-restricted
24
24
  */
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.fl.apply._internal.flexObjects.Variant
33
33
  * @alias sap.ui.fl.apply._internal.flexObjects.CompVariant
34
34
  * @since 1.103
35
- * @version 1.127.0
35
+ * @version 1.128.0
36
36
  * @private
37
37
  * @ui5-restricted sap.ui.fl, sap.ui.comp
38
38
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
21
21
  * @alias sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange
22
22
  * @since 1.105
23
- * @version 1.127.0
23
+ * @version 1.128.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl
26
26
  */
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.fl.apply._internal.flexObjects.Variant
23
23
  * @alias sap.ui.fl.apply._internal.flexObjects.FlVariant
24
24
  * @since 1.104
25
- * @version 1.127.0
25
+ * @version 1.128.0
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl
28
28
  */
@@ -69,7 +69,7 @@ sap.ui.define([
69
69
  * @extends sap.ui.base.ManagedObject
70
70
  * @alias sap.ui.fl.apply._internal.flexObjects.FlexObject
71
71
  * @since 1.100
72
- * @version 1.127.0
72
+ * @version 1.128.0
73
73
  * @private
74
74
  * @ui5-restricted sap.ui.fl
75
75
  */
@@ -6,6 +6,7 @@
6
6
  sap.ui.define([
7
7
  "sap/base/util/restricted/_pick",
8
8
  "sap/base/util/ObjectPath",
9
+ "sap/ui/fl/apply/_internal/flexObjects/AnnotationChange",
9
10
  "sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange",
10
11
  "sap/ui/fl/apply/_internal/flexObjects/CompVariant",
11
12
  "sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange",
@@ -21,6 +22,7 @@ sap.ui.define([
21
22
  ], function(
22
23
  _pick,
23
24
  ObjectPath,
25
+ AnnotationChange,
24
26
  AppDescriptorChange,
25
27
  CompVariant,
26
28
  ControllerExtensionChange,
@@ -42,6 +44,7 @@ sap.ui.define([
42
44
  FL_VARIANT_OBJECT: FlVariant,
43
45
  CONTROLLER_EXTENSION: ControllerExtensionChange,
44
46
  APP_DESCRIPTOR_CHANGE: AppDescriptorChange,
47
+ ANNOTATION_CHANGE: AnnotationChange,
45
48
  UI_CHANGE: UIChange
46
49
  };
47
50
 
@@ -54,6 +57,8 @@ sap.ui.define([
54
57
  return FLEX_OBJECT_TYPES.CONTROLLER_EXTENSION;
55
58
  } else if (oNewFileContent.appDescriptorChange) {
56
59
  return FLEX_OBJECT_TYPES.APP_DESCRIPTOR_CHANGE;
60
+ } else if (oNewFileContent.fileType === "annotation_change") {
61
+ return FLEX_OBJECT_TYPES.ANNOTATION_CHANGE;
57
62
  }
58
63
  return FLEX_OBJECT_TYPES.UI_CHANGE;
59
64
  }
@@ -97,7 +102,7 @@ sap.ui.define([
97
102
  *
98
103
  * @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
99
104
  * @since 1.100
100
- * @version 1.127.0
105
+ * @version 1.128.0
101
106
  * @private
102
107
  * @ui5-restricted sap.ui.fl
103
108
  */
@@ -155,6 +160,12 @@ sap.ui.define([
155
160
  return new AppDescriptorChange(mProperties);
156
161
  };
157
162
 
163
+ FlexObjectFactory.createAnnotationChange = function(mPropertyBag) {
164
+ mPropertyBag.compositeCommand ||= mPropertyBag.support && mPropertyBag.support.compositeCommand;
165
+ var mProperties = createBasePropertyBag(mPropertyBag);
166
+ return new AnnotationChange(mProperties);
167
+ };
168
+
158
169
  /**
159
170
  * Creates a new ControllerExtensionChange.
160
171
  *
@@ -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.127.0
29
+ * @version 1.128.0
30
30
  * @private
31
31
  * @ui5-restricted
32
32
  */
@@ -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.127.0
22
+ * @version 1.128.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl
25
25
  */
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  *
22
22
  * @function
23
23
  * @since 1.121
24
- * @version 1.127.0
24
+ * @version 1.128.0
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl
27
27
  * @alias module:sap/ui/fl/apply/_internal/flexState/compVariants/getVariantAuthor