@openui5/sap.ui.fl 1.122.0 → 1.123.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 (152) 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 +1 -1
  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 +1 -1
  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 +1 -1
  12. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +90 -46
  13. package/src/sap/ui/fl/apply/_internal/DelegateMediatorNew.js +193 -0
  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 +1 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -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/ChangeDataSource.js +1 -1
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector.js +8 -4
  37. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +7 -11
  46. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +6 -2
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +7 -6
  49. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +39 -24
  50. package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +1 -1
  51. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  52. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  54. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  55. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  56. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
  57. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
  58. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
  59. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
  60. package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +0 -3
  61. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  62. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +11 -1
  63. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  64. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
  65. package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +75 -7
  66. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  67. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  68. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  69. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  70. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  71. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
  72. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  73. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  74. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  75. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  76. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  77. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  78. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  79. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  81. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  82. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  83. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  84. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  85. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  86. package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
  87. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
  88. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
  89. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
  90. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
  91. package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +12 -8
  92. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  93. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  94. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  95. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  96. package/src/sap/ui/fl/library.js +43 -43
  97. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
  98. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  99. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
  100. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  101. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  102. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  103. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  104. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  105. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  106. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  107. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  108. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  109. package/src/sap/ui/fl/util/IFrame.js +1 -1
  110. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  111. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  112. package/src/sap/ui/fl/variants/VariantModel.js +18 -1
  113. package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
  114. package/src/sap/ui/fl/write/_internal/Versions.js +12 -9
  115. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  116. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  117. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  118. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  119. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  120. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  121. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  122. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  123. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  124. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
  125. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  126. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  127. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  128. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  129. package/src/sap/ui/fl/write/_internal/delegates/ODataV2ReadDelegate.js +276 -0
  130. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  131. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  132. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  133. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  134. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  135. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  136. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  137. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  138. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  139. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  140. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  141. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  142. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  143. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  144. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +1 -1
  145. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  146. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -1
  147. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  148. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  149. package/src/sap/ui/fl/write/api/FieldExtensibility.js +37 -7
  150. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +0 -1
  151. package/src/sap/ui/fl/write/api/VersionsAPI.js +33 -35
  152. package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +8 -4
