@openui5/sap.ui.fl 1.127.0 → 1.128.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/package.json +3 -3
  2. package/src/sap/ui/fl/.library +1 -1
  3. package/src/sap/ui/fl/ChangePersistence.js +37 -47
  4. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  5. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
  6. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
  7. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  8. package/src/sap/ui/fl/FlexController.js +11 -9
  9. package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
  10. package/src/sap/ui/fl/LayerUtils.js +1 -1
  11. package/src/sap/ui/fl/Utils.js +17 -12
  12. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  13. package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +3 -1
  14. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  15. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +2 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +3 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +75 -0
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  24. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +76 -0
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +44 -0
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +56 -9
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +66 -0
  45. package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
  49. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
  50. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +12 -1
  51. package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
  52. package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
  54. package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +41 -1
  55. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +39 -39
  56. package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +3 -0
  57. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  58. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  59. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  60. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  61. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  62. package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
  63. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +9 -2
  64. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +2 -2
  65. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
  66. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
  67. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  68. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
  69. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  70. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  71. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  72. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  73. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  74. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  75. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +13 -4
  76. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  77. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  78. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  79. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  80. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  81. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  82. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  83. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  84. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  85. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  86. package/src/sap/ui/fl/descriptorRelated/Utils.js +19 -0
  87. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  88. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  89. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  90. package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
  91. package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
  92. package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
  93. package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -0
  94. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -1
  95. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
  96. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
  97. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  98. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  99. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  100. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  101. package/src/sap/ui/fl/library.js +43 -43
  102. package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +9 -59
  103. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  104. package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +53 -0
  105. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
  106. package/src/sap/ui/fl/support/api/SupportAPI.js +56 -5
  107. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  108. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  109. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  110. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  111. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  112. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  113. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  114. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  115. package/src/sap/ui/fl/util/IFrame.js +1 -1
  116. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  117. package/src/sap/ui/fl/util/changePropertyValueByPath.js +13 -2
  118. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  119. package/src/sap/ui/fl/variants/VariantManagement.js +23 -14
  120. package/src/sap/ui/fl/variants/VariantModel.js +7 -6
  121. package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +12 -12
  122. package/src/sap/ui/fl/write/_internal/SaveAs.js +11 -12
  123. package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
  124. package/src/sap/ui/fl/write/_internal/Versions.js +8 -68
  125. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  126. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  127. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  128. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +65 -16
  129. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  130. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  131. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  132. package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
  133. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  134. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
  135. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  136. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  137. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  138. package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +1 -0
  139. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  140. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  141. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  142. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  143. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  144. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  145. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  146. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  147. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  148. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  149. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  150. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  151. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  152. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  153. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  154. package/src/sap/ui/fl/write/_internal/flexState/{FlexObjectState.js → FlexObjectManager.js} +26 -56
  155. package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  156. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +9 -6
  157. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  158. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  159. package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +6 -6
  160. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +4 -2
  161. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  162. package/src/sap/ui/fl/write/api/LocalResetAPI.js +3 -4
  163. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +8 -8
  164. package/src/sap/ui/fl/write/api/TranslationAPI.js +6 -6
  165. package/src/sap/ui/fl/write/api/VersionsAPI.js +34 -9
