@openui5/sap.ui.fl 1.140.0 → 1.141.1

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 (194) hide show
  1. package/.eslint-rules/import-check.js +71 -0
  2. package/THIRDPARTY.txt +2 -2
  3. package/package.json +3 -3
  4. package/src/sap/ui/fl/.library +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/LayerUtils.js +1 -1
  9. package/src/sap/ui/fl/Utils.js +1 -1
  10. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +13 -3
  11. package/src/sap/ui/fl/apply/_internal/changes/Applier.js +3 -2
  12. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  13. package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +4 -1
  14. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
  15. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewDataSource.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/AddNewOutbound.js +1 -1
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/ChangeModel.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
  50. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  51. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +2 -8
  54. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
  55. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +2 -2
  56. package/src/sap/ui/fl/apply/_internal/flexObjects/VariantChange.js +1 -1
  57. package/src/sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +6 -3
  59. package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +2 -2
  60. package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +1 -1
  61. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +53 -161
  62. package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +0 -8
  63. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  64. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  65. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  66. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
  67. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState.js +2 -5
  68. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +22 -5
  69. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +54 -12
  70. package/src/sap/ui/fl/apply/_internal/init.js +47 -0
  71. package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +14 -5
  72. package/src/sap/ui/fl/apply/api/AnnotationChangeHandlerAPI.js +2 -1
  73. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +190 -53
  74. package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +17 -1
  75. package/src/sap/ui/fl/apply/api/ExtensionPointRegistryAPI.js +2 -1
  76. package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +2 -1
  77. package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +2 -1
  78. package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +2 -1
  79. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/AddXML.js +2 -2
  81. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +4 -4
  82. package/src/sap/ui/fl/changeHandler/Base.js +3 -2
  83. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  84. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +21 -9
  85. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  86. package/src/sap/ui/fl/changeHandler/ChangeAnnotation.js +7 -2
  87. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  88. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  89. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  90. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  91. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  92. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  93. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  94. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  95. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  96. package/src/sap/ui/fl/changeHandler/common/createIFrame.js +1 -4
  97. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChange.js +3 -3
  98. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +3 -3
  99. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  100. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  101. package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +14 -12
  102. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  103. package/src/sap/ui/fl/initial/_internal/Loader.js +243 -79
  104. package/src/sap/ui/fl/initial/_internal/ManifestUtils.js +1 -1
  105. package/src/sap/ui/fl/initial/_internal/Settings.js +1 -1
  106. package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
  107. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
  108. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +67 -9
  109. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
  110. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +12 -5
  111. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  112. package/src/sap/ui/fl/{apply → initial}/_internal/preprocessors/ControllerExtension.js +15 -4
  113. package/src/sap/ui/fl/{apply → initial}/_internal/preprocessors/RegistrationDelegator.js +7 -38
  114. package/src/sap/ui/fl/{apply → initial}/_internal/preprocessors/XmlPreprocessor.js +28 -20
  115. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  116. package/src/sap/ui/fl/initial/api/InitialFlexAPI.js +1 -1
  117. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  118. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  119. package/src/sap/ui/fl/library.js +44 -44
  120. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
  121. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  122. package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +1 -1
  123. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
  124. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  125. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  126. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  127. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  128. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  129. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  130. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  131. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  132. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  133. package/src/sap/ui/fl/util/IFrame.js +3 -2
  134. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  135. package/src/sap/ui/fl/variants/VariantManagement.js +49 -36
  136. package/src/sap/ui/fl/variants/VariantManager.js +75 -15
  137. package/src/sap/ui/fl/variants/VariantModel.js +7 -165
  138. package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
  139. package/src/sap/ui/fl/write/_internal/Versions.js +9 -5
  140. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  141. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  142. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  143. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  144. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  145. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  146. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  147. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  148. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  149. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
  150. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  151. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  152. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  153. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  154. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  155. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  156. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  157. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  158. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  159. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  160. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  161. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  162. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  163. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  164. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  165. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  166. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  167. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  168. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectManager.js +30 -21
  169. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +3 -3
  170. package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +1 -1
  171. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantManager.js +2 -19
  172. package/src/sap/ui/fl/write/_internal/init.js +27 -0
  173. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  174. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  175. package/src/sap/ui/fl/write/api/Adaptations.js +1 -1
  176. package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +2 -1
  177. package/src/sap/ui/fl/write/api/BusinessNetworkAPI.js +9 -8
  178. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +2 -1
  179. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +2 -3
  180. package/src/sap/ui/fl/write/api/ContextSharingAPI.js +2 -1
  181. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +2 -1
  182. package/src/sap/ui/fl/write/api/FeaturesAPI.js +2 -1
  183. package/src/sap/ui/fl/write/api/FieldExtensibility.js +3 -2
  184. package/src/sap/ui/fl/write/api/LocalResetAPI.js +2 -1
  185. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +10 -3
  186. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +5 -2
  187. package/src/sap/ui/fl/write/api/SACIntegrationUpdateVariant.js +2 -1
  188. package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +2 -1
  189. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +2 -1
  190. package/src/sap/ui/fl/write/api/TranslationAPI.js +2 -1
  191. package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +2 -1
  192. package/src/sap/ui/fl/write/api/VersionsAPI.js +2 -1
  193. package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +2 -1
  194. package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +2 -1
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * Change handler for stashing of a control.
20
20
  * @alias sap.ui.fl.changeHandler.StashControl