@@ -74,7 +74,7 @@ sap.ui.define([
74
74
  *
75
75
  * @namespace sap.ui.fl.write._internal.connectors.BackendConnector
76
76
  * @since 1.72
77
- * @version 1.122.0
77
+ * @version 1.123.0
78
78
  * @private
79
79
  * @ui5-restricted sap.ui.fl.write._internal.connectors
80
80
  */
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * Connector for saving and deleting data from SAPUI5 Flexibility KeyUser service - including personalization.
22
22
  *
23
23
  * @namespace sap.ui.fl.write._internal.connectors.BtpServiceConnector
24
- * @version 1.122.0
24
+ * @version 1.123.0
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl.write._internal.Storage
27
27
  */
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  *
41
41
  * @namespace sap.ui.fl.write._internal.connectors.KeyUserConnector
42
42
  * @since 1.70
43
- * @version 1.122.0
43
+ * @version 1.123.0
44
44
  * @private
45
45
  * @ui5-restricted sap.ui.fl.write._internal.Storage
46
46
  */
@@ -167,7 +167,7 @@ sap.ui.define([
167
167
  *
168
168
  * @namespace sap.ui.fl.write._internal.connectors.LrepConnector
169
169
  * @since 1.67
170
- * @version 1.122.0
170
+ * @version 1.123.0
171
171
  * @private
172
172
  * @ui5-restricted sap.ui.fl.write._internal.Storage
173
173
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.write._internal.connectors.NeoLrepConnector
22
22
  * @since 1.81
23
- * @version 1.122.0
23
+ * @version 1.123.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.write._internal.Storage
26
26
  */
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @namespace sap.ui.fl.write._internal.connectors.ObjectPathConnector
26
26
  * @since 1.73
27
- * @version 1.122.0
27
+ * @version 1.123.0
28
28
  * @private
29
29
  * @ui5-restricted sap.ui.fl.write._internal.Storage
30
30
  */
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  *
24
24
  * @namespace sap.ui.fl.write._internal.connectors.PersonalizationConnector
25
25
  * @since 1.70
26
- * @version 1.122.0
26
+ * @version 1.123.0
27
27
  * @private
28
28
  * @ui5-restricted sap.ui.fl.write._internal.Storage
29
29
  */
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  *
17
17
  * @namespace sap.ui.fl.write._internal.connectors.Utils
18
18
  * @since 1.70
19
- * @version 1.122.0
19
+ * @version 1.123.0
20
20
  * @private
21
21
  * @ui5-restricted sap.ui.fl.write._internal.connectors, sap.ui.fl.write._internal.transport
22
22
  */
@@ -0,0 +1,276 @@
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
+ sap.ui.define(["sap/ui/model/ListBinding"], function(ListBinding) {
7
+ "use strict";
8
+
9
+ /**
10
+ * Checks if the property is using a complex type.
11
+ *
12
+ * @param {Object} mProperty - The property object from the entity type.
13
+ * @returns {boolean} - Returns true if the property is using a complex type, otherwise false.
14
+ */
15
+ function isComplexType(mProperty) {
16
+ return !!(mProperty && mProperty.type && mProperty.type.toLowerCase().indexOf("edm") !== 0);
17
+ }
18
+
19
+ /**
20
+ * Check for absolute aggregation binding.
21
+ *
22
+ * @param {Object} oElement - the element to check
23
+ * @param {string} sAggregationName - the name of the aggregation
24
+ * @return {boolean} whether the path starts with "/"
25
+ */
26
+ function checkForAbsoluteAggregationBinding(oElement, sAggregationName) {
27
+ if (!oElement) {
28
+ return false;
29
+ }
30
+ const mBindingInfo = oElement.getBindingInfo(sAggregationName);
31
+ const sPath = mBindingInfo && mBindingInfo.path;
32
+ if (!sPath) {
33
+ return false;
34
+ }
35
+ return sPath.indexOf("/") === 0;
36
+ }
37
+
38
+ /**
39
+ * Retrieves the default model binding data for the given element based on certain conditions.
40
+ *
41
+ * @param {Object} oElement - The element for which the binding data is retrieved.
42
+ * @param {boolean} bAbsoluteAggregationBinding - Flag indicating whether to use absolute aggregation binding.
43
+ * @param {string} sAggregationName - The name of the aggregation for which binding data is fetched.
44
+ * @return {Object|undefined} The binding data for the element or undefined if not found.
45
+ */
46
+ function getDefaultModelBindingData(oElement, bAbsoluteAggregationBinding, sAggregationName) {
47
+ let vBinding;
48
+ if (bAbsoluteAggregationBinding) {
49
+ vBinding = oElement.getBindingInfo(sAggregationName);
50
+ // check to be default model binding otherwise return undefined
51
+ if (typeof vBinding.model === "string" && vBinding.model !== "") {
52
+ vBinding = undefined;
53
+ }
54
+ } else {
55
+ // here we explicitly request the default models binding context
56
+ vBinding = oElement.getBindingContext();
57
+ }
58
+ return vBinding;
59
+ }
60
+
61
+ /**
62
+ * Enriches a property with additional information such as label, tooltip, and visibility.
63
+ *
64
+ * @param {object} mProperty - The property object to be enriched
65
+ * @param {object} mODataEntity - The OData entity object containing metadata
66
+ * @param {object} oElement - The element to which the property belongs
67
+ * @param {string} sAggregationName - The name of the aggregation
68
+ * @return {object} The enriched property object
69
+ */
70
+ function enrichProperty(mProperty, mODataEntity, oElement, sAggregationName) {
71
+ const mProp = {
72
+ name: mProperty.name,
73
+ bindingPath: mProperty.name,
74
+ entityType: mODataEntity.name
75
+ };
76
+ const mLabelAnnotation = mProperty["com.sap.vocabularies.Common.v1.Label"];
77
+ mProp.label = mLabelAnnotation && mLabelAnnotation.String;
78
+
79
+ const mQuickInfoAnnotation = mProperty["com.sap.vocabularies.Common.v1.QuickInfo"];
80
+ mProp.tooltip = mQuickInfoAnnotation && mQuickInfoAnnotation.String;
81
+
82
+ // CDS UI.Hidden new way also for sap:visible = false
83
+ const mHiddenAnnotation = mProperty["com.sap.vocabularies.UI.v1.Hidden"];
84
+ mProp.hideFromReveal = !!mHiddenAnnotation && mHiddenAnnotation.Bool === "true";
85
+
86
+ if (!mProp.hideFromReveal) {
87
+ // Old hidden annotation
88
+ const mFieldControlAnnotation = mProperty["com.sap.vocabularies.Common.v1.FieldControl"];
89
+ if (mFieldControlAnnotation && mFieldControlAnnotation.EnumMember) {
90
+ mProp.hideFromReveal = mFieldControlAnnotation.EnumMember === "com.sap.vocabularies.Common.v1.FieldControlType/Hidden";
91
+ } else {
92
+ // @runtime hidden by field control value = 0
93
+ const sFieldControlPath = mFieldControlAnnotation && mFieldControlAnnotation.Path;
94
+ if (sFieldControlPath) {
95
+ // if the binding is a list binding, we skip the check for field control
96
+ const bListBinding = oElement.getBinding(sAggregationName) instanceof ListBinding;
97
+ if (!bListBinding) {
98
+ const iFieldControlValue = oElement.getBindingContext().getProperty(sFieldControlPath);
99
+ mProp.hideFromReveal = iFieldControlValue === 0;
100
+ }
101
+ }
102
+ }
103
+ }
104
+ return mProp;
105
+ }
106
+
107
+ /**
108
+ * Converts metadata to delegate format.
109
+ *
110
+ * @param {object} mODataEntity - The OData entity metadata object
111
+ * @param {object} oMetaModel - The meta model object
112
+ * @param {object} oElement - The element object
113
+ * @param {string} sAggregationName - The name of the aggregation
114
+ * @return {array} The properties in delegate format
115
+ */
116
+ function convertMetadataToDelegateFormat(mODataEntity, oMetaModel, oElement, sAggregationName) {
117
+ const aFieldControlProperties = mODataEntity.property
118
+ .map((mProperty) => mProperty["sap:field-control"])
119
+ .filter(Boolean);
120
+
121
+ const fnFilterFieldControlProperties = (mProperty) => !aFieldControlProperties.includes(mProperty.name);
122
+
123
+ const aProperties = mODataEntity.property.map((mProperty) => {
124
+ const mProp = enrichProperty(mProperty, mODataEntity, oElement, sAggregationName);
125
+ if (isComplexType(mProperty)) {
126
+ const mComplexType = oMetaModel.getODataComplexType(mProperty.type);
127
+ if (mComplexType) {
128
+ // deep properties, could get multiple-level deep
129
+ mProp.properties = mComplexType.property
130
+ .map((mComplexProperty) => {
131
+ const mInnerProp = enrichProperty(mComplexProperty, mODataEntity, oElement, sAggregationName);
132
+ mInnerProp.bindingPath = `${mProperty.name}/${mComplexProperty.name}`;
133
+ mInnerProp.referencedComplexPropertyName = mProp.label || mProp.name;
134
+ return mInnerProp;
135
+ })
136
+ .filter(fnFilterFieldControlProperties);
137
+ }
138
+ }
139
+ return mProp;
140
+ });
141
+
142
+ if (mODataEntity.navigationProperty) {
143
+ const aNavigationProperties = mODataEntity.navigationProperty.map((mNavProp) => {
144
+ const sFullyQualifiedEntityName = oMetaModel.getODataAssociationEnd(mODataEntity, mNavProp.name)?.type;
145
+ return {
146
+ name: mNavProp.name,
147
+ // no labels or tooltips for navigation properties
148
+ entityType: sFullyQualifiedEntityName,
149
+ bindingPath: mNavProp.name,
150
+ unsupported: true // no support for navigation properties yet
151
+ // can have properties (like complex types in future)
152
+ };
153
+ });
154
+ aProperties.push(...aNavigationProperties);
155
+ }
156
+
157
+ return aProperties.filter(fnFilterFieldControlProperties);
158
+ }
159
+
160
+ /**
161
+ * Retrieves the binding path based on the provided element, aggregation name, and payload.
162
+ *
163
+ * @param {Object} oElement - the element to get the binding path for
164
+ * @param {string} sAggregationName - the name of the aggregation
165
+ * @param {Object} mPayload - the payload containing the path
166
+ * @return {string} the binding path
167
+ */
168
+ function getBindingPath(oElement, sAggregationName, mPayload) {
169
+ if (mPayload.path) {
170
+ return mPayload.path;
171
+ }
172
+ return checkForAbsoluteAggregationBinding(oElement, sAggregationName)
173
+ ? getDefaultModelBindingData(oElement, true, sAggregationName).path
174
+ : getDefaultModelBindingData(oElement, false, sAggregationName).getPath();
175
+ }
176
+
177
+ /**
178
+ * Load the OData meta model for the given element.
179
+ *
180
+ * @param {object} oElement - The element to load the meta model for
181
+ * @param {object} mPayload - The payload containing model information
182
+ * @return {Promise} A Promise that resolves with the OData meta model or null if not found
183
+ */
184
+ async function loadODataMetaModel(oElement, mPayload) {
185
+ const oModel = oElement.getModel(mPayload.modelName);
186
+ if (oModel && ["sap.ui.model.odata.ODataModel", "sap.ui.model.odata.v2.ODataModel"].includes(oModel.getMetadata().getName())) {
187
+ const oMetaModel = oModel.getMetaModel();
188
+ await oMetaModel.loaded();
189
+ return oMetaModel;
190
+ }
191
+ return null;
192
+ }
193
+
194
+ /**
195
+ * Retrieve OData entity from meta model based on the binding context path.
196
+ *
197
+ * @param {object} oMetaModel - The meta model object
198
+ * @param {string} sBindingContextPath - The binding context path
199
+ * @returns {object} - The OData entity object
200
+ */
201
+ function getODataEntityFromMetaModel(oMetaModel, sBindingContextPath) {
202
+ const oMetaModelContext = oMetaModel.getMetaContext(sBindingContextPath);
203
+ return oMetaModelContext.getObject();
204
+ }
205
+
206
+ /**
207
+ * Adjusts the OData entity for list bindings based on the default aggregation of the given element.
208
+ *
209
+ * @param {sap.ui.core.Element} oElement - The UI5 element for which the OData entity needs to be adjusted.
210
+ * @param {sap.ui.model.odata.ODataMetaModel} oMetaModel - The OData metamodel.
211
+ * @param {object} mODataEntity - The OData entity to be adjusted.
212
+ * @returns {object} The adjusted OData entity.
213
+ */
214
+ function adjustODataEntityForListBindings(oElement, oMetaModel, mODataEntity) {
215
+ const oDefaultAggregation = oElement.getMetadata().getAggregation();
216
+ if (oDefaultAggregation) {
217
+ const oBinding = oElement.getBindingInfo(oDefaultAggregation.name);
218
+ const oTemplate = oBinding && oBinding.template;
219
+
220
+ if (oTemplate) {
221
+ const sPath = oElement.getBindingPath(oDefaultAggregation.name);
222
+ const oODataAssociationEnd = oMetaModel.getODataAssociationEnd(mODataEntity, sPath);
223
+ const sFullyQualifiedEntityName = oODataAssociationEnd && oODataAssociationEnd.type;
224
+ if (sFullyQualifiedEntityName) {
225
+ const oEntityType = oMetaModel.getODataEntityType(sFullyQualifiedEntityName);
226
+ mODataEntity = oEntityType;
227
+ }
228
+ }
229
+ }
230
+ return mODataEntity;
231
+ }
232
+
233
+ /**
234
+ * Retrieve OData properties of a model based on the element, aggregation name, and payload.
235
+ *
236
+ * @param {Object} oElement - The element to retrieve OData properties from.
237
+ * @param {string} sAggregationName - The name of the aggregation.
238
+ * @param {Object} mPayload - The payload containing additional data.
239
+ * @return {Array} The array of OData properties of the model.
240
+ */
241
+ async function getODataPropertiesOfModel(oElement, sAggregationName, mPayload) {
242
+ const oMetaModel = await loadODataMetaModel(oElement, mPayload);
243
+ let aProperties = [];
244
+ if (oMetaModel) {
245
+ const sBindingContextPath = getBindingPath(oElement, sAggregationName, mPayload);
246
+ if (sBindingContextPath) {
247
+ let mODataEntity = getODataEntityFromMetaModel(oMetaModel, sBindingContextPath);
248
+ mODataEntity = adjustODataEntityForListBindings(oElement, oMetaModel, mODataEntity);
249
+ aProperties = convertMetadataToDelegateFormat(
250
+ mODataEntity,
251
+ oMetaModel,
252
+ oElement,
253
+ sAggregationName);
254
+ }
255
+ }
256
+ return aProperties;
257
+ }
258
+ /**
259
+ * Default read delegate for ODataV2 protocoll.
260
+ * @namespace sap.ui.fl.write._internal.delegate.ODataV2ReadDelegate
261
+ * @implements {sap.ui.fl.interfaces.Delegate}
262
+ * @experimental Since 1.123
263
+ * @since 1.123
264
+ * @private
265
+ */
266
+ var ODataV2ReadDelegate = {}; /** @lends sap/ui/fl/write/_internal/delegates/oDataV2ReadDelegate */
267
+
268
+ /**
269
+ * @inheritdoc
270
+ */
271
+ ODataV2ReadDelegate.getPropertyInfo = function(mPropertyBag) {
272
+ return getODataPropertiesOfModel(mPropertyBag.element, mPropertyBag.aggregationName, mPropertyBag.payload);
273
+ };
274
+
275
+ return ODataV2ReadDelegate;
276
+ });
@@ -35,7 +35,7 @@ function(
35
35
  * @class
36
36
  * @constructor
37
37
  * @author SAP SE
38
- * @version 1.122.0
38
+ * @version 1.123.0
39
39
  */
40
40
  var Processor = {
41
41
  applyExtensionPoint(oExtensionPoint) {
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPAccess
41
41
  * @since 1.87.0
42
42
  * @author SAP SE
43
- * @version 1.122.0
43
+ * @version 1.123.0
44
44
  * @private
45
45
  */
46
46
  var ABAPAccess = {};
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @class
18
18
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariant
19
19
  * @since 1.87
20
- * @version 1.122.0
20
+ * @version 1.123.0
21
21
  * @public
22
22
  * @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
23
23
  */
@@ -115,7 +115,7 @@ sap.ui.define([
115
115
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
116
116
  * @since 1.87.0
117
117
  * @author SAP SE
118
- * @version 1.122.0
118
+ * @version 1.123.0
119
119
  * @private
120
120
  */
121
121
  var ABAPExtensibilityVariantFactory = {};
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.MultiTenantABAPExtensibilityVariant
26
26
  * @since 1.87
27
- * @version 1.122.0
27
+ * @version 1.123.0
28
28
  * @public
29
29
  */
30
30
 
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ServiceValidation
20
20
  * @since 1.87.0
21
21
  * @author SAP SE
22
- * @version 1.122.0
22
+ * @version 1.123.0
23
23
  * @private
24
24
  */
25
25
  var ServiceValidation = {};
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  *
44
44
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant
45
45
  * @since 1.87
46
- * @version 1.122.0
46
+ * @version 1.123.0
47
47
  * @public
48
48
  */
49
49
 
@@ -134,7 +134,7 @@ sap.ui.define([
134
134
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.UriParser
135
135
  * @since 1.87.0
136
136
  * @author SAP SE
137
- * @version 1.122.0
137
+ * @version 1.123.0
138
138
  * @private
139
139
  */
140
140
  var UriParser = {};
@@ -245,7 +245,7 @@ sap.ui.define([
245
245
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.Utils
246
246
  * @since 1.87.0
247
247
  * @author SAP SE
248
- * @version 1.122.0
248
+ * @version 1.123.0
249
249
  * @private
250
250
  */
251
251
  var Utils = {};
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @since 1.93
25
25
  * @private
26
26
  * @author SAP SE
27
- * @version 1.122.0
27
+ * @version 1.123.0
28
28
  */
29
29
  var CAPAccess = {};
30
30
 
@@ -82,7 +82,7 @@ sap.ui.define([
82
82
  * @extends sap.ui.base.ManagedObject
83
83
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog
84
84
  * @author SAP SE
85
- * @version 1.122.0
85
+ * @version 1.123.0
86
86
  * @since 1.93
87
87
  * @private
88
88
  * @ui5-restricted
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.booleanEditor.BooleanEditor
19
19
  * @author SAP SE
20
20
  * @since 1.93
21
- * @version 1.122.0
21
+ * @version 1.123.0
22
22
  *
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor
21
21
  * @author SAP SE
22
22
  * @since 1.93
23
- * @version 1.122.0
23
+ * @version 1.123.0
24
24
  *
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor
23
23
  * @author SAP SE
24
24
  * @since 1.93
25
- * @version 1.122.0
25
+ * @version 1.123.0
26
26
  *
27
27
  * @private
28
28
  * @ui5-restricted sap.ui.fl
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @namespace
40
40
  * @alias sap.ui.fl.write._internal.flexState.FlexObjectState
41
41
  * @since 1.83
42
- * @version 1.122.0
42
+ * @version 1.123.0
43
43
  * @private
44
44
  * @ui5-restricted sap.ui.fl
45
45
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.write._internal.flexState.UI2Personalization.UI2PersonalizationState
22
22
  * @since 1.120
23
- * @version 1.122.0
23
+ * @version 1.123.0
24
24
  * @private
25
25
  * @ui5-restricted
26
26
  */
@@ -291,7 +291,7 @@ sap.ui.define([
291
291
  *
292
292
  * @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
293
293
  * @since 1.83
294
- * @version 1.122.0
294
+ * @version 1.123.0
295
295
  * @private
296
296
  * @ui5-restricted sap.ui.fl
297
297
  */
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @private
27
27
  * @alias sap.ui.fl.write._internal.transport.TransportSelection
28
28
  * @author SAP SE
29
- * @version 1.122.0
29
+ * @version 1.123.0
30
30
  * @since 1.74.0
31
31
  * Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
32
32
  * of the SmartVariant control.
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * Entity that handles ABAP transport related information.
28
28
  * @alias sap.ui.fl.write._internal.transport.Transports
29
29
  * @author SAP SE
30
- * @version 1.122.0
30
+ * @version 1.123.0
31
31
  * @since 1.74.0
32
32
  * @private
33
33
  * @ui5-restricted sap.ui.fl.write._internal.transport
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @namespace sap.ui.fl.write.api.FieldExtensibility
24
24
  * @since 1.87
25
- * @version 1.122.0
25
+ * @version 1.123.0
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl, sap.ui.rta, sap.ui.mdc
28
28
  */
@@ -104,6 +104,29 @@ sap.ui.define([
104
104
  /**
105
105
  * Retrieves the necessary texts.
106
106
  *
107
+ * The result should have the following structure
108
+ * Scenario 1 Legacy: Create Custom Field
109
+ * {
110
+ * headerText: string, // Header text for the business contexts
111
+ * tooltip: string // Tooltip for the button
112
+ * }
113
+ *
114
+ * Scenario 2: Potentially multiple options
115
+ * {
116
+ * headerText: string, // Header text for the business contexts
117
+ * buttonText: string, // Text for the MenuButton
118
+ * tooltip: string, // Tooltip for the MenuButton
119
+ * options:
120
+ * [
121
+ * {
122
+ * actionKey: string, // MenuItem unique key (e.g. for Uri assignment)
123
+ * text: string, // Text for the MenuItem, for a single option this becomes the button text
124
+ * tooltip: string // Tooltip for the MenuItem, for a single option this becomes the button tooltip
125
+ * },
126
+ * ...
127
+ * ]
128
+ * }
129
+ *
107
130
  * @returns {Promise<object>} - Object with <code>tooltip</code> and <code>headerText</code>
108
131
  */
109
132
  FieldExtensibility.getTexts = function() {
@@ -112,12 +135,18 @@ sap.ui.define([
112
135
 
113
136
  /**
114
137
  * Retrieves the extension data.
115
- *
116
- * @returns {Promise<object>} All necessary information about the extension data. This will be passed to <code>FieldExtensibility.onTriggerCreateExtensionData</code>
138
+ * The extension data should have the following format:
139
+ * [
140
+ * {
141
+ * businessContext: "string",
142
+ * description: "string",
143
+ * ...
144
+ * },
145
+ * ...
146
+ * ]
147
+ * @returns {Promise<object>} An object containing the <code>extensionData</code> array. This will be passed to <code>FieldExtensibility.onTriggerCreateExtensionData</code>
117
148
  */
118
149
  FieldExtensibility.getExtensionData = function() {
119
- // TODO: currently the return value must be an object that includes .BusinessContexts in order to be shown in the Dialog.
120
- // Will be changed in a follow up
121
150
  return callFunctionInImplementation("getExtensionData");
122
151
  };
123
152
 
@@ -126,10 +155,11 @@ sap.ui.define([
126
155
  *
127
156
  * @param {object} oExtensibilityInfo - Information about the extension data. Should be the return value of <code>FieldExtensibility.getExtensionData</code>
128
157
  * @param {string} sRtaStyleClassName - CSS style class that should be added to any dialogs
158
+ * @param {string} sActionKey - Key for the mapping of specific actions (e.g. which URI to open for given extension data)
129
159
  * @returns {Promise} Resolves with the return value of the function in the implementation
130
160
  */
131
- FieldExtensibility.onTriggerCreateExtensionData = function(oExtensibilityInfo, sRtaStyleClassName) {
132
- return callFunctionInImplementation("onTriggerCreateExtensionData", oExtensibilityInfo, sRtaStyleClassName);
161
+ FieldExtensibility.onTriggerCreateExtensionData = function(oExtensibilityInfo, sRtaStyleClassName, sActionKey) {
162
+ return callFunctionInImplementation("onTriggerCreateExtensionData", oExtensibilityInfo, sRtaStyleClassName, sActionKey);
133
163
  };
134
164
 
135
165
  // Resets the current scenario for testing purposes
@@ -351,7 +351,6 @@ sap.ui.define([
351
351
  oReloadInfo.reloadMethod = oRELOAD.VIA_HASH;
352
352
  }
353
353
  }
354
- FlexInfoSession.removeByReference(sReference);
355
354
  return oReloadInfo;
356
355
  }
357
356
  };