@openui5/sap.ui.fl 1.101.0 → 1.102.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 (146) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +3 -3
  3. package/src/sap/ui/fl/.library +1 -1
  4. package/src/sap/ui/fl/Cache.js +1 -1
  5. package/src/sap/ui/fl/ChangePersistence.js +6 -3
  6. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  7. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
  8. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
  9. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  10. package/src/sap/ui/fl/FlexController.js +4 -6
  11. package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
  12. package/src/sap/ui/fl/LayerUtils.js +1 -1
  13. package/src/sap/ui/fl/Scenario.js +27 -0
  14. package/src/sap/ui/fl/Utils.js +8 -6
  15. package/src/sap/ui/fl/Variant.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  22. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.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/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 +1 -1
  37. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +9 -5
  39. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  48. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
  49. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
  50. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
  51. package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
  52. package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
  54. package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
  55. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
  56. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  57. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  58. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  59. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  60. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +4 -2
  61. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
  62. package/src/sap/ui/fl/changeHandler/BaseRename.js +6 -4
  63. package/src/sap/ui/fl/changeHandler/HideControl.js +4 -2
  64. package/src/sap/ui/fl/changeHandler/MoveControls.js +4 -2
  65. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  66. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +6 -4
  67. package/src/sap/ui/fl/changeHandler/PropertyChange.js +4 -2
  68. package/src/sap/ui/fl/changeHandler/StashControl.js +17 -4
  69. package/src/sap/ui/fl/changeHandler/UnhideControl.js +6 -4
  70. package/src/sap/ui/fl/changeHandler/UnstashControl.js +7 -3
  71. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  72. package/src/sap/ui/fl/changeHandler/condenser/Classification.js +43 -0
  73. package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
  74. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  75. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  76. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  77. package/src/sap/ui/fl/initial/_internal/Storage.js +8 -6
  78. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
  79. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -1
  80. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +7 -2
  81. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  82. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  83. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  84. package/src/sap/ui/fl/library.js +18 -62
  85. package/src/sap/ui/fl/library.support.js +1 -1
  86. package/src/sap/ui/fl/support/Flexibility.js +1 -1
  87. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  88. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
  89. package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
  90. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  91. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  92. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  93. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  94. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  95. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
  96. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  97. package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
  98. package/src/sap/ui/fl/themes/base/VariantManagement.less +23 -20
  99. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  100. package/src/sap/ui/fl/util/IFrame.js +1 -1
  101. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  102. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  103. package/src/sap/ui/fl/variants/VariantManagement.js +2 -1
  104. package/src/sap/ui/fl/variants/VariantModel.js +1 -1
  105. package/src/sap/ui/fl/write/_internal/Storage.js +7 -1
  106. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
  107. package/src/sap/ui/fl/write/_internal/Versions.js +85 -36
  108. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  109. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  110. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  111. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  112. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +13 -11
  113. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +5 -3
  114. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  115. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +2 -2
  116. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +78 -12
  117. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  118. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  119. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  120. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  121. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  122. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
  123. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  124. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  125. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  126. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  127. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  128. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  129. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  130. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
  131. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  132. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  133. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  134. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  135. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  136. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +27 -6
  137. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +98 -41
  138. package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +13 -2
  139. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +7 -4
  140. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  141. package/src/sap/ui/fl/write/api/FeaturesAPI.js +2 -2
  142. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  143. package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +18 -11
  144. package/src/sap/ui/fl/write/api/TranslationAPI.js +54 -17
  145. package/src/sap/ui/fl/write/api/Version.js +22 -0
  146. package/src/sap/ui/fl/write/api/VersionsAPI.js +90 -74
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @class
18
18
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariant
19
19
  * @since 1.87
20
- * @version 1.101.0
20
+ * @version 1.102.0
21
21
  * @public
22
22
  * @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
23
23
  */
