@openui5/sap.ui.fl 1.123.1 → 1.124.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 (164) 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 +39 -48
  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 +3 -34
  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 +113 -270
  13. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
  14. package/src/sap/ui/fl/apply/_internal/changes/Applier.js +36 -3
  15. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
  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/RemoveAllInboundsExceptOne.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +49 -5
  37. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +28 -27
  39. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
  50. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +75 -41
  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 +30 -11
  55. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +67 -70
  56. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +14 -6
  57. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
  58. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +4 -0
  59. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +8 -7
  60. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +108 -41
  61. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +8 -15
  62. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +7 -12
  63. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +15 -19
  64. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
  65. package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +13 -86
  66. package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +14 -11
  67. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  68. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  69. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  70. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  71. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +14 -29
  72. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
  73. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  74. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  75. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  76. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  77. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  78. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  79. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  81. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  82. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +2 -2
  83. package/src/sap/ui/fl/changeHandler/common/createIFrame.js +5 -2
  84. package/src/sap/ui/fl/descriptorRelated/Utils.js +16 -7
  85. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  86. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  87. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  88. package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +26 -0
  89. package/src/sap/ui/fl/designtime/util/editIFrame.js +8 -5
  90. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  91. package/src/sap/ui/fl/initial/_internal/Storage.js +5 -2
  92. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
  93. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
  94. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
  95. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
  96. package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.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/messagebundle_sh.properties +9 -9
  103. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
  104. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  105. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
  106. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  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/support/apps/contentbrowser/view/ContentDetails.view.xml +0 -1
  115. package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetailsEdit.view.xml +0 -1
  116. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  117. package/src/sap/ui/fl/util/IFrame.js +51 -64
  118. package/src/sap/ui/fl/util/IFrameRenderer.js +15 -9
  119. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  120. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  121. package/src/sap/ui/fl/variants/VariantModel.js +5 -5
  122. package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
  123. package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
  124. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  125. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  126. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  127. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +2 -2
  128. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  129. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  130. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  131. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  132. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  133. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
  134. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  135. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  136. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  137. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  138. package/src/sap/ui/fl/write/_internal/delegates/ODataV2ReadDelegate.js +5 -5
  139. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  140. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  141. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  142. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  143. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  144. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  145. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  146. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  147. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +12 -23
  148. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  149. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  150. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  151. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  152. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  153. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +63 -95
  154. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  155. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +2 -1
  156. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  157. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  158. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  159. package/src/sap/ui/fl/write/api/LocalResetAPI.js +9 -8
  160. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +3 -7
  161. package/src/sap/ui/fl/write/api/SACIntegrationUpdateVariant.js +78 -0
  162. package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +9 -1
  163. package/src/sap/ui/fl/apply/_internal/DelegateMediatorNew.js +0 -193
  164. package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +0 -39
@@ -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.123.1
22
+ * @version 1.124.1
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.123.1
22
+ * @version 1.124.1
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.123.1
21
+ * @version 1.124.1
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.123.1
22
+ * @version 1.124.1
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.123.1
51
+ * @version 1.124.1
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.123.1
98
+ * @version 1.124.1
99
99
  * @private
100
100
  * @ui5-restricted sap.ui.fl.apply._internal
101
101
  */
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  *
24
24
  * @namespace
25
25
  * @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith
26
- * @version 1.123.1
26
+ * @version 1.124.1
27
27
  * @private
28
28
  * @ui5-restricted sap.ui.fl.apply._internal
29
29
  */
@@ -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.123.1
23
+ * @version 1.124.1
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.123.1
24
+ * @version 1.124.1
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl.apply._internal
27
27
  */