21
21
  * @author SAP SE
22
- * @version 1.140.0
22
+ * @version 1.141.1
23
23
  * @since 1.27.0
24
24
  */
25
25
  const StashControl = {};
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * Change handler for revealing of a control.
22
22
  * @alias sap.ui.fl.changeHandler.UnhideControl
23
23
  * @author SAP SE
24
- * @version 1.140.0
24
+ * @version 1.141.1
25
25
  * @since 1.27.0
26
26
  */
27
27
  const UnhideControl = {};
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * Change handler for unstashing of a control.
16
16
  * @alias sap.ui.fl.changeHandler.UnstashControl
17
17
  * @author SAP SE
18
- * @version 1.140.0
18
+ * @version 1.141.1
19
19
  * @since 1.27.0
20
20
  */
21
21
  const UnstashControl = {};
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  *
19
19
  * @alias sap.ui.fl.changeHandler.UpdateIFrame
20
20
  * @author SAP SE
21
- * @version 1.140.0
21
+ * @version 1.141.1
22
22
  * @since 1.72
23
23
  * @private
24
24
  */
@@ -4,10 +4,7 @@
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
6
6
 
7
- sap.ui.define([
8
- "sap/ui/fl/util/IFrame"
9
- ], function(
10
- ) {
7
+ sap.ui.define([], function() {
11
8
  "use strict";
12
9
 
13
10
  /**
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @namespace
24
24
  * @name sap.ui.fl.descriptorRelated
25
25
  * @author SAP SE
26
- * @version 1.140.0
26
+ * @version 1.141.1
27
27
  * @private
28
28
  * @ui5-restricted sap.ui.rta, smart business
29
29
  */
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @namespace
34
34
  * @name sap.ui.fl.descriptorRelated.api
35
35
  * @author SAP SE
36
- * @version 1.140.0
36
+ * @version 1.141.1
37
37
  * @private
38
38
  * @ui5-restricted sap.ui.rta, smart business
39
39
  */
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @constructor
48
48
  * @alias sap.ui.fl.descriptorRelated.api.DescriptorChange
49
49
  * @author SAP SE
50
- * @version 1.140.0
50
+ * @version 1.141.1
51
51
  * @private
52
52
  * @ui5-restricted sap.ui.rta, smart business
53
53
  */
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * @namespace
16
16
  * @name sap.ui.fl.descriptorRelated
17
17
  * @author SAP SE
18
- * @version 1.140.0
18
+ * @version 1.141.1
19
19
  * @private
20
20
  * @ui5-restricted sap.ui.rta, smart business
21
21
  */
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @namespace
26
26
  * @name sap.ui.fl.descriptorRelated.api
27
27
  * @author SAP SE
28
- * @version 1.140.0
28
+ * @version 1.141.1
29
29
  * @private
30
30
  * @ui5-restricted sap.ui.rta, smart business
31
31
  */
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @constructor
38
38
  * @alias sap.ui.fl.descriptorRelated.api.DescriptorChangeFactory
39
39
  * @author SAP SE
40
- * @version 1.140.0
40
+ * @version 1.141.1
41
41
  * @private
42
42
  * @ui5-restricted sap.ui.rta, smart business
43
43
  */
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @namespace
39
39
  * @alias sap.ui.fl.descriptorRelated.api.DescriptorInlineChangeFactory
40
40
  * @author SAP SE
41
- * @version 1.140.0
41
+ * @version 1.141.1
42
42
  * @private
43
43
  * @deprecated Since version 1.76
44
44
  * @ui5-restricted sap.ui.rta, smart business
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @namespace
17
17
  * @alias sap.ui.fl.descriptorRelated.api.DescriptorVariantFactory
18
18
  * @author SAP SE
19
- * @version 1.140.0
19
+ * @version 1.141.1
20
20
  * @private
21
21
  * @deprecated Since version 1.73
22
22
  * @ui5-restricted sap.ui.rta, smart business
@@ -15,7 +15,8 @@ sap.ui.define([
15
15
  flUtils
16
16
  ) {
17
17
  "use strict";
18
- var fnSetControlAttributes = function(oVariantManagement, bDesignTimeMode) {
18
+
19
+ async function fnSetControlAttributes(oVariantManagement, bDesignTimeMode) {
19
20
  var oAppComponent = flUtils.getAppComponentForControl(oVariantManagement);
20
21
  var sControlId = oVariantManagement.getId();
21
22
  var oModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
@@ -26,15 +27,15 @@ sap.ui.define([
26
27
  }
27
28
 
28
29
  if (bDesignTimeMode) {
29
- oModel.waitForVMControlInit(sVariantManagementReference).then(function() {
30
- oModel.setModelPropertiesForControl(sVariantManagementReference, bDesignTimeMode, oVariantManagement);
31
- oModel.checkUpdate(true);
32
- });
30
+ await oVariantManagement.waitForInit();
31
+ oModel.setModelPropertiesForControl(sVariantManagementReference, bDesignTimeMode, oVariantManagement);
32
+ oModel.checkUpdate(true);
33
33
  } else {
34
34
  oModel.setModelPropertiesForControl(sVariantManagementReference, bDesignTimeMode, oVariantManagement);
35
35
  oModel.checkUpdate(true);
36
36
  }
37
- };
37
+ }
38
+
38
39
  return {
39
40
  annotations: {},
40
41
  properties: {
@@ -85,17 +86,18 @@ sap.ui.define([
85
86
  },
86
87
  actions: {
87
88
  controlVariant(oVariantManagement) {
88
- var oAppComponent = flUtils.getAppComponentForControl(oVariantManagement);
89
- var sControlId = oVariantManagement.getId();
90
- var oModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
91
- var sVariantManagementReference = oAppComponent.getLocalId(sControlId) || sControlId;
92
89
  return {
93
90
  validators: [
94
91
  "noEmptyText",
95
92
  {
96
93
  validatorFunction(sNewText) {
97
- var iDuplicateCount = oModel._getVariantTitleCount(sNewText, sVariantManagementReference) || 0;
98
- return iDuplicateCount === 0;
94
+ // Avoid duplicate titles
95
+ return !oVariantManagement.getVariants().some(function(oVariant) {
96
+ if (oVariant.getKey() === oVariantManagement.getCurrentVariantKey()) {
97
+ return false;
98
+ }
99
+ return sNewText.toLowerCase() === oVariant.getTitle().toLowerCase() && oVariant.getVisible();
100
+ });
99
101
  },
100
102
  errorMessage: Lib.getResourceBundleFor("sap.m").getText("VARIANT_MANAGEMENT_ERROR_DUPLICATE")
101
103
  }
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * The flexibility Configuration.
17
17
  *
18
18
  * @author SAP SE
19
- * @version 1.140.0
19
+ * @version 1.141.1
20
20
  * @private
21
21
  * @alias module:sap/ui/fl/initial/_internal/FlexConfiguration
22
22
  * @namespace
@@ -5,15 +5,23 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/base/util/Deferred",
9
+ "sap/base/util/merge",
8
10
  "sap/base/util/ObjectPath",
11
+ "sap/base/Log",
9
12
  "sap/ui/base/ManagedObject",
13
+ "sap/ui/fl/initial/_internal/FlexInfoSession",
10
14
  "sap/ui/fl/initial/_internal/ManifestUtils",
11
15
  "sap/ui/fl/initial/_internal/Settings",
12
16
  "sap/ui/fl/initial/_internal/Storage",
13
17
  "sap/ui/fl/initial/_internal/StorageUtils"
14
18
  ], function(
19
+ Deferred,
20
+ merge,
15
21
  ObjectPath,
22
+ Log,
16
23
  ManagedObject,
24
+ FlexInfoSession,
17
25
  ManifestUtils,
18
26
  Settings,
19
27
  Storage,
@@ -21,6 +29,20 @@ sap.ui.define([
21
29
  ) {
22
30
  "use strict";
23
31
 
32
+ const _mCachedFlexData = {};
33
+ const _mInitPromises = {};
34
+
35
+ /**
36
+ * Class for loading Flex Data from the backend via the Connectors.
37
+ *
38
+ * @namespace sap.ui.fl.apply._internal.flexState.Loader
39
+ * @since 1.74
40
+ * @version 1.141.1
41
+ * @private
42
+ * @ui5-restricted sap.ui.fl.apply._internal.flexState
43
+ */
44
+ const Loader = {};
45
+
24
46
  function getIdIsLocalTrueObject(vSelector) {
25
47
  if (typeof vSelector === "string") {
26
48
  vSelector = {id: vSelector};
@@ -30,8 +52,8 @@ sap.ui.define([
30
52
  return vSelector;
31
53
  }
32
54
 
33
- function migrateSelectorFlags(bMigrationNeeded, mFlexData) {
34
- if (bMigrationNeeded) {
55
+ function migrateOVPSelectorFlags(oManifest, mFlexData) {
56
+ if (ManifestUtils.getOvpEntry(oManifest)) {
35
57
  [
36
58
  mFlexData.changes,
37
59
  mFlexData.variantChanges,
@@ -81,18 +103,6 @@ sap.ui.define([
81
103
  return mFlexData;
82
104
  }
83
105
 
84
- function isMigrationNeeded(oManifest) {
85
- return oManifest && !!ManifestUtils.getOvpEntry(oManifest);
86
- }
87
-
88
- function formatFlexData(mFlexData) {
89
- // TODO: rename "changes" everywhere to avoid oResponse.changes.changes calls
90
- return {
91
- changes: mFlexData,
92
- cacheKey: mFlexData.cacheKey
93
- };
94
- }
95
-
96
106
  function getSideId(oComponentData) {
97
107
  if (oComponentData?.startupParameters && Array.isArray(oComponentData.startupParameters.hcpApplicationId)) {
98
108
  return oComponentData.startupParameters.hcpApplicationId[0];
@@ -131,78 +141,232 @@ sap.ui.define([
131
141
  }
132
142
 
133
143
  /**
134
- * Class for loading Flex Data from the backend via the Connectors.
144
+ * Provides the flex data for a given application based on the configured connectors.
145
+ * This function needs a manifest object, async hints and either an ID to an instantiated component or component data as parameter.
146
+ * The fetched data is cached statically in the Loader class. Together with the data, all parameters that have been used
147
+ * for the request are cached as well. If the function is called again with the same parameters,
148
+ * the cached data is returned instead of a new request to the backend.
135
149
  *
136
- * @namespace sap.ui.fl.apply._internal.flexState.Loader
137
- * @since 1.74
138
- * @version 1.140.0
139
- * @private
140
- * @ui5-restricted sap.ui.fl.apply._internal.flexState
150
+ * @param {object} mPropertyBag - Contains additional data needed for loading changes
151
+ * @param {object} mPropertyBag.manifest - ManifestObject that belongs to current component
152
+ * @param {string} mPropertyBag.reference - Flex Reference
153
+ * @param {object} mPropertyBag.componentData - Component data of the current component
154
+ * @param {boolean} [mPropertyBag.reInitialize] - Flag if the application is reinitialized even if it was loaded before
155
+ * @param {object} [mPropertyBag.asyncHints] - Async hints passed from the app index to the component processing
156
+ * @param {boolean} [mPropertyBag.skipLoadBundle=false] - If true only the partial flex data is loaded, without the bundle
157
+ * @returns {Promise<object>} Resolves with the change file for the given component from the Storage
141
158
  */
142
- return {
143
- /**
144
- * Provides the flex data for a given application based on the configured connectors.
145
- * This function needs a manifest object, async hints and either an ID to an instantiated component or component data as parameter.
146
- *
147
- * The property <code>partialFlexData</code> contains the flexData except the data from flexibility-bundle.json or changes-bundle.json.
148
- * This is needed in case descriptor changes are required in a maniFirst scenario before the component and thus the bundle can be loaded.
149
- *
150
- * @param {object} mPropertyBag - Contains additional data needed for loading changes
151
- * @param {object} mPropertyBag.manifest - ManifestObject that belongs to current component
152
- * @param {object} mPropertyBag.reference - Flex Reference
153
- * @param {string} mPropertyBag.componentData - Component data of the current component
154
- * @param {object} [mPropertyBag.reInitialize] - Flag if the application is reinitialized even if it was loaded before
155
- * @param {object} [mPropertyBag.asyncHints] - Async hints passed from the app index to the component processing
156
- * @param {number} [mPropertyBag.version] - Number of the version in which the state should be initialized
157
- * @param {string} [mPropertyBag.adaptationId] - Context-based adaptation for which the state should be initialized
158
- * @param {boolean} [mPropertyBag.skipLoadBundle=false] - If true only the partial flex data is loaded, without the bundle
159
- * @param {boolean} [mPropertyBag.allContexts] - Includes also restricted context
160
- * @param {object} [mPropertyBag.partialFlexData] - Already loaded data if only the bundle has to be loaded
161
- * @returns {Promise<object>} resolves with the change file for the given component from the Storage
162
- */
163
- loadFlexData(mPropertyBag) {
164
- var sComponentName = ManifestUtils.getBaseComponentNameFromManifest(mPropertyBag.manifest);
165
-
166
- if (mPropertyBag.partialFlexData) {
167
- return Storage.completeFlexData({
168
- reference: mPropertyBag.reference,
169
- componentName: sComponentName,
170
- partialFlexData: mPropertyBag.partialFlexData
171
- }).then(formatFlexData);
172
- }
159
+ Loader.getFlexData = async function(mPropertyBag) {
160
+ // the FlexInfoSession is used to adjust the parameters of the request
161
+ let oFlexInfoSession = FlexInfoSession.getByReference(mPropertyBag.reference);
162
+ const mPropertyBagCopy = merge({}, mPropertyBag, {
163
+ version: oFlexInfoSession.version,
164
+ adaptationId: oFlexInfoSession.displayedAdaptationId,
165
+ allContextsProvided: oFlexInfoSession.allContextsProvided
166
+ });
167
+ const sReference = mPropertyBagCopy.reference;
173
168
 
169
+ const oOldInitPromise = _mInitPromises[sReference];
170
+ const oNewInitPromise = new Deferred();
171
+ _mInitPromises[sReference] = oNewInitPromise;
172
+
173
+ if (oOldInitPromise) {
174
+ await oOldInitPromise.promise;
175
+ }
176
+
177
+ const bRequiresNewLoadRequest =
178
+ mPropertyBag.reInitialize
179
+ || !_mCachedFlexData[mPropertyBag.reference]
180
+ || _mCachedFlexData[sReference].parameters.emptyState
181
+ || _mCachedFlexData[sReference].parameters.version !== mPropertyBagCopy.version
182
+ || _mCachedFlexData[sReference].parameters.allContextsProvided !== mPropertyBagCopy.allContextsProvided
183
+ || _mCachedFlexData[sReference].parameters.adaptationId !== mPropertyBagCopy.adaptationId;
184
+
185
+ const bRequiresOnlyCompletion =
186
+ _mCachedFlexData[sReference]
187
+ && !_mCachedFlexData[sReference].parameters.emptyState
188
+ && _mCachedFlexData[sReference].parameters.bundleNotLoaded
189
+ && !mPropertyBagCopy.skipLoadBundle;
190
+
191
+ if (!bRequiresNewLoadRequest && !bRequiresOnlyCompletion) {
192
+ oNewInitPromise.resolve();
193
+ return {
194
+ data: _mCachedFlexData[sReference].data,
195
+ cacheInvalidated: false
196
+ };
197
+ }
198
+
199
+ let oFlexData;
200
+ let oAuthors;
201
+ const sComponentName = ManifestUtils.getBaseComponentNameFromManifest(mPropertyBagCopy.manifest);
202
+ if (bRequiresNewLoadRequest) {
174
203
  // the cache key cannot be used in case of a reinitialization
175
- var sCacheKey = mPropertyBag.reInitialize ? undefined : ManifestUtils.getCacheKeyFromAsyncHints(mPropertyBag.reference, mPropertyBag.asyncHints);
204
+ const sCacheKey = mPropertyBagCopy.reInitialize
205
+ ? undefined
206
+ : ManifestUtils.getCacheKeyFromAsyncHints(sReference, mPropertyBagCopy.asyncHints);
176
207
 
177
- return Storage.loadFlexData({
178
- preview: ManifestUtils.getPreviewSectionFromAsyncHints(mPropertyBag.asyncHints),
179
- reference: mPropertyBag.reference,
208
+ oFlexData = await Storage.loadFlexData({
209
+ preview: ManifestUtils.getPreviewSectionFromAsyncHints(mPropertyBagCopy.asyncHints),
210
+ reference: sReference,
180
211
  componentName: sComponentName,
181
212
  cacheKey: sCacheKey,
182
- siteId: getSideId(mPropertyBag.componentData),
183
- appDescriptor: mPropertyBag.manifest.getRawJson ? mPropertyBag.manifest.getRawJson() : mPropertyBag.manifest,
184
- version: mPropertyBag.version,
185
- allContexts: mPropertyBag.allContexts,
186
- adaptationId: mPropertyBag.adaptationId,
187
- skipLoadBundle: mPropertyBag.skipLoadBundle
188
- })
189
- .then(applyDeactivateChanges)
190
- .then(filterInvalidFileNames)
191
- .then(migrateSelectorFlags.bind(undefined, isMigrationNeeded(mPropertyBag.manifest)))
192
- .then(formatFlexData);
193
- },
194
-
195
- /**
196
- * Load the names of variants' authors for a given application.
197
- *
198
- * @param {string} sReference - Flex reference of application
199
- * @returns {Promise<object>} Resolving with a list of maps between user's ID and name
200
- */
201
- loadVariantsAuthors(sReference) {
202
- // the settings are available due to previous loadFlexData calls or
203
- // not available due to an async hint stating that no changes are available, thus also no author mapping needed
204
- const oSettings = Settings.getInstanceOrUndef();
205
- return oSettings?.getIsVariantAuthorNameAvailable() ? Storage.loadVariantsAuthors(sReference) : Promise.resolve({});
213
+ siteId: getSideId(mPropertyBagCopy.componentData),
214
+ appDescriptor: mPropertyBagCopy.manifest.getRawJson ? mPropertyBagCopy.manifest.getRawJson() : mPropertyBagCopy.manifest,
215
+ version: mPropertyBagCopy.version,
216
+ adaptationId: mPropertyBagCopy.adaptationId,
217
+ skipLoadBundle: mPropertyBagCopy.skipLoadBundle
218
+ });
219
+ const oSettings = await Settings.getInstance();
220
+ oAuthors = oSettings.getIsVariantAuthorNameAvailable() ? await Storage.loadVariantsAuthors(sReference) : {};
221
+ } else {
222
+ oFlexData = await Storage.completeFlexData({
223
+ reference: sReference,
224
+ componentName: sComponentName,
225
+ partialFlexData: _mCachedFlexData[sReference].data.changes
226
+ });
227
+ oAuthors = _mCachedFlexData[sReference].data.authors;
228
+ }
229
+
230
+ const oFlexDataCopy = Object.assign({}, oFlexData);
231
+ applyDeactivateChanges(oFlexDataCopy);
232
+ filterInvalidFileNames(oFlexDataCopy);
233
+ migrateOVPSelectorFlags(mPropertyBagCopy.manifest, oFlexDataCopy);
234
+
235
+ const oFormattedFlexData = {
236
+ changes: oFlexDataCopy,
237
+ cacheKey: oFlexDataCopy.cacheKey,
238
+ authors: oAuthors
239
+ };
240
+
241
+ _mCachedFlexData[sReference] = {
242
+ data: oFormattedFlexData,
243
+ parameters: {
244
+ bundleNotLoaded: !!mPropertyBagCopy.skipLoadBundle,
245
+ version: mPropertyBagCopy.version,
246
+ allContextsProvided: mPropertyBagCopy.allContextsProvided,
247
+ adaptationId: mPropertyBagCopy.adaptationId
248
+ }
249
+ };
250
+
251
+ if (oFormattedFlexData.changes.info !== undefined) {
252
+ oFlexInfoSession = { ...oFlexInfoSession, ...oFormattedFlexData.changes.info };
206
253
  }
254
+ FlexInfoSession.setByReference(oFlexInfoSession, sReference);
255
+ oNewInitPromise.resolve();
256
+ return {
257
+ data: oFormattedFlexData,
258
+ cacheInvalidated: true
259
+ };
207
260
  };
261
+
262
+ /**
263
+ * Initializes an empty cache for a specific reference.
264
+ *
265
+ * @param {string} sReference - The flex reference for which to initialize the cache.
266
+ * @returns {object} The empty Flex Data object
267
+ */
268
+ Loader.initializeEmptyCache = function(sReference) {
269
+ const oInitialFlexData = { changes: StorageUtils.getEmptyFlexDataResponse() };
270
+ _mCachedFlexData[sReference] = {
271
+ data: oInitialFlexData,
272
+ parameters: {
273
+ bundleNotLoaded: true,
274
+ emptyState: true
275
+ }
276
+ };
277
+ return oInitialFlexData;
278
+ };
279
+
280
+ /**
281
+ * Clears the cache for a specific reference or for all references if no reference is provided.
282
+ * Should only be used in tests.
283
+ *
284
+ * @param {string} [sReference] - The flex reference for which to clear the cache.
285
+ */
286
+ Loader.clearCache = function(sReference) {
287
+ if (sReference) {
288
+ delete _mCachedFlexData[sReference];
289
+ delete _mInitPromises[sReference];
290
+ } else {
291
+ Object.keys(_mCachedFlexData).forEach((sReference) => {
292
+ delete _mCachedFlexData[sReference];
293
+ delete _mInitPromises[sReference];
294
+ });
295
+ }
296
+ };
297
+
298
+ /**
299
+ * Loads a FlVariant and updates the cached flex data.
300
+ *
301
+ * @param {object} mPropertyBag - The property bag containing the variant reference and other parameters.
302
+ * @param {string} mPropertyBag.variantReference - The reference of the variant to load.
303
+ * @param {string} mPropertyBag.reference - The flex reference of the application.
304
+ * @returns {Promise<object>} Resolves with the loaded variant data.
305
+ */
306
+ Loader.loadFlVariant = async function(mPropertyBag) {
307
+ const oNewData = await Storage.loadFlVariant({
308
+ variantReference: mPropertyBag.variantReference,
309
+ reference: mPropertyBag.reference
310
+ });
311
+ Object.entries(oNewData).forEach(([sKey, vValue]) => {
312
+ _mCachedFlexData[mPropertyBag.reference].data.changes[sKey].push(...vValue);
313
+ });
314
+ return {
315
+ newData: oNewData,
316
+ completeData: _mCachedFlexData[mPropertyBag.reference].data
317
+ };
318
+ };
319
+
320
+ /**
321
+ * Updates the storage response for a specific reference.
322
+ *
323
+ * @param {string} sReference - The flex reference for which to update the storage response.
324
+ * @param {object[]} aUpdates - The updates to apply to the storage response.
325
+ */
326
+ Loader.updateCachedResponse = function(sReference, aUpdates) {
327
+ StorageUtils.updateStorageResponse(_mCachedFlexData[sReference].data, aUpdates);
328
+ };
329
+
330
+ /**
331
+ * Retrieves the cached flexibility data for a specific reference.
332
+ *
333
+ * @param {string} sReference - The flex reference for which to retrieve the cached data.
334
+ * @returns {Promise<object>} A promise that resolves with the cached flexibility data or an empty object if not found.
335
+ */
336
+ Loader.getCachedFlexData = function(sReference) {
337
+ // TODO return copy of the data once the CompVariantManager does not mutate it anymore
338
+ return _mCachedFlexData[sReference]?.data || {};
339
+ };
340
+
341
+ /**
342
+ * Waits for the Loader to initialize the cached backend response.
343
+ * If the getFlexData was not called before an error is logged and the promise resolves immediately.
344
+ *
345
+ * @param {string} sReference - The flex reference for which to wait for initialization.
346
+ * @return {Promise<undefined>} Resolves with undefined when the initialization is complete
347
+ */
348
+ Loader.waitForInitialization = function(sReference) {
349
+ const oInitPromise = _mInitPromises[sReference]?.promise;
350
+ if (!oInitPromise) {
351
+ Log.error("Loader.waitForInitialization was called before FlexState.initialize");
352
+ return Promise.resolve();
353
+ }
354
+ return oInitPromise;
355
+ };
356
+
357
+ /**
358
+ * This function is temporary and will be removed once the allContextsProvided property is part of the flex/data requests in ABAP
359
+ * The allContextsProvided property is not part of the initial flex/data request and needs to be set later to prevent
360
+ * FlexState from being reinitialized
361
+ *
362
+ * @param {string} sReference - Flexibility reference of the app
363
+ * @param {boolean} bAllContextsProvided - Flag to indicate if all contexts are provided
364
+ */
365
+ Loader.setAllContextsProvided = function(sReference, bAllContextsProvided) {
366
+ if (_mCachedFlexData[sReference] && _mCachedFlexData[sReference].parameters.allContextsProvided === undefined) {
367
+ _mCachedFlexData[sReference].parameters.allContextsProvided = bAllContextsProvided;
368
+ }
369
+ };
370
+
371
+ return Loader;
208
372
  });
@@ -78,7 +78,7 @@ function(
78
78
  *
79
79
  * @namespace sap.ui.fl.apply._internal.flexState.ManifestUtils
80
80
  * @since 1.74
81
- * @version 1.140.0
81
+ * @version 1.141.1
82
82
  * @private
83
83
  */
84
84
  var ManifestUtils = {
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @extends sap.ui.base.ManagedObject
41
41
  * @alias sap.ui.fl.initial._internal.Settings
42
42
  * @since 1.137
43
- * @version 1.140.0
43
+ * @version 1.141.1
44
44
  * @private
45
45
  * @ui5-restricted sap.ui.fl
46
46
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  *
29
29
  * @namespace sap.ui.fl.initial._internal.Storage
30
30
  * @since 1.67
31
- * @version 1.140.0
31
+ * @version 1.141.1
32
32
  * @private
33
33
  * @ui5-restricted sap.ui.fl
34
34
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.intial._internal.StorageFeaturesMerger
22
22
  * @since 1.70
23
- * @version 1.140.0
23
+ * @version 1.141.1
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.initial._internal.Storage
26
26
  */