@openui5/sap.ui.fl 1.98.0 → 1.99.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 (143) hide show
  1. package/package.json +3 -3
  2. package/src/sap/ui/fl/.library +1 -1
  3. package/src/sap/ui/fl/Cache.js +1 -1
  4. package/src/sap/ui/fl/Change.js +7 -7
  5. package/src/sap/ui/fl/ChangePersistence.js +15 -15
  6. package/src/sap/ui/fl/ChangePersistenceFactory.js +2 -2
  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 +17 -8
  11. package/src/sap/ui/fl/FlexControllerFactory.js +2 -2
  12. package/src/sap/ui/fl/LayerUtils.js +1 -1
  13. package/src/sap/ui/fl/Utils.js +13 -13
  14. package/src/sap/ui/fl/Variant.js +5 -5
  15. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
  16. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
  17. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
  18. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  19. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  20. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  21. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.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/SetTitle.js +1 -1
  25. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
  26. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  27. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +7 -10
  39. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
  45. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -4
  46. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +8 -17
  47. package/src/sap/ui/fl/{PreprocessorImpl.js → apply/_internal/preprocessors/ControllerExtension.js} +38 -47
  48. package/src/sap/ui/fl/{EventHistory.js → apply/_internal/preprocessors/EventHistory.js} +7 -7
  49. package/src/sap/ui/fl/{RegistrationDelegator.js → apply/_internal/preprocessors/RegistrationDelegator.js} +40 -42
  50. package/src/sap/ui/fl/{XmlPreprocessorImpl.js → apply/_internal/preprocessors/XmlPreprocessor.js} +6 -6
  51. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
  52. package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +1 -1
  53. package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
  54. package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
  55. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
  56. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  57. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
  58. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
  59. package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
  60. package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
  61. package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
  62. package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
  63. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
  64. package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
  65. package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
  66. package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
  67. package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
  68. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
  69. package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
  70. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  71. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  72. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  73. package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
  74. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
  75. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +9 -9
  76. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
  77. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  78. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  79. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  80. package/src/sap/ui/fl/library.js +10 -10
  81. package/src/sap/ui/fl/registry/Settings.js +44 -5
  82. package/src/sap/ui/fl/support/Flexibility.js +1 -1
  83. package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
  84. package/src/sap/ui/fl/support/_internal/getFlexSettings.js +34 -0
  85. package/src/sap/ui/fl/support/api/SupportAPI.js +5 -2
  86. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  87. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  88. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  89. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  90. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
  91. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +4 -4
  92. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +4 -4
  93. package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
  94. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  95. package/src/sap/ui/fl/util/DescriptorChangeCheck.js +1 -1
  96. package/src/sap/ui/fl/util/IFrame.js +1 -1
  97. package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
  98. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  99. package/src/sap/ui/fl/util/changePropertyValueByPath.js +1 -1
  100. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  101. package/src/sap/ui/fl/variants/VariantManagement.js +5 -0
  102. package/src/sap/ui/fl/variants/VariantModel.js +28 -31
  103. package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +6 -2
  104. package/src/sap/ui/fl/write/_internal/Storage.js +15 -1
  105. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
  106. package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
  107. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  108. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  109. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  110. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  111. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
  112. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
  113. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  114. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +33 -3
  115. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -4
  116. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  117. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  118. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  119. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  120. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  121. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
  122. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  123. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  124. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  125. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  126. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  127. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  128. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  129. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +5 -5
  130. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
  131. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
  132. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  133. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
  134. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
  135. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +1 -1
  136. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -1
  137. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  138. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  139. package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +125 -32
  140. package/src/sap/ui/fl/write/api/FeaturesAPI.js +4 -1
  141. package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
  142. package/src/sap/ui/fl/write/api/TranslationAPI.js +23 -2
  143. package/src/sap/ui/fl/write/connectors/BaseConnector.js +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.fl",
3
- "version": "1.98.0",
3
+ "version": "1.99.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.fl",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,7 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.m": "1.98.0",
18
- "@openui5/sap.ui.core": "1.98.0"
17
+ "@openui5/sap.m": "1.99.0",
18
+ "@openui5/sap.ui.core": "1.99.0"
19
19
  }