@@ -0,0 +1,53 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/fl/apply/_internal/flexState/changes/UIChangesState",
9
+ "sap/ui/fl/apply/_internal/flexState/FlexObjectState",
10
+ "sap/ui/fl/apply/_internal/flexState/FlexState",
11
+ "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
12
+ "sap/ui/fl/Utils"
13
+ ], function(
14
+ UIChangesState,
15
+ FlexObjectState,
16
+ FlexState,
17
+ ManifestUtils,
18
+ Utils
19
+ ) {
20
+ "use strict";
21
+
22
+ /**
23
+ * Returns an array with all UI Changes for the application.
24
+ *
25
+ * @namespace sap.ui.fl.support._internal.getAllUIChanges
26
+ * @since 1.128
27
+ * @version 1.128.0
28
+ * @private
29
+ * @ui5-restricted sap.ui.fl.support.api.SupportAPI
30
+ */
31
+
32
+ function getFlexObjectInfos(oCurrentAppContainerObject) {
33
+ const oAppComponent = oCurrentAppContainerObject.oContainer.getComponentInstance();
34
+ const sReference = ManifestUtils.getFlexReferenceForControl(oAppComponent);
35
+ return {
36
+ allUIChanges: UIChangesState.getAllUIChanges(sReference),
37
+ allFlexObjects: FlexState.getFlexObjectsDataSelector().get({ reference: sReference }),
38
+ dirtyFlexObjects: FlexObjectState.getDirtyFlexObjects(sReference),
39
+ completeDependencyMap: FlexObjectState.getCompleteDependencyMap(sReference),
40
+ liveDependencyMap: FlexObjectState.getLiveDependencyMap(sReference)
41
+ };
42
+ }
43
+
44
+ return async function(oAppComponent) {
45
+ // in most scenarios the appComponent will already be passed, but in iFrame cases (like cFLP) the appComponent is not available
46
+ // outside of the iFrame. In this case the function is called from inside the iFrame and has to fetch the appComponent
47
+ if (!oAppComponent) {
48
+ const oAppLifeCycleService = await Utils.getUShellService("AppLifeCycle");
49
+ return getFlexObjectInfos(oAppLifeCycleService.getCurrentApplication().componentInstance);
50
+ }
51
+ return getFlexObjectInfos(oAppComponent);
52
+ };
53
+ });
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  *
17
17
  * @namespace sap.ui.fl.support._internal.getFlexSettings
18
18
  * @since 1.99
19
- * @version 1.127.0
19
+ * @version 1.128.0
20
20
  * @private
21
21
  * @ui5-restricted sap.ui.fl.support.api.SupportAPI
22
22
  */
@@ -5,30 +5,81 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/base/Log",
9
+ "sap/ui/core/ComponentRegistry",
8
10
  "sap/ui/fl/support/_internal/getAllUIChanges",
11
+ "sap/ui/fl/support/_internal/getFlexObjectInfos",
9
12
  "sap/ui/fl/support/_internal/getFlexSettings",
