@openui5/sap.ui.fl 1.127.0 → 1.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +37 -47
- 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 +11 -9
- 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 +17 -12
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +3 -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 +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +3 -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/AddTechnicalAttributes.js +75 -0
- 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/ChangeOutbound.js +76 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +44 -0
- 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/SetCloudDevAdaptationStatus.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 +56 -9
- 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/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +66 -0
- 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 +12 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +41 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +39 -39
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +3 -0
- 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 +9 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.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/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.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 +13 -4
- 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/Utils.js +19 -0
- 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/StorageResultMerger.js +1 -0
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -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/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 +9 -59
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +53 -0
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +56 -5
- 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/changePropertyValueByPath.js +13 -2
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +23 -14
- package/src/sap/ui/fl/variants/VariantModel.js +7 -6
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +12 -12
- package/src/sap/ui/fl/write/_internal/SaveAs.js +11 -12
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +8 -68
- 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 +65 -16
- 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/SessionStorageConnector.js +1 -0
- 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/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 → FlexObjectManager.js} +26 -56
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +9 -6
- 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/ContextBasedAdaptationsAPI.js +6 -6
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +4 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +3 -4
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +8 -8
- package/src/sap/ui/fl/write/api/TranslationAPI.js +6 -6
- package/src/sap/ui/fl/write/api/VersionsAPI.js +34 -9
|
@@ -10,9 +10,11 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
11
11
|
"sap/ui/core/Element",
|
|
12
12
|
"sap/ui/fl/apply/_internal/changes/Utils",
|
|
13
|
+
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
13
14
|
"sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
|
|
14
15
|
"sap/ui/fl/apply/_internal/flexState/changes/UIChangesState",
|
|
15
16
|
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
17
|
+
"sap/ui/fl/apply/_internal/flexState/DataSelector",
|
|
16
18
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
17
19
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
18
20
|
"sap/ui/fl/Utils"
|
|
@@ -22,9 +24,11 @@ sap.ui.define([
|
|
|
22
24
|
JsControlTreeModifier,
|
|
23
25
|
Element,
|
|
24
26
|
ChangesUtils,
|
|
27
|
+
States,
|
|
25
28
|
DependencyHandler,
|
|
26
29
|
UIChangesState,
|
|
27
30
|
VariantManagementState,
|
|
31
|
+
DataSelector,
|
|
28
32
|
FlexState,
|
|
29
33
|
ManifestUtils,
|
|
30
34
|
Utils
|
|
@@ -35,12 +39,23 @@ sap.ui.define([
|
|
|
35
39
|
* @namespace
|
|
36
40
|
* @alias sap.ui.fl.apply._internal.flexState.FlexObjectState
|
|
37
41
|
* @since 1.83
|
|
38
|
-
* @version 1.
|
|
42
|
+
* @version 1.128.0
|
|
39
43
|
* @private
|
|
40
44
|
* @ui5-restricted sap.ui.fl
|
|
41
45
|
*/
|
|
42
46
|
const FlexObjectState = {};
|
|
43
47
|
|
|
48
|
+
// TODO: Think about a second DataSelector in the FlexState without any runtime FlexObjects
|
|
49
|
+
const oAllDirtyFlexObjectsDataSelector = new DataSelector({
|
|
50
|
+
id: "allDirtyFlexObjects",
|
|
51
|
+
parentDataSelector: FlexState.getFlexObjectsDataSelector(),
|
|
52
|
+
executeFunction(aFlexObjects) {
|
|
53
|
+
return aFlexObjects.filter((oFlexObject) => {
|
|
54
|
+
return oFlexObject.getState() !== States.LifecycleState.PERSISTED;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
44
59
|
function getCompleteDependency(oChange, sReference) {
|
|
45
60
|
const mInitialDependencies = FlexObjectState.getCompleteDependencyMap(sReference).mDependencies;
|
|
46
61
|
return mInitialDependencies[oChange.getId()] && Object.assign({}, mInitialDependencies[oChange.getId()]);
|
|
@@ -245,5 +260,30 @@ sap.ui.define([
|
|
|
245
260
|
}));
|
|
246
261
|
};
|
|
247
262
|
|
|
263
|
+
function getCompVariantEntities(sReference) {
|
|
264
|
+
const aEntities = [];
|
|
265
|
+
const mCompEntities = FlexState.getCompVariantsMap(sReference);
|
|
266
|
+
for (const sPersistencyKey in mCompEntities) {
|
|
267
|
+
const mCompVariantsOfPersistencyKey = mCompEntities[sPersistencyKey];
|
|
268
|
+
for (const sId in mCompVariantsOfPersistencyKey.byId) {
|
|
269
|
+
aEntities.push(mCompVariantsOfPersistencyKey.byId[sId]);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return aEntities;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Collects modified changes from the different states within the <code>sap.ui.fl</code> library.
|
|
277
|
+
* TODO: remove special CompVariant handling
|
|
278
|
+
*
|
|
279
|
+
* @param {object} sReference - Flex Reference
|
|
280
|
+
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} All dirty Flex objects
|
|
281
|
+
*/
|
|
282
|
+
FlexObjectState.getDirtyFlexObjects = function(sReference) {
|
|
283
|
+
const aCompVariantEntities = getCompVariantEntities(sReference);
|
|
284
|
+
return oAllDirtyFlexObjectsDataSelector.get({reference: sReference})
|
|
285
|
+
.concat(aCompVariantEntities.filter((oFlexObject) => oFlexObject.getState() !== States.LifecycleState.PERSISTED));
|
|
286
|
+
};
|
|
287
|
+
|
|
248
288
|
return FlexObjectState;
|
|
249
289
|
});
|
|
@@ -21,8 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
22
22
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
23
23
|
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
24
|
-
"sap/ui/fl/LayerUtils"
|
|
25
|
-
"sap/ui/fl/requireAsync"
|
|
24
|
+
"sap/ui/fl/LayerUtils"
|
|
26
25
|
], function(
|
|
27
26
|
_omit,
|
|
28
27
|
Deferred,
|
|
@@ -40,12 +39,12 @@ sap.ui.define([
|
|
|
40
39
|
ManifestUtils,
|
|
41
40
|
FlexInfoSession,
|
|
42
41
|
StorageUtils,
|
|
43
|
-
LayerUtils
|
|
44
|
-
requireAsync
|
|
42
|
+
LayerUtils
|
|
45
43
|
) {
|
|
46
44
|
"use strict";
|
|
47
45
|
|
|
48
46
|
const sAppDescriptorNamespace = "sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange";
|
|
47
|
+
const sAnnotationNamespace = "sap.ui.fl.apply._internal.flexObjects.AnnotationChange";
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
50
|
* Flex state class to persist maps and raw state (cache) for a given component reference.
|
|
@@ -57,6 +56,8 @@ sap.ui.define([
|
|
|
57
56
|
* },
|
|
58
57
|
* storageResponse: {
|
|
59
58
|
* changes: {
|
|
59
|
+
* annotationChanges: [...],
|
|
60
|
+
* appDescriptorChanges: [...],
|
|
60
61
|
* changes: [...],
|
|
61
62
|
* comp: {
|
|
62
63
|
* variants: [...],
|
|
@@ -88,7 +89,7 @@ sap.ui.define([
|
|
|
88
89
|
*
|
|
89
90
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexState
|
|
90
91
|
* @since 1.73
|
|
91
|
-
* @version 1.
|
|
92
|
+
* @version 1.128.0
|
|
92
93
|
* @private
|
|
93
94
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
94
95
|
*/
|
|
@@ -96,11 +97,13 @@ sap.ui.define([
|
|
|
96
97
|
|
|
97
98
|
var _mInstances = {};
|
|
98
99
|
var _mInitPromises = {};
|
|
99
|
-
var _oChangePersistenceFactory;
|
|
100
100
|
var _mFlexObjectInfo = {
|
|
101
101
|
appDescriptorChanges: {
|
|
102
102
|
pathInResponse: []
|
|
103
103
|
},
|
|
104
|
+
annotationChanges: {
|
|
105
|
+
pathInResponse: []
|
|
106
|
+
},
|
|
104
107
|
changes: {
|
|
105
108
|
initialPreparationFunctionName: "uiChanges",
|
|
106
109
|
pathInResponse: ["changes"]
|
|
@@ -225,6 +228,20 @@ sap.ui.define([
|
|
|
225
228
|
}
|
|
226
229
|
});
|
|
227
230
|
|
|
231
|
+
const oAnnotationChangesDataSelector = new DataSelector({
|
|
232
|
+
id: "annotationChanges",
|
|
233
|
+
parentDataSelector: oFlexObjectsDataSelector,
|
|
234
|
+
executeFunction(aFlexObjects) {
|
|
235
|
+
return aFlexObjects.filter((oFlexObject) => {
|
|
236
|
+
return oFlexObject.isA(sAnnotationNamespace);
|
|
237
|
+
});
|
|
238
|
+
},
|
|
239
|
+
checkInvalidation(mParameters, oUpdateInfo) {
|
|
240
|
+
const bRelevantType = ["addFlexObject", "removeFlexObject"].includes(oUpdateInfo.type);
|
|
241
|
+
return bRelevantType && oUpdateInfo.updatedObject?.isA(sAnnotationNamespace);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
228
245
|
function getInstanceEntryOrThrowError(sReference, sMapName) {
|
|
229
246
|
if (!_mInstances[sReference]) {
|
|
230
247
|
initializeEmptyState(sReference);
|
|
@@ -433,17 +450,6 @@ sap.ui.define([
|
|
|
433
450
|
}
|
|
434
451
|
}
|
|
435
452
|
|
|
436
|
-
// TODO: get rid of the following module dependencies as soon as the change state
|
|
437
|
-
// is migrated from changePersistenceFactory to the FlexState
|
|
438
|
-
function lazyLoadModules() {
|
|
439
|
-
return requireAsync("sap/ui/fl/ChangePersistenceFactory").then(function(oModule) {
|
|
440
|
-
_oChangePersistenceFactory = oModule;
|
|
441
|
-
})
|
|
442
|
-
.catch(function(oError) {
|
|
443
|
-
Log.error(`Error loading modules: ${oError.message}`);
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
|
|
447
453
|
function rebuildResponseIfMaxLayerChanged(sReference) {
|
|
448
454
|
if (_mInstances[sReference]?.maxLayer !== FlexInfoSession.getByReference(sReference).maxLayer) {
|
|
449
455
|
FlexState.rebuildFilteredResponse(sReference);
|
|
@@ -495,10 +501,8 @@ sap.ui.define([
|
|
|
495
501
|
const sFlexReference = mProperties.reference;
|
|
496
502
|
|
|
497
503
|
const oOldInitPromise = _mInitPromises[sFlexReference];
|
|
498
|
-
// TODO: Switch to native promises once lazyLoadModules is removed, todos#2
|
|
499
504
|
const oNewInitPromise = new Deferred();
|
|
500
505
|
_mInitPromises[sFlexReference] = oNewInitPromise;
|
|
501
|
-
await lazyLoadModules();
|
|
502
506
|
|
|
503
507
|
if (oOldInitPromise) {
|
|
504
508
|
await oOldInitPromise.promise;
|
|
@@ -565,15 +569,6 @@ sap.ui.define([
|
|
|
565
569
|
var sReference = mPropertyBag.reference;
|
|
566
570
|
var oCurrentRuntimePersistence = _mInstances[sReference].runtimePersistence;
|
|
567
571
|
|
|
568
|
-
// TODO: get rid of the following persistence operations as soon as the change state
|
|
569
|
-
// is migrated from ChangePersistenceFactory to the FlexState
|
|
570
|
-
if (
|
|
571
|
-
_oChangePersistenceFactory
|
|
572
|
-
&& (_oChangePersistenceFactory._instanceCache || {}).hasOwnProperty(sReference)
|
|
573
|
-
) {
|
|
574
|
-
_oChangePersistenceFactory._instanceCache[sReference].removeDirtyChanges();
|
|
575
|
-
}
|
|
576
|
-
|
|
577
572
|
const oOldInitPromise = _mInitPromises[sReference].promise;
|
|
578
573
|
const oNewInitPromise = new Deferred();
|
|
579
574
|
_mInitPromises[sReference] = oNewInitPromise;
|
|
@@ -610,6 +605,8 @@ sap.ui.define([
|
|
|
610
605
|
return "variantManagementChanges";
|
|
611
606
|
case "variant":
|
|
612
607
|
return ["comp", "variants"];
|
|
608
|
+
case "annotation_change":
|
|
609
|
+
return "annotationChanges";
|
|
613
610
|
default:
|
|
614
611
|
return "";
|
|
615
612
|
}
|
|
@@ -675,14 +672,6 @@ sap.ui.define([
|
|
|
675
672
|
|
|
676
673
|
FlexState.clearState = function(sReference) {
|
|
677
674
|
if (sReference) {
|
|
678
|
-
// TODO: get rid of the following deletes as soon as the change state
|
|
679
|
-
// is migrated from changePersistenceFactory to the FlexState
|
|
680
|
-
if (
|
|
681
|
-
_oChangePersistenceFactory
|
|
682
|
-
&& (_oChangePersistenceFactory._instanceCache || {}).hasOwnProperty(sReference)
|
|
683
|
-
) {
|
|
684
|
-
_oChangePersistenceFactory._instanceCache[sReference].removeDirtyChanges();
|
|
685
|
-
}
|
|
686
675
|
delete _mInstances[sReference];
|
|
687
676
|
delete _mInitPromises[sReference];
|
|
688
677
|
oFlexObjectsDataSelector.clearCachedResult({ reference: sReference });
|
|
@@ -721,6 +710,8 @@ sap.ui.define([
|
|
|
721
710
|
* @param {object} oFlexObject - Flex object to be added as runtime-steady
|
|
722
711
|
*/
|
|
723
712
|
FlexState.addRuntimeSteadyObject = function(sReference, sComponentId, oFlexObject) {
|
|
713
|
+
// with setting the state to persisted it is made sure that they not show up as a dirty flex object
|
|
714
|
+
oFlexObject.setState(States.LifecycleState.PERSISTED);
|
|
724
715
|
_mExternalData.flexObjects[sReference] ||= {};
|
|
725
716
|
_mExternalData.flexObjects[sReference][sComponentId] ||= [];
|
|
726
717
|
_mExternalData.flexObjects[sReference][sComponentId].push(oFlexObject);
|
|
@@ -778,11 +769,12 @@ sap.ui.define([
|
|
|
778
769
|
const sAdaptationLayer = FlexInfoSession.getByReference(sReference).adaptationLayer;
|
|
779
770
|
const bFlexObjectsOverAdaptationLayer = !!sAdaptationLayer
|
|
780
771
|
&& LayerUtils.isOverLayer(oFlexObject.getLayer(), sAdaptationLayer);
|
|
772
|
+
const bAlreadyInRuntimePersistence = _mInstances[sReference].runtimePersistence.flexObjects.includes(oFlexObject);
|
|
781
773
|
// FIXME: Currently called from the ChangePersistence which might be
|
|
782
774
|
// independent of FlexState in some test cases
|
|
783
775
|
// Once the ChangePersistence is no longer used
|
|
784
776
|
// make sure to remove the safeguard
|
|
785
|
-
if (!bFlexObjectsOverAdaptationLayer && _mInstances[sReference]) {
|
|
777
|
+
if (!bFlexObjectsOverAdaptationLayer && _mInstances[sReference] && !bAlreadyInRuntimePersistence) {
|
|
786
778
|
_mInstances[sReference].runtimePersistence.flexObjects.push(oFlexObject);
|
|
787
779
|
oFlexObjectsDataSelector.checkUpdate(
|
|
788
780
|
{ reference: sReference },
|
|
@@ -802,8 +794,12 @@ sap.ui.define([
|
|
|
802
794
|
initializeEmptyState(sReference);
|
|
803
795
|
}
|
|
804
796
|
const sAdaptationLayer = FlexInfoSession.getByReference(sReference).adaptationLayer;
|
|
805
|
-
aFlexObjects =
|
|
806
|
-
.filter((oFlexObject) => !LayerUtils.isOverLayer(oFlexObject.getLayer(), sAdaptationLayer))
|
|
797
|
+
aFlexObjects = aFlexObjects
|
|
798
|
+
.filter((oFlexObject) => !sAdaptationLayer || !LayerUtils.isOverLayer(oFlexObject.getLayer(), sAdaptationLayer))
|
|
799
|
+
.filter((oFlexObject) => (
|
|
800
|
+
!_mInstances[sReference].runtimePersistence.flexObjects
|
|
801
|
+
.some((oExistingFlexObject) => (oExistingFlexObject.getId() === oFlexObject.getId()))
|
|
802
|
+
));
|
|
807
803
|
|
|
808
804
|
if (aFlexObjects.length > 0 && _mInstances[sReference]) {
|
|
809
805
|
_mInstances[sReference].runtimePersistence.flexObjects =
|
|
@@ -873,6 +869,10 @@ sap.ui.define([
|
|
|
873
869
|
return oAppDescriptorChangesDataSelector.get({ reference: sReference });
|
|
874
870
|
};
|
|
875
871
|
|
|
872
|
+
FlexState.getAnnotationChanges = function(sReference) {
|
|
873
|
+
return oAnnotationChangesDataSelector.get({ reference: sReference });
|
|
874
|
+
};
|
|
875
|
+
|
|
876
876
|
FlexState.getUI2Personalization = function(sReference) {
|
|
877
877
|
return merge({}, _mInstances[sReference].unfilteredStorageResponse.changes.ui2personalization);
|
|
878
878
|
};
|
|
@@ -8,6 +8,7 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
9
9
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor",
|
|
11
|
+
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
11
12
|
"sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
|
|
12
13
|
"sap/ui/fl/Layer"
|
|
13
14
|
], function(
|
|
@@ -15,6 +16,7 @@ sap.ui.define([
|
|
|
15
16
|
ControlVariantUtils,
|
|
16
17
|
FlexObjectFactory,
|
|
17
18
|
getVariantAuthor,
|
|
19
|
+
States,
|
|
18
20
|
DependencyHandler,
|
|
19
21
|
Layer
|
|
20
22
|
) {
|
|
@@ -90,6 +92,7 @@ sap.ui.define([
|
|
|
90
92
|
user: ControlVariantUtils.DEFAULT_AUTHOR,
|
|
91
93
|
reference: oFlexObject.reference
|
|
92
94
|
});
|
|
95
|
+
oNewVariant.setState(States.LifecycleState.PERSISTED);
|
|
93
96
|
oUpdate.runtimeOnlyData.flexObjects.push(oNewVariant);
|
|
94
97
|
aVariantIds.push(sVariantReference);
|
|
95
98
|
}
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/apply/_internal/flexObjects/CompVariant",
|
|
9
9
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
10
|
+
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
10
11
|
"sap/ui/fl/apply/_internal/flexState/compVariants/Utils",
|
|
11
12
|
"sap/base/Log"
|
|
12
13
|
], function(
|
|
13
14
|
CompVariant,
|
|
14
15
|
FlexObjectFactory,
|
|
16
|
+
States,
|
|
15
17
|
CompVariantUtils,
|
|
16
18
|
Log
|
|
17
19
|
) {
|
|
@@ -123,7 +125,7 @@ sap.ui.define([
|
|
|
123
125
|
*
|
|
124
126
|
* @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
|
|
125
127
|
* @since 1.86
|
|
126
|
-
* @version 1.
|
|
128
|
+
* @version 1.128.0
|
|
127
129
|
* @private
|
|
128
130
|
* @ui5-restricted sap.ui.fl
|
|
129
131
|
*/
|
|
@@ -150,6 +152,11 @@ sap.ui.define([
|
|
|
150
152
|
});
|
|
151
153
|
}
|
|
152
154
|
|
|
155
|
+
// with setting the state to persisted it is made sure that they not show up as a dirty flex object
|
|
156
|
+
(mCompData.nonPersistedVariants.concat([oStandardVariant])).forEach((oVariant) => {
|
|
157
|
+
oVariant.setState(States.LifecycleState.PERSISTED);
|
|
158
|
+
});
|
|
159
|
+
|
|
153
160
|
// apply all changes on non-standard variants
|
|
154
161
|
aVariants.forEach(applyChangesOnVariant.bind(undefined, mChanges));
|
|
155
162
|
|
|
@@ -208,7 +215,7 @@ sap.ui.define([
|
|
|
208
215
|
*
|
|
209
216
|
* @function
|
|
210
217
|
* @since 1.89
|
|
211
|
-
* @version 1.
|
|
218
|
+
* @version 1.128.0
|
|
212
219
|
* @private
|
|
213
220
|
* @ui5-restricted sap.ui.fl
|
|
214
221
|
*
|
|
@@ -34,8 +34,8 @@ sap.ui.define([], function() {
|
|
|
34
34
|
if (oChange?.getContent().defaultVariantName === "*standard*") {
|
|
35
35
|
return true;
|
|
36
36
|
}
|
|
37
|
-
return mCompVariantsMap.
|
|
38
|
-
return oChange?.getContent().defaultVariantName ===
|
|
37
|
+
return Object.keys(mCompVariantsMap.byId).some((sId) => {
|
|
38
|
+
return oChange?.getContent().defaultVariantName === sId;
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
return oChange?.getContent().defaultVariantName || "";
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @alias sap.ui.fl.changeHandler.BaseAddXml
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.128.0
|
|
26
26
|
* @since 1.75
|
|
27
27
|
* @private
|
|
28
28
|
* @ui5-restricted change handlers
|
|
@@ -62,7 +62,15 @@ sap.ui.define([
|
|
|
62
62
|
aNewControls.forEach(function(oNewControl, iIterator) {
|
|
63
63
|
var fnPromise = function() {
|
|
64
64
|
return Promise.resolve()
|
|
65
|
-
.then(oModifier.insertAggregation.bind(
|
|
65
|
+
.then(oModifier.insertAggregation.bind(
|
|
66
|
+
oModifier,
|
|
67
|
+
oControl,
|
|
68
|
+
sAggregationName,
|
|
69
|
+
oNewControl,
|
|
70
|
+
iIndex + iIterator,
|
|
71
|
+
oView,
|
|
72
|
+
mChangeInfo.skipAdjustIndex
|
|
73
|
+
))
|
|
66
74
|
.then(function() {
|
|
67
75
|
aRevertData.push({
|
|
68
76
|
id: oModifier.getId(oNewControl),
|
|
@@ -72,7 +80,7 @@ sap.ui.define([
|
|
|
72
80
|
};
|
|
73
81
|
aPromises.push(fnPromise);
|
|
74
82
|
});
|
|
75
|
-
return FlUtils.execPromiseQueueSequentially(aPromises, true, true)
|
|
83
|
+
return FlUtils.execPromiseQueueSequentially(aPromises, true, true, true)
|
|
76
84
|
.then(function() {
|
|
77
85
|
oChange.setRevertData(aRevertData);
|
|
78
86
|
return aNewControls;
|
|
@@ -107,11 +115,12 @@ sap.ui.define([
|
|
|
107
115
|
BaseAddXml._destroyArrayOfControls(aNewControls);
|
|
108
116
|
return Promise.reject(new Error(`The content of the xml fragment does not match the type of the targetAggregation: ${oAggregationDefinition.type}`));
|
|
109
117
|
}
|
|
118
|
+
return undefined;
|
|
110
119
|
});
|
|
111
120
|
};
|
|
112
121
|
aPromises.push(fnPromise);
|
|
113
122
|
});
|
|
114
|
-
return FlUtils.execPromiseQueueSequentially(aPromises, true, true)
|
|
123
|
+
return FlUtils.execPromiseQueueSequentially(aPromises, true, true, true)
|
|
115
124
|
.then(fnAddControls);
|
|
116
125
|
});
|
|
117
126
|
};
|