20
20
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.98.0</version>
9
+ <version>1.99.0</version>
10
10
 
11
11
  <documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
12
12
 
@@ -24,7 +24,7 @@ function(
24
24
  * @alias sap.ui.fl.Cache
25
25
  * @experimental Since 1.25.0
26
26
  * @author SAP SE
27
- * @version 1.98.0
27
+ * @version 1.99.0
28
28
  *
29
29
  * @private
30
30
  * @ui5-restricted sap.ui.fl
@@ -293,7 +293,7 @@ sap.ui.define([
293
293
  /**
294
294
  * Returns the change type.
295
295
  *
296
- * @returns {String} Change type of the file, for example <code>LabelChange</code>
296
+ * @returns {string} Change type of the file, for example <code>LabelChange</code>
297
297
  * @public
298
298
  */
299
299
  Change.prototype.getChangeType = function () {
@@ -305,7 +305,7 @@ sap.ui.define([
305
305
  /**
306
306
  * Returns the file name.
307
307
  *
308
- * @returns {String} <code>fileName</code> of the file
308
+ * @returns {string} <code>fileName</code> of the file
309
309
  * @public
310
310
  */
311
311
  Change.prototype.getFileName = function () {
@@ -317,7 +317,7 @@ sap.ui.define([
317
317
  /**
318
318
  * Returns the file type.
319
319
  *
320
- * @returns {String} <code>fileType</code> of the file
320
+ * @returns {string} <code>fileType</code> of the file
321
321
  * @public
322
322
  */
323
323
  Change.prototype.getFileType = function () {
@@ -351,7 +351,7 @@ sap.ui.define([
351
351
  /**
352
352
  * Returns the namespace. The namespace of the change is also the namespace of the change file in the repository.
353
353
  *
354
- * @returns {String} Namespace of the change file
354
+ * @returns {string} Namespace of the change file
355
355
  *
356
356
  * @public
357
357
  */
@@ -373,7 +373,7 @@ sap.ui.define([
373
373
  /**
374
374
  * Returns the name of module which this change refers to (XML or JS).
375
375
  *
376
- * @returns {String} Module name
376
+ * @returns {string} Module name
377
377
  *
378
378
  * @public
379
379
  */
@@ -395,7 +395,7 @@ sap.ui.define([
395
395
  /**
396
396
  * Returns the project ID of the change. There might be multiple projects adapting a base application. The project ID helps to see where the change is coming from. If no <code>projectIDid</code> is specified, it is the <code>sap.app/id</code>.
397
397
  *
398
- * @returns {String} Project ID of the change file
398
+ * @returns {string} Project ID of the change file
399
399
  *
400
400
  * @public
401
401
  */
@@ -622,7 +622,7 @@ sap.ui.define([
622
622
  /**
623
623
  * Gets the creation timestamp.
624
624
  *
625
- * @returns {String} Creation timestamp
625
+ * @returns {string} Creation timestamp
626
626
  *
627
627
  * @public
628
628
  */
@@ -105,7 +105,7 @@ sap.ui.define([
105
105
  * Return the name of the SAPUI5 component. All changes are assigned to 1 SAPUI5 component. The SAPUI5 component also serves as authorization
106
106
  * object.
107
107
  *
108
- * @returns {String} component name
108
+ * @returns {string} component name
109
109
  * @public
110
110
  */
111
111
  ChangePersistence.prototype.getComponentName = function() {
@@ -602,16 +602,12 @@ sap.ui.define([
602
602
  function shouldCondensingBeEnabled(oAppComponent, aChanges) {
603
603
  var bCondenserEnabled = false;
604
604
 
605
- if (!oAppComponent || aChanges.length < 2) {
606
- return false;
607
- }
608
-
609
- if (!checkIfOnlyOne(aChanges, "getLayer")) {
605
+ if (!oAppComponent || aChanges.length < 2 || !checkIfOnlyOne(aChanges, "getLayer")) {
610
606
  return false;
611
607
  }
612
608
 
613
609
  var sLayer = aChanges[0].getLayer();
614
- if (sLayer === "CUSTOMER" || sLayer === "USER") {
610
+ if ([Layer.CUSTOMER, Layer.USER].includes(sLayer)) {
615
611
  bCondenserEnabled = true;
616
612
  }
617
613
 
@@ -637,12 +633,15 @@ sap.ui.define([
637
633
  this._deleteNotSavedChanges(aAllChanges, aCondensedChanges, bAlreadyDeletedViaCondense);
638
634
  }
639
635
 
640
- function getAllRelevantChangesForCondensing(aDirtyChanges) {
636
+ function getAllRelevantChangesForCondensing(aDirtyChanges, aDraftFilenames) {
641
637
  if (!aDirtyChanges.length) {
642
638
  return [];
643
639
  }
644
640
  var sLayer = aDirtyChanges[0].getLayer();
645
641
  var aPersistedAndSameLayerChanges = this._mChanges.aChanges.filter(function(oChange) {
642
+ if (sLayer === Layer.CUSTOMER && aDraftFilenames) {
643
+ return oChange.getState() === Change.states.PERSISTED && aDraftFilenames.includes(oChange.getFileName());
644
+ }
646
645
  return oChange.getState() === Change.states.PERSISTED && LayerUtils.compareAgainstCurrentLayer(oChange.getLayer(), sLayer) === 0;
647
646
  });
648
647
  return aPersistedAndSameLayerChanges.concat(aDirtyChanges);
@@ -660,11 +659,12 @@ sap.ui.define([
660
659
  * therefore, the cache update of the current app is skipped because the dirty change is not saved for the running app.
661
660
  * @param {sap.ui.fl.Change} [aChanges] - If passed only those changes are saved
662
661
  * @param {string} sParentVersion - Parent version
662
+ * @param {string[]} [aDraftFilenames] - Filesnames from persisted changes draft version
663
663
  * @returns {Promise} Resolving after all changes have been saved
664
664
  */
665
- ChangePersistence.prototype.saveDirtyChanges = function(oAppComponent, bSkipUpdateCache, aChanges, sParentVersion) {
665
+ ChangePersistence.prototype.saveDirtyChanges = function(oAppComponent, bSkipUpdateCache, aChanges, sParentVersion, aDraftFilenames) {
666
666
  var aDirtyChanges = aChanges || this._aDirtyChanges;
667
- var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(this, aDirtyChanges);
667
+ var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(this, aDirtyChanges, aDraftFilenames);
668
668
  var bIsCondensingEnabled = (
669
669
  isBackendCondensingEnabled(aRelevantChangesForCondensing)
670
670
  && shouldCondensingBeEnabled(oAppComponent, aRelevantChangesForCondensing)
@@ -962,10 +962,10 @@ sap.ui.define([
962
962
  };
963
963
 
964
964
  /**
965
- * Removes unsaved changes and reverts these.
965
+ * Removes unsaved changes.
966
966
  *
967
- * @param {string|string[]} vLayer - Layer or multiple layers for which changes shall be deleted
968
- * @param {sap.ui.core.Component} oComponent - Component instance
967
+ * @param {string|string[]} [vLayer] - Layer or multiple layers for which changes shall be deleted. If omitted, changes on all layers are considered.
968
+ * @param {sap.ui.core.Component} [oComponent] - Component instance, required if oControl is specified
969
969
  * @param {string} [oControl] - Control for which the changes should be deleted. If omitted, all changes for the app component are considered.
970
970
  * @param {string} [sGenerator] - Generator of changes (optional)
971
971
  * @param {string[]} [aChangeTypes] - Types of changes (optional)
@@ -973,13 +973,13 @@ sap.ui.define([
973
973
  * @returns {Promise} Promise that resolves after the deletion took place
974
974
  */
975
975
  ChangePersistence.prototype.removeDirtyChanges = function(vLayer, oComponent, oControl, sGenerator, aChangeTypes) {
976
- var aLayers = [].concat(vLayer);
976
+ var aLayers = [].concat(vLayer || []);
977
977
  var aDirtyChanges = this._aDirtyChanges;
978
978
 
979
979
  var aChangesToBeRemoved = aDirtyChanges.filter(function (oChange) {
980
980
  var bChangeValid = true;
981
981
 
982
- if (!aLayers.includes(oChange.getLayer())) {
982
+ if (aLayers.length && !aLayers.includes(oChange.getLayer())) {
983
983
  return false;
984
984
  }
985
985
 
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @alias sap.ui.fl.ChangePersistenceFactory
31
31
  * @experimental Since 1.27.0
32
32
  * @author SAP SE
33
- * @version 1.98.0
33
+ * @version 1.99.0
34
34
  * @private
35
35
  * @ui5-restricted sap.ui.fl
36
36
  */
@@ -40,7 +40,7 @@ sap.ui.define([
40
40
 
41
41
  /**
42
42
  * Creates or returns an instance of the ChangePersistence
43
- * @param {String} sComponentName - Name of the component
43
+ * @param {string} sComponentName - Name of the component
44
44
  * @returns {sap.ui.fl.ChangePersistence} <code>ChangePersistence</code> instance
45
45
  */
46
46
  ChangePersistenceFactory.getChangePersistenceForComponent = function(sComponentName) {
@@ -20,7 +20,7 @@ function(
20
20
  * @class
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.98.0
23
+ * @version 1.99.0
24
24
  *
25
25
  * @private
26
26
  * @static
@@ -20,7 +20,7 @@ function(
20
20
  * @class
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.98.0
23
+ * @version 1.99.0
24
24
  *
25
25
  * @private
26
26
  * @static
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @class
17
17
  *
18
18
  * @author SAP SE
19
- * @version 1.98.0
19
+ * @version 1.99.0
20
20
  *
21
21
  * @private
22
22
  * @static
@@ -84,7 +84,7 @@ sap.ui.define([
84
84
  * @alias sap.ui.fl.FlexController
85
85
  * @experimental Since 1.27.0
86
86
  * @author SAP SE
87
- * @version 1.98.0
87
+ * @version 1.99.0
88
88
  */
89
89
  var FlexController = function(sComponentName) {
90
90
  this._oChangePersistence = undefined;
@@ -97,7 +97,7 @@ sap.ui.define([
97
97
  /**
98
98
  * Returns the component name of the FlexController
99
99
  *
100
- * @returns {String} the name of the component
100
+ * @returns {string} the name of the component
101
101
  * @public
102
102
  */
103
103
  FlexController.prototype.getComponentName = function() {
@@ -465,13 +465,22 @@ sap.ui.define([
465
465
  * @public
466
466
  */
467
467
  FlexController.prototype.saveAll = function(oAppComponent, bSkipUpdateCache, bDraft, sLayer, bRemoveOtherLayerChanges) {
468
- var sParentVersion = bDraft ? Versions.getVersionsModel({
469
- reference: Utils.normalizeReference(this._sComponentName),
470
- layer: Layer.CUSTOMER // only the customer layer has draft active
471
- }).getProperty("/persistedVersion") : undefined;
472
-
468
+ var sParentVersion;
469
+ var aDraftFilenames;
470
+ if (bDraft) {
471
+ var oVersionModel = Versions.getVersionsModel({
472
+ reference: Utils.normalizeReference(this._sComponentName),
473
+ layer: Layer.CUSTOMER // only the customer layer has draft active
474
+ });
475
+ sParentVersion = oVersionModel.getProperty("/persistedVersion");
476
+ var aVersions = oVersionModel.getProperty("/versions");
477
+ if (aVersions && aVersions.length > 0) {
478
+ var oLatestVersion = aVersions[0];
479
+ aDraftFilenames = oLatestVersion.version === sap.ui.fl.Versions.Draft ? oLatestVersion.filenames : undefined;
480
+ }
481
+ }
473
482
  return this._removeOtherLayerChanges(oAppComponent, sLayer, bRemoveOtherLayerChanges)
474
- .then(this._oChangePersistence.saveDirtyChanges.bind(this._oChangePersistence, oAppComponent, bSkipUpdateCache, undefined, sParentVersion))
483
+ .then(this._oChangePersistence.saveDirtyChanges.bind(this._oChangePersistence, oAppComponent, bSkipUpdateCache, undefined, sParentVersion, aDraftFilenames))
475
484
  .then(function(oResult) {
476
485
  if (bDraft && oResult && oResult.response) {
477
486
  var vChangeDefinition = oResult.response;
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @alias sap.ui.fl.FlexControllerFactory
33
33
  * @experimental Since 1.27.0
34
34
  * @author SAP SE
35
- * @version 1.98.0
35
+ * @version 1.99.0
36
36
  *
37
37
  * @private
38
38
  * @ui5-restricted sap.ui.fl
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  /**
49
49
  * Creates or returns an instance of the FlexController
50
50
  *
51
- * @param {String} sComponentName - Name of the component
51
+ * @param {string} sComponentName - Name of the component
52
52
  * @returns {sap.ui.fl.FlexController} instance
53
53
  *
54
54
  */
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  *
42
42
  * @namespace sap.ui.fl.LayerUtils
43
43
  * @author SAP SE
44
- * @version 1.98.0
44
+ * @version 1.99.0
45
45
  */
46
46
  var LayerUtils = {
47
47
  _mLayersIndex: mLayersIndex,
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @namespace
38
38
  * @alias sap.ui.fl.Utils
39
39
  * @author SAP SE
40
- * @version 1.98.0
40
+ * @version 1.99.0
41
41
  * @experimental Since 1.25.0
42
42
  */
43
43
  var Utils = {
@@ -160,8 +160,8 @@ sap.ui.define([
160
160
  * Determines the content for a given startUpParameter name
161
161
  *
162
162
  * @param {sap.ui.core.Component} oComponent - component instance
163
- * @param {String} sParameterName - startUpParameterName that shall be determined
164
- * @returns {String} content of found startUpParameter
163
+ * @param {string} sParameterName - startUpParameterName that shall be determined
164
+ * @returns {string} content of found startUpParameter
165
165
  * @private
166
166
  */
167
167
  _getComponentStartUpParameter: function(oComponent, sParameterName) {
@@ -187,7 +187,7 @@ sap.ui.define([
187
187
  /**
188
188
  * Gets the component instance for a component ID.
189
189
  *
190
- * @param {String} sComponentId component ID
190
+ * @param {string} sComponentId component ID
191
191
  * @returns {sap.ui.core.Component} component for the component ID
192
192
  * @private
193
193
  */
@@ -203,7 +203,7 @@ sap.ui.define([
203
203
  * Returns ComponentId of the control. If the control has no component, it walks up the control tree in order to find a control having one
204
204
  *
205
205
  * @param {sap.ui.core.Control} oControl - SAPUI5 control
206
- * @returns {String} The component id or empty string if component id couldn't be found
206
+ * @returns {string} The component id or empty string if component id couldn't be found
207
207
  * @see sap.ui.core.Component.getOwnerIdFor
208
208
  * @private
209
209
  */
@@ -348,7 +348,7 @@ sap.ui.define([
348
348
  * Returns OwnerId of the control
349
349
  *
350
350
  * @param {sap.ui.core.Control} oControl - SAPUI5 control
351
- * @returns {String} The owner id
351
+ * @returns {string} The owner id
352
352
  * @see sap.ui.core.Component.getOwnerIdFor
353
353
  * @private
354
354
  */
@@ -394,8 +394,8 @@ sap.ui.define([
394
394
  * used: For example en-us will be converted to EN. If the browser language already is in ISO 639-1, it will be returned after an upper case
395
395
  * conversion: For example de will be converted to DE.
396
396
  *
397
- * @param {String} sBrowserLanguage - Language in RFC4646
398
- * @returns {String} Language in ISO 639-1. Empty string if conversion was not successful
397
+ * @param {string} sBrowserLanguage - Language in RFC4646
398
+ * @returns {string} Language in ISO 639-1. Empty string if conversion was not successful
399
399
  * @public
400
400
  * @function
401
401
  * @name sap.ui.fl.Utils.convertBrowserLanguageToISO639_1
@@ -428,7 +428,7 @@ sap.ui.define([
428
428
  /**
429
429
  * Returns the current language in ISO 639-1 format.
430
430
  *
431
- * @returns {String} Language in ISO 639-1. Empty string if language cannot be determined
431
+ * @returns {string} Language in ISO 639-1. Empty string if language cannot be determined
432
432
  * @public
433
433
  */
434
434
  getCurrentLanguage: function() {
@@ -456,8 +456,8 @@ sap.ui.define([
456
456
  /**
457
457
  * Converts ASCII coding into a string. Required for restoring stored code extensions
458
458
  *
459
- * @param {String} ascii string containing ascii code valid numbers separated by ','
460
- * @returns {String} parsedString parsed string
459
+ * @param {string} ascii string containing ascii code valid numbers separated by ','
460
+ * @returns {string} parsedString parsed string
461
461
  */
462
462
  asciiToString: function(ascii) {
463
463
  var asciiArray = ascii.split(",");
@@ -473,8 +473,8 @@ sap.ui.define([
473
473
  /**
474
474
  * Converts a string into ASCII coding. Required for restoring stored code extensions
475
475
  *
476
- * @param {String} string string which has to be encoded
477
- * @returns {String} ascii imput parsed to ascii numbers separated by ','
476
+ * @param {string} string string which has to be encoded
477
+ * @returns {string} ascii imput parsed to ascii numbers separated by ','
478
478
  */
479
479
  stringToAscii: function(string) {
480
480
  var ascii = "";
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @class Variant class.
34
34
  * @extends sap.ui.base.ManagedObject
35
35
  * @author SAP SE
36
- * @version 1.98.0
36
+ * @version 1.99.0
37
37
  * @alias sap.ui.fl.Variant
38
38
  * @experimental Since 1.52.0
39
39
  */
@@ -157,7 +157,7 @@ sap.ui.define([
157
157
  /**
158
158
  * Returns the title
159
159
  *
160
- * @returns {String} Title of the variant
160
+ * @returns {string} Title of the variant
161
161
  * @public
162
162
  */
163
163
  Variant.prototype.getTitle = function () {
@@ -169,7 +169,7 @@ sap.ui.define([
169
169
  /**
170
170
  * Returns the file type
171
171
  *
172
- * @returns {String} fileType of the variant
172
+ * @returns {string} fileType of the variant
173
173
  * @public
174
174
  */
175
175
  Variant.prototype.getFileType = function () {
@@ -202,7 +202,7 @@ sap.ui.define([
202
202
  * Returns the namespace. The variants' namespace is
203
203
  * also the namespace of the change file in the repository.
204
204
  *
205
- * @returns {String} Namespace of the variants document
205
+ * @returns {string} Namespace of the variants document
206
206
  *
207
207
  * @public
208
208
  */
@@ -382,7 +382,7 @@ sap.ui.define([
382
382
  /**
383
383
  * Gets the creation timestamp
384
384
  *
385
- * @returns {String} creation timestamp
385
+ * @returns {string} creation timestamp
386
386
  *
387
387
  * @public
388
388
  */
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  *
26
26
  * @private
27
27
  * @author SAP SE
28
- * @version 1.98.0
28
+ * @version 1.99.0
29
29
  *
30
30
  * @experimental Since 1.80 This class is experimental and provides only limited functionality. Also the API might be
31
31
  * changed in future.
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @alias sap.ui.fl.FlexCustomData
31
31
  * @experimental Since 1.61.0
32
32
  * @author SAP SE
33
- * @version 1.98.0
33
+ * @version 1.99.0
34
34
  */
35
35
  var FlexCustomData = {};
36
36
  FlexCustomData.sync = {};
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.connectors.changes.Utils
22
22
  * @since 1.70
23
- * @version 1.98.0
23
+ * @version 1.99.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal, sap.ui.fl.write._internal
26
26
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.Preprocessor
29
29
  * @experimental
30
30
  * @since 1.74
31
- * @version 1.98.0
31
+ * @version 1.99.0
32
32
  * @private
33
33
  * @ui5-restricted sap.ui.fl.apply._internal
34
34
  */
@@ -18,7 +18,7 @@ sap.ui.define([
18
18
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.Registration
19
19
  * @experimental
20
20
  * @since 1.74
21
- * @version 1.98.0
21
+ * @version 1.99.0
22
22
  * @private
23
23
  * @ui5-restricted sap.ui.fl.apply._internal
24
24
  */
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild
22
22
  * @experimental
23
23
  * @since 1.77
24
- * @version 1.98.0
24
+ * @version 1.99.0
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl.apply._internal
27
27
  */
@@ -139,7 +139,7 @@ sap.ui.define([
139
139
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.app.AddAnnotationsToOData
140
140
  * @experimental
141
141
  * @since 1.87
142
- * @version 1.98.0
142
+ * @version 1.99.0
143
143
  * @private
144
144
  * @ui5-restricted sap.ui.fl.apply._internal
145
145
  */
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  *
27
27
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.app.ChangeDataSouce
28
28
  * @experimental
29
- * @version 1.98.0
29
+ * @version 1.99.0
30
30
  * @private
31
31
  * @ui5-restricted sap.ui.fl.apply._internal
32
32
  */
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  *
26
26
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.app.ChangeInbound
27
27
  * @experimental
28
- * @version 1.98.0
28
+ * @version 1.99.0
29
29
  * @private
30
30
  * @ui5-restricted sap.ui.fl.apply._internal
31
31
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.app.SetTitle
22
22
  * @experimental
23
- * @version 1.98.0
23
+ * @version 1.99.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.fiori.SetAbstract
22
22
  * @experimental
23
- * @version 1.98.0
23
+ * @version 1.99.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.fiori.SetRegistrationIds
22
22
  * @experimental
23
- * @version 1.98.0
23
+ * @version 1.99.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  *
20
20
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ovp.AddNewCard
21
21
  * @experimental
22
- * @version 1.98.0
22
+ * @version 1.99.0
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 sap.ui.fl.apply._internal.changes.descriptor.ovp.ChangeCard
21
21
  * @experimental
22
- * @version 1.98.0
22
+ * @version 1.99.0
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 sap.ui.fl.apply._internal.changes.descriptor.ovp.DeleteCard
21
21
  * @experimental
22
- * @version 1.98.0
22
+ * @version 1.99.0
23
23
  * @private
24
24
  * @ui5-restricted sap.ui.fl.apply._internal
25
25
  */
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.AddComponentUsages
22
22
  * @experimental
23
23
  * @since 1.86
24
- * @version 1.98.0
24
+ * @version 1.99.0
25
25
  * @private
26
26
  * @ui5-restricted sap.ui.fl.apply._internal
27
27
  */
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.AddLibrary
50
50
  * @experimental
51
51
  * @since 1.74
52
- * @version 1.98.0
52
+ * @version 1.99.0
53
53
  * @private
54
54
  * @ui5-restricted sap.ui.fl.apply._internal
55
55
  */
@@ -97,7 +97,7 @@ sap.ui.define([
97
97
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModel
98
98
  * @experimental
99
99
  * @since 1.87
100
- * @version 1.98.0
100
+ * @version 1.99.0
101
101
  * @private
102
102
  * @ui5-restricted sap.ui.fl.apply._internal
103
103
  */
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  *
25
25
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith
26
26
  * @experimental
27
- * @version 1.98.0
27
+ * @version 1.99.0
28
28
  * @private
29
29
  * @ui5-restricted sap.ui.fl.apply._internal
30
30
  */
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  *
21
21
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.SetFlexExtensionPointEnabled
22
22
  * @experimental
23
- * @version 1.98.0
23
+ * @version 1.99.0
24
24
  * @private
25
25
  * @ui5-restricted sap.ui.fl.apply._internal
26
26
  */
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.SetMinUI5Version
24
24
  * @experimental
25
- * @version 1.98.0
25
+ * @version 1.99.0
26
26
  * @private
27
27
  * @ui5-restricted sap.ui.fl.apply._internal
28
28
  */