@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.
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +1 -1
- package/src/sap/ui/fl/Change.js +7 -7
- package/src/sap/ui/fl/ChangePersistence.js +15 -15
- package/src/sap/ui/fl/ChangePersistenceFactory.js +2 -2
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +17 -8
- package/src/sap/ui/fl/FlexControllerFactory.js +2 -2
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +13 -13
- package/src/sap/ui/fl/Variant.js +5 -5
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +7 -10
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -4
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +8 -17
- package/src/sap/ui/fl/{PreprocessorImpl.js → apply/_internal/preprocessors/ControllerExtension.js} +38 -47
- package/src/sap/ui/fl/{EventHistory.js → apply/_internal/preprocessors/EventHistory.js} +7 -7
- package/src/sap/ui/fl/{RegistrationDelegator.js → apply/_internal/preprocessors/RegistrationDelegator.js} +40 -42
- package/src/sap/ui/fl/{XmlPreprocessorImpl.js → apply/_internal/preprocessors/XmlPreprocessor.js} +6 -6
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +9 -9
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +10 -10
- package/src/sap/ui/fl/registry/Settings.js +44 -5
- package/src/sap/ui/fl/support/Flexibility.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +34 -0
- package/src/sap/ui/fl/support/api/SupportAPI.js +5 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +4 -4
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +4 -4
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +1 -1
- package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +5 -0
- package/src/sap/ui/fl/variants/VariantModel.js +28 -31
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +6 -2
- package/src/sap/ui/fl/write/_internal/Storage.js +15 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +33 -3
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -4
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +5 -5
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +125 -32
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +4 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/TranslationAPI.js +23 -2
- 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.
|
|
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.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
17
|
+
"@openui5/sap.m": "1.99.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.99.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/sap/ui/fl/.library
CHANGED
|
@@ -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.
|
|
9
|
+
<version>1.99.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/fl/Cache.js
CHANGED
package/src/sap/ui/fl/Change.js
CHANGED
|
@@ -293,7 +293,7 @@ sap.ui.define([
|
|
|
293
293
|
/**
|
|
294
294
|
* Returns the change type.
|
|
295
295
|
*
|
|
296
|
-
* @returns {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 (
|
|
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
|
|
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.
|
|
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 {
|
|
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) {
|
|
@@ -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.
|
|
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 {
|
|
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
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
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.
|
|
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 {
|
|
51
|
+
* @param {string} sComponentName - Name of the component
|
|
52
52
|
* @returns {sap.ui.fl.FlexController} instance
|
|
53
53
|
*
|
|
54
54
|
*/
|
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -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.
|
|
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 {
|
|
164
|
-
* @returns {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
398
|
-
* @returns {
|
|
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 {
|
|
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 {
|
|
460
|
-
* @returns {
|
|
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 {
|
|
477
|
-
* @returns {
|
|
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 = "";
|
package/src/sap/ui/fl/Variant.js
CHANGED
|
@@ -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.
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
385
|
+
* @returns {string} creation timestamp
|
|
386
386
|
*
|
|
387
387
|
* @public
|
|
388
388
|
*/
|
|
@@ -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.
|
|
142
|
+
* @version 1.99.0
|
|
143
143
|
* @private
|
|
144
144
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
145
145
|
*/
|