@@ -40,11 +40,55 @@ sap.ui.define([
40
40
  * @ui5-restricted sap.ui.fl.apply._internal
41
41
  */
42
42
  applyChange(oManifest, oChange) {
43
- // TODO: Should existens of minui5version be checked in manifest and change or is the check during deployment enough and I can expect minui5version to be set in both?
44
- var vCurrentVersion = new Version(oManifest["sap.ui5"].dependencies.minUI5Version);
45
- if (vCurrentVersion.compareTo(oChange.getContent().minUI5Version) <= 0) {
46
- oManifest["sap.ui5"].dependencies.minUI5Version = oChange.getContent().minUI5Version;
43
+ // General Rules:
44
+ // Compare major versions with each other and set always highest version.
45
+ // Major version which is only included in one (base app or change) will be dropped.
46
+ // If no major version remains throw exception.
47
+ // If change has more than one entry: Additionally check that for version major 1.x.x that minimum version is 1.120.0.
48
+ // If result has only one value then reduce to type string.
49
+
50
+ var aChangeMinUI5Version = oChange.getContent().minUI5Version;
51
+ if (!aChangeMinUI5Version) {
52
+ throw new Error("No minUI5Version in change content provided");
53
+ }
54
+ if (typeof aChangeMinUI5Version === "string") {
55
+ aChangeMinUI5Version = [aChangeMinUI5Version];
56
+ }
57
+
58
+ const mChangeMinUi5Version = {};
59
+ aChangeMinUI5Version.forEach(function(changeMinUI5Version) {
60
+ const oVersion = new Version(changeMinUI5Version);
61
+ if (mChangeMinUi5Version[oVersion.getMajor()]) {
62
+ throw new Error("Each major version can only be provided once in minUI5Version of change content");
63
+ }
64
+ mChangeMinUi5Version[oVersion.getMajor()] = [changeMinUI5Version, oVersion];
65
+ });
66
+
67
+ var {minUI5Version: aMinUI5Version} = oManifest["sap.ui5"].dependencies;
68
+ if (!aMinUI5Version) {
69
+ throw new Error("sap.ui5/dependencies/minUI5Version missing in base manifest");
70
+ }
71
+ if (typeof aMinUI5Version === "string") {
72
+ aMinUI5Version = [aMinUI5Version];
47
73
  }
74
+
75
+ aMinUI5Version = aMinUI5Version.map(function(sCurrMinUI5Version) {
76
+ const oCurrMinUI5Version = new Version(sCurrMinUI5Version);
77
+ const aChangeVersionForMajor = mChangeMinUi5Version[oCurrMinUI5Version.getMajor()];
78
+ if (!aChangeVersionForMajor) {
79
+ return null;
80
+ }
81
+ const [sChangeMinUI5VersionForMajor, oChangeMinUI5VersionForMajor] = aChangeVersionForMajor;
82
+
83
+ return (oCurrMinUI5Version.compareTo(oChangeMinUI5VersionForMajor) <= 0) ?
84
+ sChangeMinUI5VersionForMajor : sCurrMinUI5Version;
85
+ }).filter((sMinVersion) => sMinVersion);
86
+
87
+ if (aMinUI5Version.length === 0) {
88
+ throw new Error("Upgrade/Downgrade for different major version not possible");
89
+ }
90
+
91
+ oManifest["sap.ui5"].dependencies.minUI5Version = aMinUI5Version.length === 1 ? aMinUI5Version[0] : aMinUI5Version;
48
92
  return oManifest;
49
93
  }
50
94
 
@@ -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.123.1
15
+ * @version 1.124.1
16
16
  * @private
17
17
  * @ui5-restricted sap.ui.fl.initial._internal, sap.ui.fl.write._internal
18
18
  */
@@ -96,59 +96,59 @@ sap.ui.define([
96
96
  }
97
97
 
98
98
  /**
99
- * Navigation filter attached to the ushell ShellNavigation service.
99
+ * Navigation filter attached to the ushell ShellNavigationInternal service.
100
100
  * Each time a shell navigation occurs this function is called.
101
101
  *
102
102
  * @param {sap.ui.fl.variants.VariantModel} oModel - Variant Model
103
103
  * @param {string} sNewHash - New hash
104
104
  *
105
- * @returns {string} Value that signifies "Continue" navigation in the "ShellNavigation" service of ushell
106
- * (see {@link sap.ushell.services.ShellNavigation})
105
+ * @returns {string} Value that signifies "Continue" navigation in the "ShellNavigationInternal" service of ushell
106
+ * (see {@link sap.ushell.services.ShellNavigationInternal})
107
107
  *
108
108
  * @private
109
109
  */
110
110
  function _handleVariantIdChangeInURL(oModel, sNewHash) {
111
111
  try {
112
- var oURLParsingService = oModel.getUShellService("URLParsing");
112
+ const oURLParsingService = oModel.getUShellService("URLParsing");
113
113
  if (oURLParsingService) {
114
- var oNewParsedHash = oURLParsingService.parseShellHash(sNewHash);
114
+ const oNewParsedHash = oURLParsingService.parseShellHash(sNewHash);
115
115
  _checkAndUpdateURLParameters(oNewParsedHash, oModel);
116
116
  }
117
117
  } catch (oError) {
118
118
  Log.error(oError.message);
119
119
  }
120
- var oShellNavigationService = oModel.getUShellService("ShellNavigation");
121
- return oShellNavigationService && oShellNavigationService.NavigationFilterStatus.Continue;
120
+ const oShellNavigationInternalService = oModel.getUShellService("ShellNavigationInternal");
121
+ return oShellNavigationInternalService && oShellNavigationInternalService.NavigationFilterStatus.Continue;
122
122
  }
123
123
 
124
124
  /**
125
- * Registers navigation filter function for the ushell ShellNavigation service.
125
+ * Registers navigation filter function for the ushell ShellNavigationInternal service.
126
126
  *
127
127
  * @param {sap.ui.fl.variants.VariantModel} oModel - Variant Model
128
128
  *
129
129
  * @private
130
130
  */
131
131
  function _registerNavigationFilter(oModel) {
132
- var oShellNavigationService = oModel.getUShellService("ShellNavigation");
132
+ const oShellNavigationInternalService = oModel.getUShellService("ShellNavigationInternal");
133
133
  if (!_mVariantIdChangeHandlers[oModel.sFlexReference]) {
134
134
  _mVariantIdChangeHandlers[oModel.sFlexReference] = _handleVariantIdChangeInURL.bind(null, oModel);
135
- if (oShellNavigationService) {
136
- oShellNavigationService.registerNavigationFilter(_mVariantIdChangeHandlers[oModel.sFlexReference]);
135
+ if (oShellNavigationInternalService) {
136
+ oShellNavigationInternalService.registerNavigationFilter(_mVariantIdChangeHandlers[oModel.sFlexReference]);
137
137
  }
138
138
  }
139
139
  }
140
140
 
141
141
  /**
142
- * De-registers navigation filter function for the ushell ShellNavigation service.
142
+ * De-registers navigation filter function for the ushell ShellNavigationInternal service.
143
143
  *
144
144
  * @param {sap.ui.fl.variants.VariantModel} oModel - Variant Model
145
145
  *
146
146
  * @private
147
147
  */
148
148
  function _deRegisterNavigationFilter(oModel) {
149
- var oShellNavigationService = oModel.getUShellService("ShellNavigation");
150
- if (oShellNavigationService) {
151
- oShellNavigationService.unregisterNavigationFilter(_mVariantIdChangeHandlers[oModel.sFlexReference]);
149
+ const oShellNavigationInternalService = oModel.getUShellService("ShellNavigationInternal");
150
+ if (oShellNavigationInternalService) {
151
+ oShellNavigationInternalService.unregisterNavigationFilter(_mVariantIdChangeHandlers[oModel.sFlexReference]);
152
152
  delete _mVariantIdChangeHandlers[oModel.sFlexReference];
153
153
  }
154
154
  }
@@ -166,17 +166,14 @@ sap.ui.define([
166
166
  * @private
167
167
  */
168
168
  function setTechnicalURLParameterValues(mPropertyBag) {
169
- var oModel = mPropertyBag.model;
170
- var oURLParsingService = oModel.getUShellService("URLParsing");
171
- var oUshellNavigationService = oModel.getUShellService("Navigation");
172
- var oParsedHash = oURLParsingService && oURLParsingService.parseShellHash(hasher.getHash());
169
+ const oModel = mPropertyBag.model;
170
+ const oURLParsingService = oModel.getUShellService("URLParsing");
171
+ const oNavigationService = oModel.getUShellService("Navigation");
172
+ const oParsedHash = oURLParsingService && oURLParsingService.parseShellHash(hasher.getHash());
173
173
 
174
174
  if (oParsedHash && oParsedHash.params) {
175
- var mOldHashParams = Object.assign({}, oParsedHash.params);
176
- var mTechnicalParameters = oModel.oAppComponent
177
- && oModel.oAppComponent.getComponentData
178
- && oModel.oAppComponent.getComponentData()
179
- && oModel.oAppComponent.getComponentData().technicalParameters;
175
+ const mOldHashParams = Object.assign({}, oParsedHash.params);
176
+ const mTechnicalParameters = oModel.oAppComponent?.getComponentData?.()?.technicalParameters;
180
177
  // if mTechnicalParameters are not available we write a warning and continue updating the hash
181
178
  if (!mTechnicalParameters) {
182
179
  Log.warning(
@@ -186,11 +183,15 @@ sap.ui.define([
186
183
  if (mPropertyBag.parameters.length === 0) {
187
184
  delete oParsedHash.params[VariantUtil.VARIANT_TECHNICAL_PARAMETER];
188
185
  // Case when ControlVariantsAPI.clearVariantParameterInURL is called with a parameter
189
- mTechnicalParameters && delete mTechnicalParameters[VariantUtil.VARIANT_TECHNICAL_PARAMETER];
186
+ if (mTechnicalParameters) {
187
+ delete mTechnicalParameters[VariantUtil.VARIANT_TECHNICAL_PARAMETER];
188
+ }
190
189
  } else {
191
190
  oParsedHash.params[VariantUtil.VARIANT_TECHNICAL_PARAMETER] = mPropertyBag.parameters;
192
191
  // Technical parameters need to be in sync with the URL hash
193
- mTechnicalParameters && (mTechnicalParameters[VariantUtil.VARIANT_TECHNICAL_PARAMETER] = mPropertyBag.parameters);
192
+ if (mTechnicalParameters) {
193
+ mTechnicalParameters[VariantUtil.VARIANT_TECHNICAL_PARAMETER] = mPropertyBag.parameters;
194
+ }
194
195
  }
195
196
 
196
197
  if (mPropertyBag.silent) {
@@ -198,7 +199,7 @@ sap.ui.define([
198
199
  hasher.replaceHash(oURLParsingService.constructShellHash(oParsedHash));
199
200
  hasher.changed.active = true; // re-enable changed signal
200
201
  } else if (!deepEqual(mOldHashParams, oParsedHash.params)) {
201
- oUshellNavigationService.navigate({
202
+ oNavigationService.navigate({
202
203
  target: {
203
204
  semanticObject: oParsedHash.semanticObject,
204
205
  action: oParsedHash.action,
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  * @class
37
37
  * @constructor
38
38
  * @author SAP SE
39
- * @version 1.123.1
39
+ * @version 1.124.1
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.123.1
21
+ * @version 1.124.1
22
22
  *
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl
@@ -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.123.1
21
+ * @version 1.124.1
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.123.1
35
+ * @version 1.124.1
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.123.1
23
+ * @version 1.124.1
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.123.1
25
+ * @version 1.124.1
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.123.1
72
+ * @version 1.124.1
73
73
  * @private
74
74
  * @ui5-restricted sap.ui.fl
75
75
  */
@@ -97,7 +97,7 @@ sap.ui.define([
97
97
  *
98
98
  * @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
99
99
  * @since 1.100
100
- * @version 1.123.1
100
+ * @version 1.124.1
101
101
  * @private
102
102
  * @ui5-restricted sap.ui.fl
103
103
  */
@@ -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.123.1
29
+ * @version 1.124.1
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.123.1
22
+ * @version 1.124.1
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.123.1
24
+ * @version 1.124.1
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl
27
27
  * @alias module:sap/ui/fl/apply/_internal/flexState/compVariants/getVariantAuthor
@@ -6,6 +6,7 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/base/util/restricted/_omit",
9
+ "sap/base/util/Deferred",
9
10
  "sap/base/util/each",
10
11
  "sap/base/util/merge",
11
12
  "sap/base/util/ObjectPath",
@@ -13,7 +14,6 @@ sap.ui.define([
13
14
  "sap/ui/core/Component",
14
15
  "sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
15
16
  "sap/ui/fl/apply/_internal/flexObjects/States",
16
- "sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap",
17
17
  "sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap",
18
18
  "sap/ui/fl/apply/_internal/flexState/DataSelector",
19
19
  "sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions",
@@ -25,6 +25,7 @@ sap.ui.define([
25
25
  "sap/ui/fl/requireAsync"
26
26
  ], function(
27
27
  _omit,
28
+ Deferred,
28
29
  each,
29
30
  merge,
30
31
  ObjectPath,
@@ -32,7 +33,6 @@ sap.ui.define([
32
33
  Component,
33
34
  FlexObjectFactory,
34
35
  States,
35
- prepareAppDescriptorMap,
36
36
  prepareCompVariantsMap,
37
37
  DataSelector,
38
38
  InitialPrepareFunctions,
@@ -45,13 +45,14 @@ sap.ui.define([
45
45
  ) {
46
46
  "use strict";
47
47
 
48
+ const sAppDescriptorNamespace = "sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange";
49
+
48
50
  /**
49
51
  * Flex state class to persist maps and raw state (cache) for a given component reference.
50
52
  * The persistence happens inside an object mapped to the component reference, with the following properties:
51
53
  *
52
54
  * {
53
55
  * preparedMaps: {
54
- * appDescriptorMap: {},
55
56
  * compVariantsMap: {},
56
57
  * },
57
58
  * storageResponse: {
@@ -87,7 +88,7 @@ sap.ui.define([
87
88
  *
88
89
  * @namespace sap.ui.fl.apply._internal.flexState.FlexState
89
90
  * @since 1.73
90
- * @version 1.123.1
91
+ * @version 1.124.1
91
92
  * @private
92
93
  * @ui5-restricted sap.ui.fl.apply._internal
93
94
  */
@@ -98,7 +99,6 @@ sap.ui.define([
98
99
  var _oChangePersistenceFactory;
99
100
  var _mFlexObjectInfo = {
100
101
  appDescriptorChanges: {
101
- prepareFunction: prepareAppDescriptorMap,
102
102
  pathInResponse: []
103
103
  },
104
104
  changes: {
@@ -211,6 +211,20 @@ sap.ui.define([
211
211
  }
212
212
  });
213
213
 
214
+ const oAppDescriptorChangesDataSelector = new DataSelector({
215
+ id: "appDescriptorChanges",
216
+ parentDataSelector: oFlexObjectsDataSelector,
217
+ executeFunction(aFlexObjects) {
218
+ return aFlexObjects.filter((oFlexObject) => {
219
+ return oFlexObject.isA(sAppDescriptorNamespace);
220
+ });
221
+ },
222
+ checkInvalidation(mParameters, oUpdateInfo) {
223
+ const bRelevantType = ["addFlexObject", "removeFlexObject"].includes(oUpdateInfo.type);
224
+ return bRelevantType && oUpdateInfo.updatedObject?.isA(sAppDescriptorNamespace);
225
+ }
226
+ });
227
+
214
228
  function getInstanceEntryOrThrowError(sReference, sMapName) {
215
229
  if (!_mInstances[sReference]) {
216
230
  initializeEmptyState(sReference);
@@ -237,10 +251,6 @@ sap.ui.define([
237
251
  oFlexObjectsDataSelector.checkUpdate({ reference: sReference });
238
252
  }
239
253
 
240
- function getAppDescriptorMap(sReference) {
241
- return getInstanceEntryOrThrowError(sReference, "appDescriptorChanges");
242
- }
243
-
244
254
  function getCompVariantsMap(sReference) {
245
255
  return getInstanceEntryOrThrowError(sReference, "compVariants");
246
256
  }
@@ -361,32 +371,28 @@ sap.ui.define([
361
371
  return mFilteredReturn;
362
372
  }
363
373
 
364
- function loadFlexData(mPropertyBag) {
365
- _mInitPromises[mPropertyBag.reference] = Loader.loadFlexData(mPropertyBag)
366
- .then(async (mResponse) => {
367
- if (!mPropertyBag.partialFlexState) {
368
- mResponse.authors = await Loader.loadVariantsAuthors(mPropertyBag.reference);
369
- }
370
- // The following line is used by the Flex Support Tool to set breakpoints - please adjust the tool if you change it!
371
- _mInstances[mPropertyBag.reference] = merge({}, {
372
- unfilteredStorageResponse: mResponse,
373
- preparedMaps: {},
374
- componentId: mPropertyBag.componentId,
375
- componentData: mPropertyBag.componentData,
376
- partialFlexState: mPropertyBag.partialFlexState,
377
- version: mPropertyBag.version,
378
- allContextsProvided: mPropertyBag.allContextsProvided
379
- });
380
-
381
- storeInfoInSession(mPropertyBag.reference, mResponse);
382
-
383
- // no further changes to storageResponse properties allowed
384
- Object.freeze(_mInstances[mPropertyBag.reference].storageResponse);
385
- Object.freeze(_mInstances[mPropertyBag.reference].unfilteredStorageResponse);
386
- return mResponse;
374
+ async function loadFlexData(mPropertyBag) {
375
+ const mResponse = await Loader.loadFlexData(mPropertyBag);
376
+ if (!mPropertyBag.partialFlexState) {
377
+ mResponse.authors = await Loader.loadVariantsAuthors(mPropertyBag.reference);
378
+ }
379
+ // The following line is used by the Flex Support Tool to set breakpoints - please adjust the tool if you change it!
380
+ _mInstances[mPropertyBag.reference] = merge({}, {
381
+ unfilteredStorageResponse: mResponse,
382
+ preparedMaps: {},
383
+ componentId: mPropertyBag.componentId,
384
+ componentData: mPropertyBag.componentData,
385
+ partialFlexState: mPropertyBag.partialFlexState,
386
+ version: mPropertyBag.version,
387
+ allContextsProvided: mPropertyBag.allContextsProvided
387
388
  });
388
389
 
389
- return _mInitPromises[mPropertyBag.reference];
390
+ storeInfoInSession(mPropertyBag.reference, mResponse);
391
+
392
+ // no further changes to storageResponse properties allowed
393
+ Object.freeze(_mInstances[mPropertyBag.reference].storageResponse);
394
+ Object.freeze(_mInstances[mPropertyBag.reference].unfilteredStorageResponse);
395
+ return mResponse;
390
396
  }
391
397
 
392
398
  function storeInfoInSession(sReference, mResponse) {
@@ -454,7 +460,9 @@ sap.ui.define([
454
460
  reInitialize: true,
455
461
  componentId: ""
456
462
  };
457
- _mInitPromises[sReference] = Promise.resolve();
463
+ const oNewInitPromise = new Deferred();
464
+ _mInitPromises[sReference] = oNewInitPromise;
465
+ oNewInitPromise.resolve();
458
466
  initializeNewInstance({ reference: sReference });
459
467
  }
460
468
 
@@ -482,13 +490,18 @@ sap.ui.define([
482
490
  * @returns {Promise<undefined>} Resolves a promise as soon as FlexState is initialized
483
491
  */
484
492
  FlexState.initialize = async function(mPropertyBag) {
485
- await lazyLoadModules();
486
493
  const mProperties = merge({}, mPropertyBag);
487
494
  enhancePropertyBag(mProperties);
488
- var sFlexReference = mProperties.reference;
495
+ const sFlexReference = mProperties.reference;
496
+
497
+ const oOldInitPromise = _mInitPromises[sFlexReference];
498
+ // TODO: Switch to native promises once lazyLoadModules is removed, todos#2
499
+ const oNewInitPromise = new Deferred();
500
+ _mInitPromises[sFlexReference] = oNewInitPromise;
501
+ await lazyLoadModules();
489
502
 
490
- if (_mInitPromises[sFlexReference]) {
491
- await _mInitPromises[sFlexReference];
503
+ if (oOldInitPromise) {
504
+ await oOldInitPromise.promise;
492
505
  checkPartialFlexState(mProperties);
493
506
  checkComponentId(mProperties);
494
507
  checkVersionAndAllContexts(mProperties);
@@ -502,6 +515,24 @@ sap.ui.define([
502
515
  }
503
516
 
504
517
  initializeNewInstance(mProperties);
518
+ oNewInitPromise.resolve();
519
+ };
520
+
521
+ /**
522
+ * Waits until the FlexState is initialized
523
+ * This is only necessary if <code>FlexState.initialize</code> cannot be called directly
524
+ * due to missing information for the backend request (e.g. asyncHints)
525
+ *
526
+ * @param {string} sFlexReference - Flex reference of the app
527
+ * @returns {Promise<undefined>} Promise that resolves as soon as FlexState is initialized
528
+ */
529
+ FlexState.waitForInitialization = function(sFlexReference) {
530
+ const oInitPromise = _mInitPromises[sFlexReference]?.promise;
531
+ if (!oInitPromise) {
532
+ Log.error("FlexState.waitForInitialization was called before FlexState.initialize");
533
+ return Promise.resolve();
534
+ }
535
+ return oInitPromise;
505
536
  };
506
537
 
507
538
  /**
@@ -543,7 +574,9 @@ sap.ui.define([
543
574
  _oChangePersistenceFactory._instanceCache[sReference].removeDirtyChanges();
544
575
  }
545
576
 
546
- await _mInitPromises[sReference];
577
+ await _mInitPromises[sReference].promise;
578
+ const oNewInitPromise = new Deferred();
579
+ _mInitPromises[sReference] = oNewInitPromise;
547
580
  await loadFlexData(mPropertyBag);
548
581
  _mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mInstances[sReference].unfilteredStorageResponse);
549
582
  _mInstances[sReference].maxLayer = FlexInfoSession.getByReference(sReference).maxLayer;
@@ -555,6 +588,7 @@ sap.ui.define([
555
588
  if (bUpdated) {
556
589
  oFlexObjectsDataSelector.checkUpdate({ reference: sReference });
557
590
  }
591
+ oNewInitPromise.resolve();
558
592
  };
559
593
 
560
594
  function getChangeCategory(oChangeDefinition) {
@@ -835,7 +869,7 @@ sap.ui.define([
835
869
  };
836
870
 
837
871
  FlexState.getAppDescriptorChanges = function(sReference) {
838
- return getAppDescriptorMap(sReference).appDescriptorChanges;
872
+ return oAppDescriptorChangesDataSelector.get({ reference: sReference });
839
873
  };
840
874
 
841
875
  FlexState.getUI2Personalization = function(sReference) {
@@ -854,7 +888,7 @@ sap.ui.define([
854
888
  // TODO: also used by the CompVariantState to mutate the storage response, this has to be changed
855
889
  FlexState.getStorageResponse = function(sReference) {
856
890
  if (_mInitPromises[sReference]) {
857
- return _mInitPromises[sReference].then(function() {
891
+ return _mInitPromises[sReference].promise.then(function() {
858
892
  return _mInstances[sReference].unfilteredStorageResponse;
859
893
  });
860
894
  }
@@ -102,7 +102,7 @@ sap.ui.define([
102
102
  *
103
103
  * @namespace sap.ui.fl.apply._internal.flexState.Loader
104
104
  * @since 1.74
105
- * @version 1.123.1
105
+ * @version 1.124.1
106
106
  * @private
107
107
  * @ui5-restricted sap.ui.fl.apply._internal.flexState
108
108
  */
@@ -78,7 +78,7 @@ function(
78
78
  *
79
79
  * @namespace sap.ui.fl.apply._internal.flexState.ManifestUtils
80
80
  * @since 1.74
81
- * @version 1.123.1
81
+ * @version 1.124.1
82
82
  * @private
83
83
  */
84
84
  var ManifestUtils = {