10
- "sap/ui/fl/support/_internal/getChangeDependencies"
13
+ "sap/ui/fl/support/_internal/getChangeDependencies",
14
+ "sap/ui/fl/Utils"
11
15
  ], function(
16
+ Log,
17
+ ComponentRegistry,
12
18
  getAllUIChanges,
19
+ getFlexObjectInfos,
13
20
  getFlexSettings,
14
- getChangeDependencies
21
+ getChangeDependencies,
22
+ Utils
15
23
  ) {
16
24
  "use strict";
17
25
 
26
+ async function findComponentAndCallFunction(fnFunction, sModulePath) {
27
+ if (Utils.getUshellContainer()) {
28
+ const oAppLifeCycleService = await Utils.getUShellService("AppLifeCycle");
29
+ const oCurrentApp = oAppLifeCycleService.getCurrentApplication();
30
+ if (oCurrentApp.componentInstance) {
31
+ return fnFunction(oCurrentApp.componentInstance);
32
+ }
33
+
34
+ // potential cFLP scenario with the instance running in an iFrame where the top has no access to the componentInstance
35
+ // in this case the module has to be required inside the iFrame and executed there
36
+ const oIntent = await oCurrentApp.getIntent();
37
+ // The iFrame ID is not public API and may change in the future.
38
+ // Until there is an API, this is the way how to get any hold on the app at all
39
+ var iFrame = document.getElementById(`application-${oIntent.semanticObject}-${oIntent.action}`);
40
+ if (!iFrame) {
41
+ const sError = "Possible cFLP scenario, but the iFrame can't be found";
42
+ Log.error(sError);
43
+ throw Error(sError);
44
+ }
45
+
46
+ return new Promise(function(resolve) {
47
+ iFrame.contentWindow.sap.ui.require([sModulePath], function(fnModuleInsideIFrame) {
48
+ fnModuleInsideIFrame().then(resolve);
49
+ });
50
+ });
51
+ }
52
+
53
+ // standalone case
54
+ const aApplications = ComponentRegistry.filter(function(oComponent) {
55
+ return oComponent.getManifestObject().getRawJson()["sap.app"].type === "application";
56
+ });
57
+ if (aApplications.length === 1) {
58
+ return getAllUIChanges(aApplications[0]);
59
+ }
60
+
61
+ throw Error("No application component found");
62
+ }
63
+
18
64
  /**
19
65
  * Provides an API for support tools
20
66
  *
21
67
  * @namespace sap.ui.fl.support.api.SupportAPI
22
68
  * @since 1.98
23
- * @version 1.127.0
69
+ * @version 1.128.0
24
70
  * @private
25
71
  * @ui5-restricted ui5 support tools
26
72
  */
27
73
  var SupportAPI = /** @lends sap.ui.fl.support.api.SupportAPI */{
28
- getAllUIChanges,
74
+ getAllUIChanges() {
75
+ return findComponentAndCallFunction(getAllUIChanges, "sap/ui/fl/support/_internal/getAllUIChanges");
76
+ },
77
+ getFlexObjectInfos() {
78
+ return findComponentAndCallFunction(getFlexObjectInfos, "sap/ui/fl/support/_internal/getFlexObjectInfos");
79
+ },
29
80
  getChangeDependencies,
30
81
  getFlexSettings
31
82
  };
32
83
 
33
84
  return SupportAPI;
34
- });
85
+ });
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @constructor
43
43
  * @alias sap.ui.fl.support.apps.contentbrowser.controller.ContentDetails
44
44
  * @author SAP SE
45
- * @version 1.127.0
45
+ * @version 1.128.0
46
46
  * @since 1.45
47
47
  * @private
48
48
  */
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
  * @constructor
41
41
  * @alias sap.ui.fl.support.apps.contentbrowser.controller.ContentDetailsEdit
42
42
  * @author SAP SE
43
- * @version 1.127.0
43
+ * @version 1.128.0
44
44
  * @since 1.45
45
45
  * @private
46
46
  */
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @constructor
28
28
  * @alias sap.ui.fl.support.apps.contentbrowser.controller.LayerContentMaster
29
29
  * @author SAP SE
30
- * @version 1.127.0
30
+ * @version 1.128.0
31
31
  * @since 1.45
32
32
  * @private
33
33
  */
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @constructor
18
18
  * @alias sap.ui.fl.support.apps.contentbrowser.controller.Layers
19
19
  * @author SAP SE
20
- * @version 1.127.0
20
+ * @version 1.128.0
21
21
  * @since 1.45
22
22
  * @private
23
23
  */
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
13
13
  * @constructor
14
14
  * @alias sap.ui.fl.support.apps.contentbrowser.lrepConnector.LRepConnector
15
15
  * @author SAP SE
16
- * @version 1.127.0
16
+ * @version 1.128.0
17
17
  * @since 1.45
18
18
  * @private
19
19
  */
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @constructor
26
26
  * @alias sap.ui.fl.support.apps.contentbrowser.utils.DataUtils
27
27
  * @author SAP SE
28
- * @version 1.127.0
28
+ * @version 1.128.0
29
29
  * @since 1.45
30
30
  * @private
31
31
  */
