@openui5/sap.ui.fl 1.122.0 → 1.123.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/ChangePersistence.js +1 -1
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- 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 +1 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +90 -46
- package/src/sap/ui/fl/apply/_internal/DelegateMediatorNew.js +193 -0
- 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/AddNewInbound.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/RemoveAllInboundsExceptOne.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/ObjectStorageConnector.js +8 -4
- 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/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +7 -11
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +6 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +7 -6
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +39 -24
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +1 -1
- 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/changes/UIChangesState.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 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +0 -3
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +11 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +75 -7
- 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/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/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +12 -8
- 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 +43 -43
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- 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 +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantModel.js +18 -1
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +12 -9
- 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/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
- 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/delegates/ODataV2ReadDelegate.js +276 -0
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.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 +1 -1
- 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/UI2Personalization/UI2PersonalizationState.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/FieldExtensibility.js +37 -7
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +0 -1
- package/src/sap/ui/fl/write/api/VersionsAPI.js +33 -35
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +8 -4
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
19
19
|
*
|
|
20
20
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ovp.DeleteCard
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.123.0
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/base/util/merge",
|
|
8
9
|
"sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils",
|
|
9
|
-
"sap/ui/fl/initial/_internal/StorageUtils"
|
|
10
|
+
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
11
|
+
"sap/ui/fl/interfaces/BaseLoadConnector"
|
|
10
12
|
], function(
|
|
13
|
+
merge,
|
|
11
14
|
ObjectStorageUtils,
|
|
12
|
-
StorageUtils
|
|
15
|
+
StorageUtils,
|
|
16
|
+
BaseConnector
|
|
13
17
|
) {
|
|
14
18
|
"use strict";
|
|
15
19
|
|
|
@@ -33,7 +37,7 @@ sap.ui.define([
|
|
|
33
37
|
* @private
|
|
34
38
|
* @ui5-restricted sap.ui.fl.apply._internal.Storage, sap.ui.fl.write._internal.Storage, SAP Web IDE
|
|
35
39
|
*/
|
|
36
|
-
var ObjectStorageConnector = {
|
|
40
|
+
var ObjectStorageConnector = merge({}, BaseConnector, {
|
|
37
41
|
/**
|
|
38
42
|
* can be either window.sessionStorage or window.localStorage
|
|
39
43
|
*/
|
|
@@ -59,7 +63,7 @@ sap.ui.define([
|
|
|
59
63
|
return StorageUtils.filterAndSortResponses(mGroupedFlexObjects);
|
|
60
64
|
});
|
|
61
65
|
}
|
|
62
|
-
};
|
|
66
|
+
});
|
|
63
67
|
|
|
64
68
|
ObjectStorageConnector.storage = ObjectStorageConnector.oStorage;
|
|
65
69
|
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @extends sap.ui.fl.apply._internal.flexObjects.Variant
|
|
33
33
|
* @alias sap.ui.fl.apply._internal.flexObjects.CompVariant
|
|
34
34
|
* @since 1.103
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.123.0
|
|
36
36
|
* @private
|
|
37
37
|
* @ui5-restricted sap.ui.fl, sap.ui.comp
|
|
38
38
|
*/
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
21
21
|
* @alias sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange
|
|
22
22
|
* @since 1.105
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.123.0
|
|
24
24
|
* @private
|
|
25
25
|
* @ui5-restricted sap.ui.fl
|
|
26
26
|
*/
|
|
@@ -11,9 +11,9 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange",
|
|
12
12
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObject",
|
|
13
13
|
"sap/ui/fl/apply/_internal/flexObjects/FlVariant",
|
|
14
|
+
"sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor",
|
|
14
15
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
15
16
|
"sap/ui/fl/apply/_internal/flexObjects/UIChange",
|
|
16
|
-
"sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor",
|
|
17
17
|
"sap/ui/fl/registry/Settings",
|
|
18
18
|
"sap/ui/fl/Layer",
|
|
19
19
|
"sap/ui/fl/LayerUtils",
|
|
@@ -26,9 +26,9 @@ sap.ui.define([
|
|
|
26
26
|
ControllerExtensionChange,
|
|
27
27
|
FlexObject,
|
|
28
28
|
FlVariant,
|
|
29
|
+
getVariantAuthor,
|
|
29
30
|
States,
|
|
30
31
|
UIChange,
|
|
31
|
-
getVariantAuthor,
|
|
32
32
|
Settings,
|
|
33
33
|
Layer,
|
|
34
34
|
LayerUtils,
|
|
@@ -97,7 +97,7 @@ sap.ui.define([
|
|
|
97
97
|
*
|
|
98
98
|
* @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
|
|
99
99
|
* @since 1.100
|
|
100
|
-
* @version 1.
|
|
100
|
+
* @version 1.123.0
|
|
101
101
|
* @private
|
|
102
102
|
* @ui5-restricted sap.ui.fl
|
|
103
103
|
*/
|
|
@@ -208,10 +208,8 @@ sap.ui.define([
|
|
|
208
208
|
type: "XFLD"
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
oFlVariant.setAuthor(getVariantAuthor(oFlVariant, mPropertyBag.authors));
|
|
214
|
-
return oFlVariant;
|
|
211
|
+
mProperties.author = getVariantAuthor(mProperties.supportInformation.user, mProperties.layer, mPropertyBag.authors);
|
|
212
|
+
return new FlVariant(mProperties);
|
|
215
213
|
};
|
|
216
214
|
|
|
217
215
|
/**
|
|
@@ -268,10 +266,8 @@ sap.ui.define([
|
|
|
268
266
|
mCompVariantContent.content.executeOnSelection
|
|
269
267
|
);
|
|
270
268
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
oCompVariant.setAuthor(getVariantAuthor(oCompVariant, mAuthors));
|
|
274
|
-
return oCompVariant;
|
|
269
|
+
mCompVariantContent.author = getVariantAuthor(mCompVariantContent.supportInformation.user, mCompVariantContent.layer, mAuthors);
|
|
270
|
+
return new CompVariant(mCompVariantContent);
|
|
275
271
|
};
|
|
276
272
|
|
|
277
273
|
return FlexObjectFactory;
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
+
"sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor",
|
|
7
8
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObject"
|
|
8
9
|
], function(
|
|
10
|
+
getVariantAuthor,
|
|
9
11
|
FlexObject
|
|
10
12
|
) {
|
|
11
13
|
"use strict";
|
|
@@ -17,7 +19,7 @@ sap.ui.define([
|
|
|
17
19
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
18
20
|
* @alias sap.ui.fl.apply._internal.flexObjects.Variant
|
|
19
21
|
* @since 1.103
|
|
20
|
-
* @version 1.
|
|
22
|
+
* @version 1.123.0
|
|
21
23
|
* @private
|
|
22
24
|
* @ui5-restricted sap.ui.fl
|
|
23
25
|
*/
|
|
@@ -80,7 +82,9 @@ sap.ui.define([
|
|
|
80
82
|
if (!this.getVariantId()) {
|
|
81
83
|
this.setVariantId(this.getId());
|
|
82
84
|
}
|
|
83
|
-
|
|
85
|
+
if (!this.getAuthor()) {
|
|
86
|
+
this.setAuthor(getVariantAuthor(this.getSupportInformation().user, this.getLayer(), {}));
|
|
87
|
+
}
|
|
84
88
|
}
|
|
85
89
|
});
|
|
86
90
|
|
|
@@ -21,24 +21,25 @@ sap.ui.define([
|
|
|
21
21
|
*
|
|
22
22
|
* @function
|
|
23
23
|
* @since 1.121
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.123.0
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.fl
|
|
27
27
|
* @alias module:sap/ui/fl/apply/_internal/flexState/compVariants/getVariantAuthor
|
|
28
28
|
*
|
|
29
|
-
* @param {
|
|
29
|
+
* @param {string} sUserId - UserId of variant author
|
|
30
|
+
* @param {sap.ui.fl.Layer} sLayer - Layer in which the variant should be stored
|
|
30
31
|
* @param {object} mMapIdsNames - Map of user IDs and users' names
|
|
31
32
|
* @returns {string} The resolved author of variant
|
|
32
33
|
*/
|
|
33
|
-
return (
|
|
34
|
-
const sAuthor =
|
|
34
|
+
return (sUserId, sLayer, mMapIdsNames) => {
|
|
35
|
+
const sAuthor = sUserId || "";
|
|
35
36
|
const oSettings = Settings.getInstanceOrUndef();
|
|
36
37
|
|
|
37
|
-
if (
|
|
38
|
+
if (sLayer === Layer.USER || sAuthor === oSettings?.getUserId()) {
|
|
38
39
|
return Lib.getResourceBundleFor("sap.ui.fl").getText("VARIANT_SELF_OWNER_NAME");
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
if (![Layer.PUBLIC, Layer.CUSTOMER].includes(
|
|
42
|
+
if (![Layer.PUBLIC, Layer.CUSTOMER].includes(sLayer)) {
|
|
42
43
|
return sAuthor;
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -77,7 +77,8 @@ sap.ui.define([
|
|
|
77
77
|
* runtimeOnlyData: {
|
|
78
78
|
* liveDependencyMap: {...}
|
|
79
79
|
* }
|
|
80
|
-
* }
|
|
80
|
+
* },
|
|
81
|
+
* maxLayer: <string>,
|
|
81
82
|
* emptyState: <boolean>,
|
|
82
83
|
* partialFlexState: <boolean>,
|
|
83
84
|
* componentId: "<componentId>",
|
|
@@ -86,7 +87,7 @@ sap.ui.define([
|
|
|
86
87
|
*
|
|
87
88
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexState
|
|
88
89
|
* @since 1.73
|
|
89
|
-
* @version 1.
|
|
90
|
+
* @version 1.123.0
|
|
90
91
|
* @private
|
|
91
92
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
92
93
|
*/
|
|
@@ -162,6 +163,10 @@ sap.ui.define([
|
|
|
162
163
|
mPropertyBag.componentData ||= (oComponent && oComponent.getComponentData()) || {};
|
|
163
164
|
mPropertyBag.manifest ||= mPropertyBag.rawManifest || (oComponent && oComponent.getManifestObject()) || {};
|
|
164
165
|
mPropertyBag.reference ||= ManifestUtils.getFlexReference(mPropertyBag);
|
|
166
|
+
const oFlexInfoSession = FlexInfoSession.getByReference(mPropertyBag.reference);
|
|
167
|
+
mPropertyBag.version ||= oFlexInfoSession.version;
|
|
168
|
+
mPropertyBag.adaptationId ||= oFlexInfoSession.displayedAdaptationId;
|
|
169
|
+
mPropertyBag.allContextsProvided ||= oFlexInfoSession.allContextsProvided;
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
function createFlexObjects(oStorageResponse) {
|
|
@@ -316,6 +321,7 @@ sap.ui.define([
|
|
|
316
321
|
}
|
|
317
322
|
if (!_mInstances[sReference].storageResponse) {
|
|
318
323
|
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mInstances[sReference].unfilteredStorageResponse);
|
|
324
|
+
_mInstances[sReference].maxLayer = FlexInfoSession.getByReference(sReference).maxLayer;
|
|
319
325
|
// Flex objects need to be recreated
|
|
320
326
|
delete _mInstances[sReference].runtimePersistence;
|
|
321
327
|
bDataUpdated = true;
|
|
@@ -358,14 +364,18 @@ sap.ui.define([
|
|
|
358
364
|
function loadFlexData(mPropertyBag) {
|
|
359
365
|
_mInitPromises[mPropertyBag.reference] = Loader.loadFlexData(mPropertyBag)
|
|
360
366
|
.then(async (mResponse) => {
|
|
361
|
-
|
|
367
|
+
if (!mPropertyBag.partialFlexState) {
|
|
368
|
+
mResponse.authors = await Loader.loadVariantsAuthors(mPropertyBag.reference);
|
|
369
|
+
}
|
|
362
370
|
// The following line is used by the Flex Support Tool to set breakpoints - please adjust the tool if you change it!
|
|
363
371
|
_mInstances[mPropertyBag.reference] = merge({}, {
|
|
364
372
|
unfilteredStorageResponse: mResponse,
|
|
365
373
|
preparedMaps: {},
|
|
366
374
|
componentId: mPropertyBag.componentId,
|
|
367
375
|
componentData: mPropertyBag.componentData,
|
|
368
|
-
partialFlexState: mPropertyBag.partialFlexState
|
|
376
|
+
partialFlexState: mPropertyBag.partialFlexState,
|
|
377
|
+
version: mPropertyBag.version,
|
|
378
|
+
allContextsProvided: mPropertyBag.allContextsProvided
|
|
369
379
|
});
|
|
370
380
|
|
|
371
381
|
storeInfoInSession(mPropertyBag.reference, mResponse);
|
|
@@ -405,6 +415,18 @@ sap.ui.define([
|
|
|
405
415
|
}
|
|
406
416
|
}
|
|
407
417
|
|
|
418
|
+
function checkVersionAndAllContexts(mInitProperties) {
|
|
419
|
+
var sFlexInstanceVersion = _mInstances[mInitProperties.reference].version;
|
|
420
|
+
if (!mInitProperties.reInitialize && sFlexInstanceVersion !== mInitProperties.version) {
|
|
421
|
+
mInitProperties.reInitialize = true;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
const bFlexInstanceAllContexts = _mInstances[mInitProperties.reference].allContextsProvided;
|
|
425
|
+
if (!mInitProperties.reInitialize && bFlexInstanceAllContexts !== mInitProperties.allContextsProvided) {
|
|
426
|
+
mInitProperties.reInitialize = true;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
408
430
|
// TODO: get rid of the following module dependencies as soon as the change state
|
|
409
431
|
// is migrated from changePersistenceFactory to the FlexState
|
|
410
432
|
function lazyLoadModules() {
|
|
@@ -416,6 +438,12 @@ sap.ui.define([
|
|
|
416
438
|
});
|
|
417
439
|
}
|
|
418
440
|
|
|
441
|
+
function rebuildResponseIfMaxLayerChanged(sReference) {
|
|
442
|
+
if (_mInstances[sReference]?.maxLayer !== FlexInfoSession.getByReference(sReference).maxLayer) {
|
|
443
|
+
FlexState.rebuildFilteredResponse(sReference);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
419
447
|
function initializeEmptyState(sReference) {
|
|
420
448
|
_mInstances[sReference] = {
|
|
421
449
|
unfilteredStorageResponse: { changes: StorageUtils.getEmptyFlexDataResponse() },
|
|
@@ -463,8 +491,11 @@ sap.ui.define([
|
|
|
463
491
|
await _mInitPromises[sFlexReference];
|
|
464
492
|
checkPartialFlexState(mProperties);
|
|
465
493
|
checkComponentId(mProperties);
|
|
494
|
+
checkVersionAndAllContexts(mProperties);
|
|
466
495
|
if (mProperties.reInitialize) {
|
|
467
496
|
await loadFlexData(mProperties);
|
|
497
|
+
} else {
|
|
498
|
+
rebuildResponseIfMaxLayerChanged(mPropertyBag.reference);
|
|
468
499
|
}
|
|
469
500
|
} else {
|
|
470
501
|
await loadFlexData(mProperties);
|
|
@@ -486,24 +517,6 @@ sap.ui.define([
|
|
|
486
517
|
return !!_mInstances[sReference];
|
|
487
518
|
};
|
|
488
519
|
|
|
489
|
-
/**
|
|
490
|
-
* Clears the cache and then triggers a call to the backend to fetch new data
|
|
491
|
-
*
|
|
492
|
-
* @param {object} mPropertyBag - Contains additional data needed for reading and storing changes
|
|
493
|
-
* @param {string} mPropertyBag.componentId - ID of the component
|
|
494
|
-
* @param {string} [mPropertyBag.reference] - Flex reference of the app
|
|
495
|
-
* @param {object} [mPropertyBag.manifest] - Manifest that belongs to actual component
|
|
496
|
-
* @param {string} [mPropertyBag.componentData] - Component data of the current component
|
|
497
|
-
* @param {string} [mPropertyBag.version] - Number of the version in which the state should be initialized
|
|
498
|
-
* @param {string} [mPropertyBag.adaptationId] - Context-based adaptation for which the state should be initialized
|
|
499
|
-
* @returns {Promise<undefined>} Resolves a promise as soon as FlexState is initialized again
|
|
500
|
-
*/
|
|
501
|
-
FlexState.clearAndInitialize = function(mPropertyBag) {
|
|
502
|
-
enhancePropertyBag(mPropertyBag);
|
|
503
|
-
FlexState.clearState(mPropertyBag.reference);
|
|
504
|
-
return FlexState.initialize(mPropertyBag);
|
|
505
|
-
};
|
|
506
|
-
|
|
507
520
|
/**
|
|
508
521
|
* Triggers a call to the backend to fetch new data and update the runtime persistence
|
|
509
522
|
*
|
|
@@ -533,6 +546,7 @@ sap.ui.define([
|
|
|
533
546
|
await _mInitPromises[sReference];
|
|
534
547
|
await loadFlexData(mPropertyBag);
|
|
535
548
|
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mInstances[sReference].unfilteredStorageResponse);
|
|
549
|
+
_mInstances[sReference].maxLayer = FlexInfoSession.getByReference(sReference).maxLayer;
|
|
536
550
|
var bUpdated = updateRuntimePersistence(
|
|
537
551
|
sReference,
|
|
538
552
|
_mInstances[sReference].storageResponse,
|
|
@@ -706,6 +720,7 @@ sap.ui.define([
|
|
|
706
720
|
if (_mInstances[sReference]) {
|
|
707
721
|
_mInstances[sReference].preparedMaps = {};
|
|
708
722
|
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mInstances[sReference].unfilteredStorageResponse);
|
|
723
|
+
_mInstances[sReference].maxLayer = FlexInfoSession.getByReference(sReference).maxLayer;
|
|
709
724
|
// Storage response has changed, recreate the flex objects
|
|
710
725
|
_mInstances[sReference].runtimePersistence = buildRuntimePersistence(
|
|
711
726
|
_mInstances[sReference],
|
|
@@ -725,7 +740,7 @@ sap.ui.define([
|
|
|
725
740
|
if (!_mInstances[sReference]) {
|
|
726
741
|
initializeEmptyState(sReference);
|
|
727
742
|
}
|
|
728
|
-
const sAdaptationLayer = FlexInfoSession.getByReference(sReference)
|
|
743
|
+
const sAdaptationLayer = FlexInfoSession.getByReference(sReference).adaptationLayer;
|
|
729
744
|
const bFlexObjectsOverAdaptationLayer = !!sAdaptationLayer
|
|
730
745
|
&& LayerUtils.isOverLayer(oFlexObject.getLayer(), sAdaptationLayer);
|
|
731
746
|
// FIXME: Currently called from the ChangePersistence which might be
|
|
@@ -751,7 +766,7 @@ sap.ui.define([
|
|
|
751
766
|
if (!_mInstances[sReference]) {
|
|
752
767
|
initializeEmptyState(sReference);
|
|
753
768
|
}
|
|
754
|
-
const sAdaptationLayer = FlexInfoSession.getByReference(sReference)
|
|
769
|
+
const sAdaptationLayer = FlexInfoSession.getByReference(sReference).adaptationLayer;
|
|
755
770
|
aFlexObjects = !sAdaptationLayer ? aFlexObjects : aFlexObjects
|
|
756
771
|
.filter((oFlexObject) => !LayerUtils.isOverLayer(oFlexObject.getLayer(), sAdaptationLayer));
|
|
757
772
|
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
// Exchange author of fl variant from userID to user's name
|
|
35
35
|
mPropertyBag.flexObjects.forEach((oFlexObject) => {
|
|
36
36
|
if (oFlexObject.getFileType() === "ctrl_variant") {
|
|
37
|
-
oFlexObject.setAuthor(getVariantAuthor(oFlexObject, mPropertyBag.storageResponse.authors));
|
|
37
|
+
oFlexObject.setAuthor(getVariantAuthor(oFlexObject.getSupportInformation().user, oFlexObject.getLayer(), mPropertyBag.storageResponse.authors));
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
const aVariantIds = (mPropertyBag.storageResponse.changes.variants || [])
|
|
@@ -123,7 +123,7 @@ sap.ui.define([
|
|
|
123
123
|
*
|
|
124
124
|
* @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
|
|
125
125
|
* @since 1.86
|
|
126
|
-
* @version 1.
|
|
126
|
+
* @version 1.123.0
|
|
127
127
|
* @private
|
|
128
128
|
* @ui5-restricted sap.ui.fl
|
|
129
129
|
*/
|
|
@@ -208,7 +208,7 @@ sap.ui.define([
|
|
|
208
208
|
*
|
|
209
209
|
* @function
|
|
210
210
|
* @since 1.89
|
|
211
|
-
* @version 1.
|
|
211
|
+
* @version 1.123.0
|
|
212
212
|
* @private
|
|
213
213
|
* @ui5-restricted sap.ui.fl
|
|
214
214
|
*
|
|
@@ -143,9 +143,6 @@ sap.ui.define([
|
|
|
143
143
|
// The variant model is fetched from the outer app component and applied on this component type.
|
|
144
144
|
if (Utils.isApplicationComponent(oComponent)) {
|
|
145
145
|
var sComponentId = oComponent.getId();
|
|
146
|
-
// TODO: remove this line when the maps and filtered response are always up to data
|
|
147
|
-
// Currently with the variants the maps are out of sync when the app gets loaded again without complete reload
|
|
148
|
-
FlexState.rebuildFilteredResponse(ManifestUtils.getFlexReferenceForControl(oComponent));
|
|
149
146
|
var oReturnPromise = FlexState.initialize({
|
|
150
147
|
componentId: sComponentId,
|
|
151
148
|
asyncHints: vConfig.asyncHints
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @class
|
|
43
43
|
* @constructor
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.123.0
|
|
46
46
|
* @since 1.43.0
|
|
47
47
|
* @private
|
|
48
48
|
*/
|
|
@@ -95,6 +95,16 @@ sap.ui.define([
|
|
|
95
95
|
delegate: "sap/ui/fl/write/_internal/delegates/ODataV4ReadDelegate",
|
|
96
96
|
delegateType: DelegateMediator.types.READONLY
|
|
97
97
|
});
|
|
98
|
+
DelegateMediatorAPI.registerReadDelegate({
|
|
99
|
+
modelType: "sap.ui.model.odata.v2.ODataModel",
|
|
100
|
+
delegate: "sap/ui/fl/write/_internal/delegates/ODataV2ReadDelegate",
|
|
101
|
+
delegateType: DelegateMediator.types.READONLY
|
|
102
|
+
});
|
|
103
|
+
DelegateMediatorAPI.registerReadDelegate({
|
|
104
|
+
modelType: "sap.ui.model.odata.ODataModel",
|
|
105
|
+
delegate: "sap/ui/fl/write/_internal/delegates/ODataV2ReadDelegate",
|
|
106
|
+
delegateType: DelegateMediator.types.READONLY
|
|
107
|
+
});
|
|
98
108
|
}
|
|
99
109
|
|
|
100
110
|
/**
|