@@ -117,7 +117,7 @@ sap.ui.define([
117
117
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
118
118
  * @experimental Since 1.87.0
119
119
  * @author SAP SE
120
- * @version 1.101.0
120
+ * @version 1.102.0
121
121
  */
122
122
  var ABAPExtensibilityVariantFactory = {};
123
123
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.MultiTenantABAPExtensibilityVariant
26
26
  * @since 1.87
27
- * @version 1.101.0
27
+ * @version 1.102.0
28
28
  * @public
29
29
  */
30
30
 
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.ServiceValidation
20
20
  * @experimental Since 1.87.0
21
21
  * @author SAP SE
22
- * @version 1.101.0
22
+ * @version 1.102.0
23
23
  */
24
24
  var ServiceValidation = {};
25
25
 
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  *
44
44
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant
45
45
  * @since 1.87
46
- * @version 1.101.0
46
+ * @version 1.102.0
47
47
  * @public
48
48
  */
49
49
 
@@ -134,7 +134,7 @@ sap.ui.define([
134
134
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.UriParser
135
135
  * @experimental Since 1.87.0
136
136
  * @author SAP SE
137
- * @version 1.101.0
137
+ * @version 1.102.0
138
138
  */
139
139
  var UriParser = {};
140
140
 
@@ -200,7 +200,7 @@ sap.ui.define([
200
200
  * @namespace sap.ui.fl.write._internal.fieldExtensibility.Utils
201
201
  * @experimental Since 1.87.0
202
202
  * @author SAP SE
203
- * @version 1.101.0
203
+ * @version 1.102.0
204
204
  */
205
205
  var Utils = {};
206
206
 
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @experimental Since 1.93
23
23
  * @private
24
24
  * @author SAP SE
25
- * @version 1.101.0
25
+ * @version 1.102.0
26
26
  */
27
27
  var CAPAccess = {};
28
28
 
@@ -80,7 +80,7 @@ sap.ui.define([
80
80
  * @extends sap.ui.base.ManagedObject
81
81
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog
82
82
  * @author SAP SE
83
- * @version 1.101.0
83
+ * @version 1.102.0
84
84
  * @since 1.93
85
85
  * @experimental Since 1.93
86
86
  * @private
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.booleanEditor.BooleanEditor
19
19
  * @author SAP SE
20
20
  * @since 1.93
21
- * @version 1.101.0
21
+ * @version 1.102.0
22
22
  *
23
23
  * @private
24
24
  * @experimental 1.93
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor
21
21
  * @author SAP SE
22
22
  * @since 1.93
23
- * @version 1.101.0
23
+ * @version 1.102.0
24
24
  *
25
25
  * @private
26
26
  * @experimental 1.93
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor
23
23
  * @author SAP SE
24
24
  * @since 1.93
25
- * @version 1.101.0
25
+ * @version 1.102.0
26
26
  *
27
27
  * @private
28
28
  * @experimental 1.93
@@ -8,6 +8,7 @@ sap.ui.define([
8
8
  "sap/base/util/restricted/_omit",
9
9
  "sap/ui/fl/apply/_internal/flexState/FlexState",
10
10
  "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
11
+ "sap/ui/fl/apply/_internal/flexObjects/States",
11
12
  "sap/ui/fl/apply/_internal/ChangesController",
12
13
  "sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState",
13
14
  "sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger",
@@ -19,6 +20,7 @@ sap.ui.define([
19
20
  _omit,
20
21
  FlexState,
21
22
  ManifestUtils,
23
+ States,
22
24
  ChangesController,
23
25
  CompVariantState,
24
26
  CompVariantMerger,
@@ -32,7 +34,7 @@ sap.ui.define([
32
34
  /**
33
35
  * @namespace sap.ui.fl.apply._internal.flexState.FlexObjectState
34
36
  * @since 1.83
35
- * @version 1.101.0
37
+ * @version 1.102.0
36
38
  * @private
37
39
  * @ui5-restricted sap.ui.fl
38
40
  */
@@ -89,7 +91,6 @@ sap.ui.define([
89
91
  var oChangePersistence = getChangePersistence(mPropertyBag);
90
92
 
91
93
  return oChangePersistence.getChangesForComponent(_omit(mPropertyBag, ["invalidateCache", "selector"]), mPropertyBag.invalidateCache)
92
-
93
94
  .then(function(aPersistedChanges) {
94
95
  var aDirtyChanges = [];
95
96
  if (mPropertyBag.includeDirtyChanges) {
@@ -121,7 +122,7 @@ sap.ui.define([
121
122
  }
122
123
 
123
124
  /**
124
- * Collects changes from the different states within the <code>sap.ui.fl</code>-library.
125
+ * Collects changes from the different states within the <code>sap.ui.fl</code> library.
125
126
  * This includes the flexState entities as well as the <code>sap.ui.fl.ChangePersistence</code>.
126
127
  *
127
128
  * @param {object} mPropertyBag - Object with parameters as properties
@@ -134,12 +135,32 @@ sap.ui.define([
134
135
  FlexObjectState.getFlexObjects = function (mPropertyBag) {
135
136
  return initFlexStateAndSetReference(mPropertyBag)
136
137
  .then(function () {
137
- return getChangePersistenceEntities(mPropertyBag).then(function (aChangePersistenceEntities) {
138
- return getCompVariantEntities(mPropertyBag).concat(aChangePersistenceEntities);
139
- });
138
+ return getChangePersistenceEntities(mPropertyBag);
139
+ }).then(function (aChangePersistenceEntities) {
140
+ return getCompVariantEntities(mPropertyBag).concat(aChangePersistenceEntities);
140
141
  });
141
142
  };
142
143
 
144
+ /**
145
+ * Collects modified changes from the different states within the <code>sap.ui.fl</code> library.
146
+ * This includes the flexState entities as well as the <code>sap.ui.fl.ChangePersistence</code>.
147
+ *
148
+ * @param {object} mPropertyBag - Object with parameters as properties
149
+ * @param {sap.ui.fl.Selector} mPropertyBag.selector - Retrieves the associated flex persistence
150
+ * @param {boolean} mPropertyBag.invalidateCache - Flag if the cache should be invalidated
151
+ * @param {boolean} mPropertyBag.includeCtrlVariants - Flag if control variant changes should be included
152
+ * @returns {sap.ui.fl.Change[]} Flex objects, containing changes, compVariants & changes as well as ctrl_variant and changes
153
+ */
154
+ FlexObjectState.getDirtyFlexObjects = function (mPropertyBag) {
155
+ mPropertyBag.includeDirtyChanges = true;
156
+ var oChangePersistence = getChangePersistence(mPropertyBag);
157
+ var aChangePersistenceEntities = oChangePersistence.getDirtyChanges();
158
+ var aCompVariantEntities = getCompVariantEntities(mPropertyBag);
159
+ return aChangePersistenceEntities.concat(aCompVariantEntities).filter(function(oFlexObject) {
160
+ return oFlexObject.getState() !== States.PERSISTED;
161
+ });
162
+ };
163
+
143
164
  /**
144
165
  *
145
166
  * @param {object} mPropertyBag - Object with parameters as properties
@@ -19,7 +19,9 @@ sap.ui.define([
19
19
  "sap/ui/fl/apply/_internal/flexState/FlexState",
20
20
  "sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger",
21
21
  "sap/ui/fl/registry/Settings",
22
- "sap/ui/fl/write/_internal/Storage"
22
+ "sap/ui/fl/write/_internal/Storage",
23
+ "sap/ui/fl/write/_internal/Versions",
24
+ "sap/ui/fl/write/api/Version"
23
25
  ], function(
24
26
  _omit,
25
27
  _pick,
@@ -35,20 +37,40 @@ sap.ui.define([
35
37
  FlexState,
36
38
  CompVariantMerger,
37
39
  Settings,
38
- Storage
40
+ Storage,
41
+ Versions,
42
+ Version
39
43
  ) {
40
44
  "use strict";
41
45
 
42
- function isChangeUpdatable(oChange, sLayer) {
46
+ function isVersionIndependentOrInDraft(oChange, mPropertyBag) {
47
+ var aDraftFilenames = getPropertyFromVersionsModel("/draftFilenames", mPropertyBag);
48
+ if (aDraftFilenames) {
49
+ return oChange.getState() === Change.states.NEW || aDraftFilenames.includes(oChange.getFileName());
50
+ }
51
+ return true;
52
+ }
53
+
54
+ function getPropertyFromVersionsModel(sPropertyName, mPropertyBag) {
55
+ var bIsVersionEnabled = Settings.getInstanceOrUndef().isVersioningEnabled(mPropertyBag.layer);
56
+ if (bIsVersionEnabled && mPropertyBag.layer === Layer.CUSTOMER) {
57
+ return Versions.getVersionsModel({
58
+ reference: Utils.normalizeReference(mPropertyBag.reference),
59
+ layer: mPropertyBag.layer
60
+ }).getProperty(sPropertyName);
61
+ }
62
+ return undefined;
63
+ }
64
+
65
+ function isChangeUpdatable(oChange, mPropertyBag) {
43
66
  if (!["defaultVariant", "updateVariant"].includes(oChange.getChangeType())) {
44
67
  return false;
45
68
  }
46
-
47
- var bSameLayer = oChange.getLayer() === sLayer;
69
+ var bSameLayer = oChange.getLayer() === mPropertyBag.layer;
48
70
  var sPackageName = oChange.getDefinition().packageName;
49
71
  var bNotTransported = !sPackageName || sPackageName === "$TMP";
50
72
 
51
- return bSameLayer && bNotTransported;
73
+ return bSameLayer && bNotTransported && isVersionIndependentOrInDraft(oChange, mPropertyBag);
52
74
  }
53
75
 
54
76
  function getSubSection(mMap, oFlexObject) {
@@ -76,18 +98,25 @@ sap.ui.define([
76
98
  }
77
99
 
78
100
  function updateObjectAndStorage(oFlexObject, oStoredResponse) {
101
+ var sParentVersion = getPropertyFromVersionsModel("/persistedVersion", {layer: oFlexObject.getLayer(), reference: oFlexObject.getDefinition().reference});
79
102
  return Storage.update({
80
103
  flexObject: oFlexObject.getDefinition(),
81
104
  layer: oFlexObject.getLayer(),
82
- transport: oFlexObject.getRequest()
105
+ transport: oFlexObject.getRequest(),
106
+ parentVersion: sParentVersion
83
107
  }).then(function (result) {
84
- // update FlexObject
108
+ // update FlexObject and versionModel
85
109
  if (result && result.response) {
86
110
  oFlexObject.setResponse(result.response);
111
+ if (sParentVersion) {
112
+ Versions.onAllChangesSaved({
113
+ reference: result.response.reference,
114
+ layer: result.response.layer
115
+ });
116
+ }
87
117
  } else {
88
118
  oFlexObject.setState(States.PERSISTED);
89
119
  }
90
-
91
120
  return oStoredResponse;
92
121
  }).then(function (oStoredResponse) {
93
122
  // update StorageResponse
@@ -97,7 +126,7 @@ sap.ui.define([
97
126
  });
98
127
  }
99
128
 
100
- function deleteObjectAndRemoveFromStorage(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse) {
129
+ function deleteObjectAndRemoveFromStorage(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sParentVersion) {
101
130
  function removeFromArrayByName(aObjectArray, oFlexObject) {
102
131
  for (var i = aObjectArray.length - 1; i >= 0; i--) {
103
132
  //aObjectArray can come from either back end response or flex state
@@ -113,7 +142,8 @@ sap.ui.define([
113
142
  return Storage.remove({
114
143
  flexObject: oFlexObject.getDefinition(),
115
144
  layer: oFlexObject.getLayer(),
116
- transport: oFlexObject.getRequest()
145
+ transport: oFlexObject.getRequest(),
146
+ parentVersion: sParentVersion
117
147
  }).then(function () {
118
148
  // update compVariantsMap
119
149
  delete mCompVariantsMapByPersistencyKey.byId[oFlexObject.getId()];
@@ -220,7 +250,7 @@ sap.ui.define([
220
250
  *
221
251
  * @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
222
252
  * @since 1.83
223
- * @version 1.101.0
253
+ * @version 1.102.0
224
254
  * @private
225
255
  * @ui5-restricted sap.ui.fl
226
256
  */
@@ -250,7 +280,7 @@ sap.ui.define([
250
280
  var aDefaultVariantChanges = mCompVariantsMap.defaultVariants;
251
281
  var oChange = aDefaultVariantChanges[aDefaultVariantChanges.length - 1];
252
282
 
253
- if (!oChange || !isChangeUpdatable(oChange, mPropertyBag.layer)) {
283
+ if (!oChange || !isChangeUpdatable(oChange, mPropertyBag)) {
254
284
  var oChangeParameter = {
255
285
  fileName: Utils.createDefaultFileName(sChangeType),
256
286
  fileType: "change",
@@ -404,13 +434,12 @@ sap.ui.define([
404
434
  var bIsChangedOnLayer = oVariant.getChanges().some(function (oChange) {
405
435
  return oChange.getLayer() === sLayer;
406
436
  });
407
-
408
- return oVariant.getPersisted() && bSameLayer && bNotTransported && !bIsChangedOnLayer;
437
+ return oVariant.getPersisted() && bSameLayer && bNotTransported && !bIsChangedOnLayer && isVersionIndependentOrInDraft(oVariant, mPropertyBag);
409
438
  }
410
439
 
411
440
  function getLatestUpdatableChange(oVariant) {
412
441
  return oVariant.getChanges().reverse().find(function (oChange) {
413
- return oChange.getChangeType() === "updateVariant" && isChangeUpdatable(oChange, sLayer);
442
+ return oChange.getChangeType() === "updateVariant" && isChangeUpdatable(oChange, mPropertyBag);
414
443
  });
415
444
  }
416
445
 
@@ -719,21 +748,27 @@ sap.ui.define([
719
748
  * @private
720
749
  */
721
750
  CompVariantState.persist = function(mPropertyBag) {
722
- function writeObjectAndAddToState(oFlexObject, oStoredResponse) {
751
+ function writeObjectAndAddToState(oFlexObject, oStoredResponse, sParentVersion) {
723
752
  // TODO: remove this line as soon as layering and a condensing is in place
724
753
  return Storage.write({
725
754
  flexObjects: [oFlexObject.getDefinition()],
726
755
  layer: oFlexObject.getLayer(),
727
756
  transport: oFlexObject.getRequest(),
728
- isLegacyVariant: oFlexObject.isVariant()
757
+ isLegacyVariant: oFlexObject.isVariant(),
758
+ parentVersion: sParentVersion
729
759
  }).then(function (result) {
730
- // updateFlexObject
760
+ // updateFlexObject and versionModel
731
761
  if (result && result.response && result.response[0]) {
732
762
  oFlexObject.setResponse(result.response[0]);
763
+ if (sParentVersion) {
764
+ Versions.onAllChangesSaved({
765
+ reference: result.response[0].reference,
766
+ layer: result.response[0].layer
767
+ });
768
+ }
733
769
  } else {
734
770
  oFlexObject.setState(States.PERSISTED);
735
771
  }
736
-
737
772
  return oStoredResponse;
738
773
  }).then(function (oStoredResponse) {
739
774
  // update StorageResponse
@@ -742,32 +777,54 @@ sap.ui.define([
742
777
  });
743
778
  }
744
779
 
780
+ function saveObject(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sParentVersion) {
781
+ switch (oFlexObject.getState()) {
782
+ case States.NEW:
783
+ ifVariantClearRevertData(oFlexObject);
784
+ return writeObjectAndAddToState(oFlexObject, oStoredResponse, sParentVersion);
785
+ case States.DIRTY:
786
+ ifVariantClearRevertData(oFlexObject);
787
+ return updateObjectAndStorage(oFlexObject, oStoredResponse, sParentVersion);
788
+ case States.DELETED:
789
+ ifVariantClearRevertData(oFlexObject);
790
+ return deleteObjectAndRemoveFromStorage(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sParentVersion);
791
+ default:
792
+ break;
793
+ }
794
+ }
795
+
745
796
  var sReference = mPropertyBag.reference;
746
797
  var sPersistencyKey = mPropertyBag.persistencyKey;
747
798
  var mCompVariantsMap = FlexState.getCompVariantsMap(sReference);
748
799
  var mCompVariantsMapByPersistencyKey = mCompVariantsMap._getOrCreate(sPersistencyKey);
749
- var oStoredResponse = FlexState.getStorageResponse(sReference);
750
-
751
- var aPromises = getAllCompVariantObjects(mCompVariantsMapByPersistencyKey)
752
- .filter(needsPersistencyCall)
753
- .map(function (oFlexObject) {
754
- switch (oFlexObject.getState()) {
755
- case States.NEW:
756
- ifVariantClearRevertData(oFlexObject);
757
- return writeObjectAndAddToState(oFlexObject, oStoredResponse);
758
- case States.DIRTY:
759
- ifVariantClearRevertData(oFlexObject);
760
- return updateObjectAndStorage(oFlexObject, oStoredResponse);
761
- case States.DELETED:
762
- ifVariantClearRevertData(oFlexObject);
763
- return deleteObjectAndRemoveFromStorage(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse);
764
- default:
765
- break;
766
- }
767
- });
768
800
 
769
- // TODO Consider not rejecting with first error, but wait for all promises and collect the results
770
- return Promise.all(aPromises);
801
+ return FlexState.getStorageResponse(sReference)
802
+ .then(function(oStoredResponse) {
803
+ var aFlexObject = getAllCompVariantObjects(mCompVariantsMapByPersistencyKey).filter(needsPersistencyCall);
804
+ var aPromises = aFlexObject.map(function (oFlexObject, index) {
805
+ if (index === 0) {
806
+ var sParentVersion = getPropertyFromVersionsModel("/persistedVersion", {
807
+ layer: oFlexObject.getLayer(),
808
+ reference: oFlexObject.getDefinition().reference
809
+ });
810
+ // TODO: use condensing route to reduce backend requests
811
+ // need to save first entry to generate draft version in backend
812
+ return saveObject(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sParentVersion)
813
+ .then(function () {
814
+ var aPromises = aFlexObject.map(function (oFlexObject, index) {
815
+ if (index !== 0) {
816
+ var sDraftVersion = sParentVersion ? Version.Number.Draft : undefined;
817
+ return saveObject(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sDraftVersion);
818
+ }
819
+ });
820
+ return aPromises;
821
+ });
822
+ }
823
+ });
824
+
825
+ // TODO Consider not rejecting with first error, but wait for all promises and collect the results
826
+ return Promise.all(aPromises);
827
+ });
771
828
  };
772
829
 
773
830
  /**
@@ -62,6 +62,11 @@ sap.ui.define([
62
62
  */
63
63
  lrepObject: {type: "any", group: "Misc", defaultValue: null},
64
64
 
65
+ /**
66
+ * Flag if the "Local Object" button should be visible.
67
+ */
68
+ localObjectVisible: {type: "boolean", group: "Misc", defaultValue: true},
69
+
65
70
  /**
66
71
  * Flag indicating whether the selection of an ABAP package is to be hidden or not.
67
72
  */
@@ -143,13 +148,14 @@ sap.ui.define([
143
148
  TransportDialog.prototype._createButtons = function() {
144
149
  var that = this;
145
150
 
146
- this.addButton(new Button({
151
+ this._oLocalObjectButton = new Button({
147
152
  text: this._oResources.getText("TRANSPORT_DIALOG_LOCAL_OBJECT"),
148
153
  tooltip: this._oResources.getText("TRANSPORT_DIALOG_LOCAL_OBJECT"),
149
154
  press: function() {
150
155
  that._onLocal();
151
156
  }
152
- }));
157
+ });
158
+ this.addButton(this._oLocalObjectButton);
153
159
  this.addButton(new Button({
154
160
  text: this._oResources.getText("TRANSPORT_DIALOG_OK"),
155
161
  tooltip: this._oResources.getText("TRANSPORT_DIALOG_OK"),
@@ -423,6 +429,11 @@ sap.ui.define([
423
429
  return null;
424
430
  };
425
431
 
432
+ TransportDialog.prototype.setLocalObjectVisible = function (bLocalObjectVisible) {
433
+ this._oLocalObjectButton.setVisible(bLocalObjectVisible);
434
+ this.setProperty("localObjectVisible", bLocalObjectVisible);
435
+ };
436
+
426
437
  /**
427
438
  * An ABAP package that can be used as default for the ABAP package selection.
428
439
  * The property can only be set once and afterwards it cannot be changed.
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @private
27
27
  * @alias sap.ui.fl.write._internal.transport.TransportSelection
28
28
  * @author SAP SE
29
- * @version 1.101.0
29
+ * @version 1.102.0
30
30
  * @since 1.74.0
31
31
  * Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
32
32
  * of the SmartVariant control.
@@ -50,9 +50,10 @@ sap.ui.define([
50
50
  * @param {boolean} bCompactMode - Flag indicating whether the transport dialog should be opened in compact mode
51
51
  * @param {object} oControl - Control instance
52
52
  * @param {string} sStyleClass - CSS style class that should be added to any dialogs
53
+ * @param {boolean} bLocalObjectVisible - Flag if the "Local Object" button should be visible in the transport dialog
53
54
  * @public
54
55
  */
55
- TransportSelection.prototype.selectTransport = function(oObjectInfo, fOkay, fError, bCompactMode, oControl, sStyleClass) {
56
+ TransportSelection.prototype.selectTransport = function(oObjectInfo, fOkay, fError, bCompactMode, oControl, sStyleClass, bLocalObjectVisible) {
56
57
  //No transport selection unless Lrep connector is available
57
58
  if (!FlUtils.getLrepUrl()) {
58
59
  fOkay(this._createEventObject(oObjectInfo, {transportId: ""}));
@@ -65,6 +66,7 @@ sap.ui.define([
65
66
  hidePackage: !LayerUtils.doesCurrentLayerRequirePackage(),
66
67
  pkg: oObjectInfo.package,
67
68
  transports: oGetTransportsResult.transports,
69
+ localObjectVisible: bLocalObjectVisible,
68
70
  lrepObject: this._toLREPObject(oObjectInfo)
69
71
  }, fOkay, fError, bCompactMode, sStyleClass);
70
72
  } else {
@@ -305,10 +307,11 @@ sap.ui.define([
305
307
  * @param {sap.ui.fl.Change} [oChange] - Change for which the transport information should be retrieved
306
308
  * @param {object} oControl - Object of the root control for the transport dialog
307
309
  * @param {string} sStyleClass - CSS style class that should be added to any dialogs
310
+ * @param {boolean} bLocalObjectVisible - Flag if the "Local Object" button should be visible in the transport dialog
308
311
  * @returns {Promise} Promise that resolves
309
312
  * @public
310
313
  */
311
- TransportSelection.prototype.openTransportSelection = function(oChange, oControl, sStyleClass) {
314
+ TransportSelection.prototype.openTransportSelection = function(oChange, oControl, sStyleClass, bLocalObjectVisible) {
312
315
  var that = this;
313
316
 
314
317
  return new Promise(function(resolve, reject) {
@@ -342,7 +345,7 @@ sap.ui.define([
342
345
  oObject.type = oChange.getDefinition().fileType;
343
346
  }
344
347
 
345
- that.selectTransport(oObject, fnOkay, fnError, false, oControl, sStyleClass);
348
+ that.selectTransport(oObject, fnOkay, fnError, false, oControl, sStyleClass, bLocalObjectVisible);
346
349
  });
347
350
  };
348
351
 
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * Entity that handles ABAP transport related information.
28
28
  * @alias sap.ui.fl.write._internal.transport.Transports
29
29
  * @author SAP SE
30
- * @version 1.101.0
30
+ * @version 1.102.0
31
31
  * @since 1.74.0
32
32
  * @private
33
33
  * @ui5-restricted sap.ui.fl.write._internal.transport
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @description App variant functionality is only supported in S/4HANA Cloud Platform & S/4HANA on Premise.
54
54
  * App variant functionality should be available if the following conditions are met:
55
55
  * When the current layer is 'CUSTOMER'.
56
- * When it is not a standalone app runing on Neo Cloud.
56
+ * When it is not a standalone app running on Neo Cloud.
57
57
  * When the backend supports this feature.
58
58
  * @private
59
59
  * @ui5-restricted
@@ -105,7 +105,7 @@ sap.ui.define([
105
105
  * Checks if key user has also the admin role to enable the translation button
106
106
  *
107
107
  * @param {sap.ui.fl.Layer} sLayer - Current layer
108
- * @returns {Promise<boolean>} Resolves to a boolean indicating if they keyuser is also admin
108
+ * @returns {Promise<boolean>} Resolves to a boolean indicating if the key user is also an admin
109
109
  * @public
110
110
  */
111
111
  isKeyUserTranslationEnabled: function (sLayer) {
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @namespace sap.ui.fl.write.api.FieldExtensibility
26
26
  * @since 1.87
27
- * @version 1.101.0
27
+ * @version 1.102.0
28
28
  * @private
29
29
  * @ui5-restricted sap.ui.fl, sap.ui.rta
30
30
  */