@@ -17,7 +17,7 @@ function(MessageItem, MessagePopover, JSONModel) {
17
17
  * @constructor
18
18
  * @alias sap.ui.fl.support.apps.contentbrowser.utils.ErrorUtils
19
19
  * @author SAP SE
20
- * @version 1.127.0
20
+ * @version 1.128.0
21
21
  * @since 1.45
22
22
  * @private
23
23
  */
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.fl.transport.TransportSelection
18
18
  * @constructor
19
19
  * @author SAP SE
20
- * @version 1.127.0
20
+ * @version 1.128.0
21
21
  * @since 1.38.0
22
22
  * Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
23
23
  * of the SmartVariant control.
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @extends sap.ui.core.Control
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.127.0
53
+ * @version 1.128.0
54
54
  *
55
55
  * @constructor
56
56
  * @private
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @extends sap.ui.core.Element
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.127.0
28
+ * @version 1.128.0
29
29
  *
30
30
  * @constructor
31
31
  * @private
@@ -11,9 +11,20 @@ sap.ui.define([
11
11
  ) {
12
12
  "use strict";
13
13
 
14
+ function splitEscapePath(sPropertyPath) {
15
+ const sReplaceEscapeWithDummy = sPropertyPath.replaceAll("\\/", "*");
16
+ const aPath = sReplaceEscapeWithDummy.split("/");
17
+ return aPath.map((element) => element.replaceAll("*", "/"));
18
+ }
19
+
14
20
  function setPropValueByPath(oEntityProp, oRoot) {
15
- var aPath = oEntityProp.propertyPath.split("/");
16
- var valueByPath = ObjectPath.get(aPath, oRoot);
21
+ let aPath;
22
+ if (oEntityProp.propertyPath.includes("\\")) {
23
+ aPath = splitEscapePath(oEntityProp.propertyPath);
24
+ } else {
25
+ aPath = oEntityProp.propertyPath.split("/");
26
+ }
27
+ const valueByPath = ObjectPath.get(aPath, oRoot);
17
28
 
18
29
  if (valueByPath && oEntityProp.operation === "INSERT") {
19
30
  throw new Error("Path has already a value. 'INSERT' operation is not appropriate.");
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  *
35
35
  * @function
36
36
  * @author SAP SE
37
- * @version 1.127.0
37
+ * @version 1.128.0
38
38
  * @alias sap.ui.fl.util.resolveBinding
39
39
  * @since 1.91
40
40
  * @private
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  "use strict";
34
34
 
35
35
  // shortcut for sap.ui.core.TitleLevel
36
- var {TitleLevel} = coreLibrary;
36
+ var { TitleLevel } = coreLibrary;
37
37
 
38
38
  /**
39
39
  * Constructor for a new <code>VariantManagement</code>.
@@ -139,11 +139,11 @@ sap.ui.define([
139
139
  },
140
140
 
141
141
  /**
142
- * Semantic level of the header.
143
- * For more information, see {@link sap.m.Title#setLevel}.
144
- *
145
- * @since 1.104
146
- */
142
+ * Semantic level of the header.
143
+ * For more information, see {@link sap.m.Title#setLevel}.
144
+ *
145
+ * @since 1.104
146
+ */
147
147
  headerLevel: {
148
148
  type: "sap.ui.core.TitleLevel",
149
149
  group: "Appearance",
@@ -688,23 +688,23 @@ sap.ui.define([
688
688
  };
689
689
 
690
690
  /**
691
- * Special handling of the rendering of this control.
691
+ * Special handling of the rendering of this control.
692
692
  * @param {boolean} bValue Defines the intended rendering
693
693
  * @returns {sap.ui.fl.variants.VariantManagement} The current instance
694
694
  * @private
695
695
  * @restricted sap.ui.mdc
696
- */
696
+ */
697
697
  VariantManagement.prototype.setShowAsText = function(bValue) {
698
698
  this._oVM.setShowAsText(bValue);
699
699
  return this;
700
700
  };
701
701
 
702
702
  /**
703
- * Special handling of the rendering of this control.
703
+ * Special handling of the rendering of this control.
704
704
  * @returns {boolean} The current intent
705
705
  * @private
706
706
  * @restricted sap.ui.mdc
707
- */
707
+ */
708
708
  VariantManagement.prototype.getShowAsText = function() {
709
709
  return this._oVM.getShowAsText();
710
710
  };
@@ -920,7 +920,7 @@ sap.ui.define([
920
920
  };
921
921
 
922
922
  VariantManagement.prototype._createItemsModel = function(sModelName) {
923
- var oItemsTemplate = new VariantItem({
923
+ this._oItemsTemplate = new VariantItem({
924
924
  key: `{${sModelName}>key}`,
925
925
  title: `{${sModelName}>title}`,
926
926
  sharing: `{${sModelName}>sharing}`,
@@ -937,7 +937,7 @@ sap.ui.define([
937
937
  this._oVM.bindAggregation("items", {
938
938
  path: `${this.oContext}/variants`,
939
939
  model: sModelName,
940
- template: oItemsTemplate,
940
+ template: this._oItemsTemplate,
941
941
  filters: new Filter({
942
942
  path: "visible",
943
943
  operator: FilterOperator.EQ,
@@ -1035,8 +1035,15 @@ sap.ui.define([
1035
1035
  this._oVM.detachSelect(this._fireSelect, this);
1036
1036
  this._oVM.detachSave(this._fireSave, this);
1037
1037
 
1038
- Control.prototype.exit.apply(this, aArgs);
1039
- this._oVM = undefined;
1038
+ if (this._oVM) {
1039
+ this._oVM.destroy();
1040
+ this._oVM = undefined;
1041
+ }
1042
+
1043
+ if (this._oItemsTemplate) {
1044
+ this._oItemsTemplate.destroy();
1045
+ this._oItemsTemplate = undefined;
1046
+ }
1040
1047
 
1041
1048
  this._fRegisteredApplyAutomaticallyOnStandardVariant = null;
1042
1049
  this.oContext = undefined;
@@ -1046,6 +1053,8 @@ sap.ui.define([
1046
1053
  this._aSaveEventHandlers = undefined;
1047
1054
  this._aManageEventHandlers = undefined;
1048
1055
  this._aSelectEventHandlers = undefined;
1056
+
1057
+ Control.prototype.exit.apply(this, aArgs);
1049
1058
  };
1050
1059
 
1051
1060
  // <overwrite for docu>
@@ -26,11 +26,11 @@ sap.ui.define([
26
26
  "sap/ui/fl/apply/_internal/flexState/FlexObjectState",
27
27
  "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
28
28
  "sap/ui/fl/apply/_internal/controlVariants/Utils",
29
+ "sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
29
30
  "sap/ui/fl/Layer",
30
31
  "sap/ui/fl/LayerUtils",
31
32
  "sap/ui/fl/Utils",
32
33
  "sap/ui/fl/registry/Settings",
33
- "sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
34
34
  "sap/ui/model/BindingMode",
35
35
  "sap/ui/model/json/JSONModel"
36
36
  ], function(
@@ -55,11 +55,11 @@ sap.ui.define([
55
55
  FlexObjectState,
56
56
  ManifestUtils,
57
57
  VariantUtil,
58
+ ContextBasedAdaptationsAPI,
58
59
  Layer,
59
60
  LayerUtils,
60
61
  Utils,
61
62
  Settings,
62
- ContextBasedAdaptationsAPI,
63
63
  BindingMode,
64
64
  JSONModel
65
65
  ) {
@@ -306,7 +306,7 @@ sap.ui.define([
306
306
  * @class Variant model implementation for JSON format.
307
307
  * @extends sap.ui.model.json.JSONModel
308
308
  * @author SAP SE
309
- * @version 1.127.0
309
+ * @version 1.128.0
310
310
  * @param {object} oData - Either the URL where to load the JSON from or a JS object
311
311
  * @param {object} mPropertyBag - Map of properties required for the constructor
312
312
  * @param {sap.ui.fl.FlexController} mPropertyBag.flexController - <code>FlexController</code> instance for the component which uses the variant model
@@ -628,7 +628,7 @@ sap.ui.define([
628
628
  .then((oReturn) => {
629
629
  if (!oReturn.success) {
630
630
  var oException = oReturn.error || new Error("The change could not be applied.");
631
- this._oChangePersistence.deleteChange(oChange, true);
631
+ this.oChangePersistence.deleteChange(oChange, true);
632
632
  throw oException;
633
633
  }
634
634
  });
@@ -789,7 +789,8 @@ sap.ui.define([
789
789
  };
790
790
 
791
791
  VariantModel.prototype.removeVariant = function(mPropertyBag) {
792
- var aChangesToBeDeleted = this.oChangePersistence.getDirtyChanges().filter(function(oChange) {
792
+ var aChangesToBeDeleted = FlexObjectState.getDirtyFlexObjects(this.sFlexReference)
793
+ .filter(function(oChange) {
793
794
  return (oChange.getVariantReference && oChange.getVariantReference() === mPropertyBag.variant.getId()) ||
794
795
  oChange.getId() === mPropertyBag.variant.getId();
795
796
  });
@@ -1501,7 +1502,7 @@ sap.ui.define([
1501
1502
  return oChange.getId();
1502
1503
  });
1503
1504
 
1504
- return this.oChangePersistence.getDirtyChanges().filter(function(oChange) {
1505
+ return FlexObjectState.getDirtyFlexObjects(this.sFlexReference).filter(function(oChange) {
1505
1506
  return aChangeFileNames.includes(oChange.getId()) && !oChange.getSavedToVariant();
1506
1507
  });
1507
1508
  };
@@ -1,12 +1,12 @@
1
- RADIO_BUTTON_GROUP_LABEL=ue76W8qO/gND2dE1NFdw+w_Visibility
2
- ADD_CONTEXTS_BUTTON=QTU8mvIsxhn/eaqzQkJ9xQ_Add Roles
3
- REMOVE_ALL_BUTTON=aJSQ/uAeFl5PKbsCdMcpYw_Remove All
4
- NO_DATA=s90HF6hKj/osiBC6JhS51w_No roles found
5
- SELECT_ROLE_DIALOG_TITLE=96vF58WDC92I2fk64LkYAw_Select Roles
6
- COLUMN_CONTEXT_ID=lvM7cdTXglX69fl9P56LgA_Role
7
- COLUMN_CONTEXT_DESCRIPTION=k188UnefM86FjnRtq8rqqQ_Description
8
- SELECTED_CONTEXT_LIST_TITLE=f4QzI7Og2y6RMXdP20bSow_Selected Roles
9
- NO_DESCRIPTION=4OSYBxA26pM9G1jLHJ59mA_No description available
10
- NO_SELECTED_ROLES=HFCyWGdA3hJKMeYBO78QZA_No roles selected.
11
- NO_SELECTED_ROLES_WITH_ADVICE=jmmMUzlxBpnzxsVpvRpGcw_No roles selected. Please select at least one role.
12
- VISIBILITY=DvFExTl6+sVmrhScznmoUw_Visible for all users. Add roles to restrict the visibility of the view.
1
+ RADIO_BUTTON_GROUP_LABEL=ljonvFscQfFk1oGzI3c0/g_Visibility
2
+ ADD_CONTEXTS_BUTTON=WpqLmJzxQFT5hppV0oWSwg_Add Roles
3
+ REMOVE_ALL_BUTTON=suTXSwopbwtnb6+85ArXaw_Remove All
4
+ NO_DATA=I1bWi0ey/Wvn2UTHtE3i4g_No roles found
5
+ SELECT_ROLE_DIALOG_TITLE=ViYV+sjlpAGK6t1nyrZmRg_Select Roles
6
+ COLUMN_CONTEXT_ID=x1mo1EDRY2e9lJpGm0PNug_Role
7
+ COLUMN_CONTEXT_DESCRIPTION=M9XtTNeBapBCOGZyIpClvw_Description
8
+ SELECTED_CONTEXT_LIST_TITLE=ZeLd7YWYJ3swVvD0+nNelw_Selected Roles
9
+ NO_DESCRIPTION=PPSp+tER40fcq/AiBejuuA_No description available
10
+ NO_SELECTED_ROLES=UAMemN6rvmRz23bzRaWFvA_No roles selected.
11
+ NO_SELECTED_ROLES_WITH_ADVICE=XEdQyZS2xN/XkLY5XGusrw_No roles selected. Please select at least one role.
12
+ VISIBILITY=Zgl2xVdHdB9pcejiEKuHMw_Visible for all users. Add roles to restrict the visibility of the view.
@@ -9,6 +9,8 @@ sap.ui.define([
9
9
  "sap/base/util/merge",
10
10
  "sap/base/Log",
11
11
  "sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes",
12
+ "sap/ui/fl/apply/_internal/flexState/FlexObjectState",
13
+ "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
12
14
  "sap/ui/fl/registry/Settings",
13
15
  "sap/ui/fl/write/_internal/appVariant/AppVariantFactory",
14
16
  "sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory",
@@ -20,6 +22,8 @@ sap.ui.define([
20
22
  merge,
21
23
  Log,
22
24
  DescriptorChangeTypes,
25
+ FlexObjectState,
26
+ ManifestUtils,
23
27
  Settings,
24
28
  AppVariantFactory,
25
29
  AppVariantInlineChangeFactory,
@@ -135,23 +139,15 @@ sap.ui.define([
135
139
  }
136
140
 
137
141
  function _getDirtyDescrChanges(vSelector) {
138
- var oFlexControllerPersistence = FlexControllerFactory.createForSelector(vSelector)._oChangePersistence;
139
- if (!oFlexControllerPersistence) {
140
- return [];
141
- }
142
- return oFlexControllerPersistence.getDirtyChanges().filter(function(oChange) {
142
+ const sReference = ManifestUtils.getFlexReferenceForSelector(vSelector);
143
+ return FlexObjectState.getDirtyFlexObjects(sReference).filter(function(oChange) {
143
144
  return DescriptorChangeTypes.getChangeTypes().includes(oChange.getChangeType());
144
145
  });
145
146
  }
146
147
 
147
148
  function _getDirtyChanges(vSelector) {
148
- var oFlexControllerPersistence = FlexControllerFactory.createForSelector(vSelector)._oChangePersistence;
149
- if (!oFlexControllerPersistence) {
150
- return [];
151
- }
152
- var aChanges = oFlexControllerPersistence.getDirtyChanges();
153
- aChanges = aChanges.slice();
154
- return aChanges;
149
+ const sReference = ManifestUtils.getFlexReferenceForSelector(vSelector);
150
+ return FlexObjectState.getDirtyFlexObjects(sReference).slice();
155
151
  }
156
152
 
157
153
  function _deleteDescrChangesFromPersistence(vSelector) {
@@ -228,6 +224,9 @@ sap.ui.define([
228
224
  if (aUIChanges.length) {
229
225
  // Save the dirty UI changes to backend => firing PersistenceWriteApi.save
230
226
  return oFlexController.saveAll(Utils.getAppComponentForSelector(mPropertyBag.selector), true)
227
+ .then(function() {
228
+ oFlexController._oChangePersistence.removeDirtyChanges();
229
+ })
231
230
  .catch(function(oError) {
232
231
  // Delete the inconsistent app variant if the UI changes failed to save
233
232
  return this.deleteAppVariant({
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @namespace sap.ui.fl.write._internal.Storage
24
24
  * @since 1.67
25
- * @version 1.127.0
25
+ * @version 1.128.0
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl
28
28
  */