@openui5/sap.ui.fl 1.114.0 → 1.114.2
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/ChangePersistence.js +1 -1
- package/src/sap/ui/fl/ChangePersistenceFactory.js +3 -55
- 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 +7 -159
- 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/ChangesController.js +0 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +4 -1
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +13 -7
- 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/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.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 +15 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -14
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +3 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +20 -2
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +9 -9
- 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 +17 -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 +219 -0
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +7 -9
- 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 +6 -0
- 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 +6 -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/Storage.js +3 -1
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +3 -22
- 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 +1 -0
- 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/messagebundle.properties +4 -1
- package/src/sap/ui/fl/requireAsync.js +6 -0
- 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 +77 -3
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -4
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +132 -107
- 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 +35 -8
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +17 -2
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +8 -5
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +6 -0
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.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/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +11 -3
- 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 +11 -4
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +36 -12
- 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 +618 -104
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +7 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +5 -2
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +10 -1
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +66 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.fl",
|
|
3
|
-
"version": "1.114.
|
|
3
|
+
"version": "1.114.2",
|
|
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.114.
|
|
18
|
-
"@openui5/sap.ui.core": "1.114.
|
|
17
|
+
"@openui5/sap.m": "1.114.2",
|
|
18
|
+
"@openui5/sap.ui.core": "1.114.2"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/sap/ui/fl/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.114.
|
|
9
|
+
<version>1.114.2</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/fl/Cache.js
CHANGED
|
@@ -66,7 +66,7 @@ sap.ui.define([
|
|
|
66
66
|
*
|
|
67
67
|
* @constructor
|
|
68
68
|
* @author SAP SE
|
|
69
|
-
* @version 1.114.
|
|
69
|
+
* @version 1.114.2
|
|
70
70
|
* @experimental Since 1.25.0
|
|
71
71
|
* @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
|
|
72
72
|
* @param {string} mComponent.name - Name of the component this instance is responsible for
|
|
@@ -5,37 +5,25 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/core/Component",
|
|
9
|
-
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
10
8
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
11
|
-
"sap/ui/fl/ChangePersistence"
|
|
12
|
-
"sap/ui/fl/Utils",
|
|
13
|
-
"sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory",
|
|
14
|
-
"sap/ui/fl/apply/_internal/changes/descriptor/Applier"
|
|
9
|
+
"sap/ui/fl/ChangePersistence"
|
|
15
10
|
], function(
|
|
16
|
-
Component,
|
|
17
|
-
FlexState,
|
|
18
11
|
ManifestUtils,
|
|
19
|
-
ChangePersistence
|
|
20
|
-
Utils,
|
|
21
|
-
ApplyStrategyFactory,
|
|
22
|
-
Applier
|
|
12
|
+
ChangePersistence
|
|
23
13
|
) {
|
|
24
14
|
"use strict";
|
|
25
15
|
|
|
26
|
-
|
|
27
16
|
/**
|
|
28
17
|
* Factory to get or create a new instances of {sap.ui.fl.ChangePersistence}
|
|
29
18
|
* @constructor
|
|
30
19
|
* @alias sap.ui.fl.ChangePersistenceFactory
|
|
31
20
|
* @experimental Since 1.27.0
|
|
32
21
|
* @author SAP SE
|
|
33
|
-
* @version 1.114.
|
|
22
|
+
* @version 1.114.2
|
|
34
23
|
* @private
|
|
35
24
|
* @ui5-restricted sap.ui.fl
|
|
36
25
|
*/
|
|
37
26
|
var ChangePersistenceFactory = {};
|
|
38
|
-
|
|
39
27
|
ChangePersistenceFactory._instanceCache = {};
|
|
40
28
|
|
|
41
29
|
/**
|
|
@@ -68,45 +56,5 @@ sap.ui.define([
|
|
|
68
56
|
return ChangePersistenceFactory.getChangePersistenceForComponent(sComponentId);
|
|
69
57
|
};
|
|
70
58
|
|
|
71
|
-
/**
|
|
72
|
-
* Registers the ChangePersistenceFactory._onLoadComponent to the Component loading functionality
|
|
73
|
-
*
|
|
74
|
-
* @since 1.38
|
|
75
|
-
* @private
|
|
76
|
-
*/
|
|
77
|
-
ChangePersistenceFactory.registerLoadComponentEventHandler = function () {
|
|
78
|
-
Component._fnLoadComponentCallback = this._onLoadComponent.bind(this);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Callback which is called within the early state of Component processing.
|
|
83
|
-
* Already triggers the loading of the flexibility changes if the loaded manifest is an application variant.
|
|
84
|
-
* The processing is only done for components of the type "application"
|
|
85
|
-
*
|
|
86
|
-
* @param {object} oConfig - Copy of the configuration of loaded component
|
|
87
|
-
* @param {object} oConfig.asyncHints - Async hints passed from the app index to the core Component processing
|
|
88
|
-
* @param {object} oManifest - Copy of the manifest of loaded component
|
|
89
|
-
* @returns {Promise} Promise
|
|
90
|
-
* @since 1.38
|
|
91
|
-
* @private
|
|
92
|
-
*/
|
|
93
|
-
ChangePersistenceFactory._onLoadComponent = function (oConfig, oManifest) {
|
|
94
|
-
// stop processing if the component is not of the type application or component ID is missing
|
|
95
|
-
if (!Utils.isApplication(oManifest) || !oConfig.id) {
|
|
96
|
-
return Promise.resolve();
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
FlexState.initialize({
|
|
100
|
-
componentData: oConfig.componentData || (oConfig.settings && oConfig.settings.componentData),
|
|
101
|
-
asyncHints: oConfig.asyncHints,
|
|
102
|
-
manifest: oManifest,
|
|
103
|
-
componentId: oConfig.id
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
// manifest descriptor changes for ABAP mixed mode can only be applied in this hook,
|
|
107
|
-
// because at this point all libs have been loaded (in contrast to the first Component._fnPreprocessManifest hook), but the manifest is still adaptable
|
|
108
|
-
return Applier.applyChangesIncludedInManifest(oManifest, ApplyStrategyFactory.getRuntimeStrategy());
|
|
109
|
-
};
|
|
110
|
-
|
|
111
59
|
return ChangePersistenceFactory;
|
|
112
60
|
}, true);
|
|
@@ -5,27 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/FlexController",
|
|
9
|
-
"sap/ui/fl/Utils",
|
|
10
|
-
"sap/ui/fl/Layer",
|
|
11
|
-
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
12
|
-
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
13
|
-
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
14
|
-
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
15
|
-
"sap/ui/fl/variants/VariantModel",
|
|
16
8
|
"sap/base/Log",
|
|
17
|
-
"sap/ui/
|
|
9
|
+
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
10
|
+
"sap/ui/fl/FlexController",
|
|
11
|
+
"sap/ui/fl/Utils"
|
|
18
12
|
], function(
|
|
19
|
-
FlexController,
|
|
20
|
-
Utils,
|
|
21
|
-
Layer,
|
|
22
|
-
Applier,
|
|
23
|
-
FlexState,
|
|
24
|
-
ManifestUtils,
|
|
25
|
-
ControlVariantApplyAPI,
|
|
26
|
-
VariantModel,
|
|
27
13
|
Log,
|
|
28
|
-
|
|
14
|
+
ManifestUtils,
|
|
15
|
+
FlexController,
|
|
16
|
+
Utils
|
|
29
17
|
) {
|
|
30
18
|
"use strict";
|
|
31
19
|
/**
|
|
@@ -34,20 +22,14 @@ sap.ui.define([
|
|
|
34
22
|
* @alias sap.ui.fl.FlexControllerFactory
|
|
35
23
|
* @experimental Since 1.27.0
|
|
36
24
|
* @author SAP SE
|
|
37
|
-
* @version 1.114.
|
|
25
|
+
* @version 1.114.2
|
|
38
26
|
*
|
|
39
27
|
* @private
|
|
40
28
|
* @ui5-restricted sap.ui.fl
|
|
41
29
|
*/
|
|
42
30
|
var FlexControllerFactory = {};
|
|
43
|
-
|
|
44
31
|
FlexControllerFactory._instanceCache = {};
|
|
45
32
|
|
|
46
|
-
// in this object a promise is stored for every application component instance
|
|
47
|
-
// if the same instance is initialized twice the promise is replaced
|
|
48
|
-
FlexControllerFactory._componentInstantiationPromises = new WeakMap();
|
|
49
|
-
var oEmbeddedComponentsPromises = {};
|
|
50
|
-
|
|
51
33
|
/**
|
|
52
34
|
* Creates or returns an instance of the FlexController
|
|
53
35
|
*
|
|
@@ -85,139 +67,5 @@ sap.ui.define([
|
|
|
85
67
|
}
|
|
86
68
|
};
|
|
87
69
|
|
|
88
|
-
/**
|
|
89
|
-
* The fl library must ensure a proper rta startup by a lazy loading of the rta library and starting RTA accordingly.
|
|
90
|
-
* This is needed in the stand alone scenario; ATTENTION: if also the ushell-plugin of rta runs, the first one will
|
|
91
|
-
* actually trigger the reload and clear the flag for the second.
|
|
92
|
-
*
|
|
93
|
-
* @param {object} oResult - The result which will be passed after the rta startup was checked and triggered if needed
|
|
94
|
-
* @param {object} oComponent - Application component about to be started
|
|
95
|
-
* @return {Promise} Promise resolving with the initially passed result
|
|
96
|
-
*/
|
|
97
|
-
function checkForRtaStartOnDraftAndReturnResult(oResult, oComponent) {
|
|
98
|
-
// Dont check for RTA start in ushell scenario
|
|
99
|
-
if (Utils.getUshellContainer()) {
|
|
100
|
-
return Promise.resolve(oResult);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
var sRestartingComponent = window.sessionStorage.getItem("sap.ui.rta.restart." + Layer.CUSTOMER);
|
|
104
|
-
if (sRestartingComponent) {
|
|
105
|
-
var sComponentId = ManifestUtils.getFlexReferenceForControl(oComponent);
|
|
106
|
-
if (sRestartingComponent !== sComponentId && sRestartingComponent !== "true") {
|
|
107
|
-
Log.error("an application component was started " +
|
|
108
|
-
"which does not match the component for which the restart was triggered:\n" +
|
|
109
|
-
"Triggering component: " + sRestartingComponent + "\n" +
|
|
110
|
-
"Started component: " + sComponentId);
|
|
111
|
-
|
|
112
|
-
return Promise.resolve(oResult);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return new Promise(function (resolve, reject) {
|
|
116
|
-
Promise.all([
|
|
117
|
-
sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true}),
|
|
118
|
-
oComponent.rootControlLoaded()
|
|
119
|
-
])
|
|
120
|
-
.then(function() {
|
|
121
|
-
sap.ui.require(["sap/ui/rta/api/startKeyUserAdaptation"], function (startKeyUserAdaptation) {
|
|
122
|
-
startKeyUserAdaptation({
|
|
123
|
-
rootControl: oComponent
|
|
124
|
-
});
|
|
125
|
-
resolve(oResult);
|
|
126
|
-
});
|
|
127
|
-
})
|
|
128
|
-
.catch(function(oError) {
|
|
129
|
-
reject(oError);
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return Promise.resolve(oResult);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Gets the changes and in case of existing changes, prepare the applyChanges function already with the changes.
|
|
139
|
-
*
|
|
140
|
-
* @param {object} oComponent - Component instance that is currently loading
|
|
141
|
-
* @param {object} vConfig - Configuration of loaded component
|
|
142
|
-
* @return {Promise} Promise which resolves when all relevant tasks for changes propagation have been processed
|
|
143
|
-
*/
|
|
144
|
-
FlexControllerFactory.getChangesAndPropagate = function (oComponent, vConfig) {
|
|
145
|
-
// if component's manifest is of type 'application' then only a flex controller and change persistence instances are created.
|
|
146
|
-
// if component's manifest is of type 'component' then no flex controller and change persistence instances are created. The variant model is fetched from the outer app component and applied on this component type.
|
|
147
|
-
if (Utils.isApplicationComponent(oComponent)) {
|
|
148
|
-
var sComponentId = oComponent.getId();
|
|
149
|
-
// TODO: remove this line when the maps and filtered response are always up to data
|
|
150
|
-
// Currently with the variants the maps are out of sync when the app gets loaded again without complete reload
|
|
151
|
-
FlexState.rebuildFilteredResponse(ManifestUtils.getFlexReferenceForControl(oComponent));
|
|
152
|
-
var oReturnPromise = FlexState.initialize({
|
|
153
|
-
componentId: sComponentId,
|
|
154
|
-
asyncHints: vConfig.asyncHints
|
|
155
|
-
})
|
|
156
|
-
.then(_propagateChangesForAppComponent.bind(this, oComponent))
|
|
157
|
-
.then(function() {
|
|
158
|
-
// update any potential embedded component waiting for this app component
|
|
159
|
-
if (oEmbeddedComponentsPromises[sComponentId]) {
|
|
160
|
-
oEmbeddedComponentsPromises[sComponentId].forEach(function(oEmbeddedComponent) {
|
|
161
|
-
var oVariantModel = oComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
|
|
162
|
-
oEmbeddedComponent.setModel(oVariantModel, ControlVariantApplyAPI.getVariantModelName());
|
|
163
|
-
});
|
|
164
|
-
delete oEmbeddedComponentsPromises[sComponentId];
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
FlexControllerFactory._componentInstantiationPromises.set(oComponent, oReturnPromise);
|
|
168
|
-
|
|
169
|
-
return oReturnPromise;
|
|
170
|
-
} else if (Utils.isEmbeddedComponent(oComponent)) {
|
|
171
|
-
var oAppComponent = Utils.getAppComponentForControl(oComponent);
|
|
172
|
-
// Some embedded components might not have an app component, e.g. sap.ushell.plugins.rta, sap.ushell.plugins.rta-personalize
|
|
173
|
-
if (oAppComponent && Utils.isApplicationComponent(oAppComponent)) {
|
|
174
|
-
// once the VModel is set to the outer component it also has to be set to any embedded component
|
|
175
|
-
if (FlexControllerFactory._componentInstantiationPromises.has(oAppComponent)) {
|
|
176
|
-
return FlexControllerFactory._componentInstantiationPromises.get(oAppComponent).then(function() {
|
|
177
|
-
var oVariantModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
|
|
178
|
-
oComponent.setModel(oVariantModel, ControlVariantApplyAPI.getVariantModelName());
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
oEmbeddedComponentsPromises[oAppComponent.getId()] = oEmbeddedComponentsPromises[oAppComponent.getId()] || [];
|
|
182
|
-
oEmbeddedComponentsPromises[oAppComponent.getId()].push(oComponent);
|
|
183
|
-
}
|
|
184
|
-
return Promise.resolve();
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Sets propagation changes and listeners on the passed app component.
|
|
190
|
-
* Also creates a variant model on this app component.
|
|
191
|
-
* @see sap.ui.fl.variant.VariantModel
|
|
192
|
-
*
|
|
193
|
-
* @param {sap.ui.core.Component} oAppComponent - App component instance
|
|
194
|
-
* @return {Promise} Promise which resolves to the created variant model,
|
|
195
|
-
* after all propagation changes and listeners have been set.
|
|
196
|
-
*/
|
|
197
|
-
function _propagateChangesForAppComponent (oAppComponent) {
|
|
198
|
-
// only manifest with type = "application" will fetch changes
|
|
199
|
-
var oManifest = oAppComponent.getManifestObject();
|
|
200
|
-
var oFlexController = FlexControllerFactory.createForControl(oAppComponent, oManifest);
|
|
201
|
-
var oVariantModel;
|
|
202
|
-
return oFlexController._oChangePersistence.loadChangesMapForComponent(oAppComponent)
|
|
203
|
-
.then(function (fnGetChangesMap) {
|
|
204
|
-
var fnPropagationListener = Applier.applyAllChangesForControl.bind(Applier, fnGetChangesMap, oAppComponent, oFlexController);
|
|
205
|
-
fnPropagationListener._bIsSapUiFlFlexControllerApplyChangesOnControl = true;
|
|
206
|
-
oAppComponent.addPropagationListener(fnPropagationListener);
|
|
207
|
-
oVariantModel = new VariantModel({}, {
|
|
208
|
-
flexController: oFlexController,
|
|
209
|
-
appComponent: oAppComponent
|
|
210
|
-
});
|
|
211
|
-
return oVariantModel.initialize();
|
|
212
|
-
})
|
|
213
|
-
.then(function() {
|
|
214
|
-
oAppComponent.setModel(oVariantModel, ControlVariantApplyAPI.getVariantModelName());
|
|
215
|
-
Measurement.end("flexProcessing");
|
|
216
|
-
return oVariantModel;
|
|
217
|
-
}).then(function (oResult) {
|
|
218
|
-
return checkForRtaStartOnDraftAndReturnResult(oResult, oAppComponent);
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
|
|
222
70
|
return FlexControllerFactory;
|
|
223
71
|
}, true);
|
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
*
|
|
26
26
|
* @private
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.114.
|
|
28
|
+
* @version 1.114.2
|
|
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.
|
|
@@ -122,6 +122,9 @@ sap.ui.define([
|
|
|
122
122
|
// is available maximum once for instancespecific delegate
|
|
123
123
|
mTargetDelegateInfo.payload = mDelegateInfo.payload;
|
|
124
124
|
}
|
|
125
|
+
if (mDelegateInfo.delegateType) {
|
|
126
|
+
mTargetDelegateInfo.delegateType = mDelegateInfo.delegateType;
|
|
127
|
+
}
|
|
125
128
|
return mTargetDelegateInfo;
|
|
126
129
|
}
|
|
127
130
|
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @namespace sap.ui.fl.apply._internal.changes.Utils
|
|
24
24
|
* @since 1.70
|
|
25
|
-
* @version 1.114.
|
|
25
|
+
* @version 1.114.2
|
|
26
26
|
* @private
|
|
27
27
|
* @ui5-restricted sap.ui.fl.apply._internal, sap.ui.fl.write._internal
|
|
28
28
|
*/
|
|
@@ -80,16 +80,17 @@ sap.ui.define([
|
|
|
80
80
|
* @returns {Promise} Promise resolving with the change handler or an empty object
|
|
81
81
|
*/
|
|
82
82
|
getChangeHandler: function(oChange, mControl, mPropertyBag) {
|
|
83
|
-
var
|
|
83
|
+
var oLibraryNamePromise = mPropertyBag.modifier.getLibraryName(mControl.control);
|
|
84
84
|
// the ChangeHandlerRegistration includes all the predefined ChangeHandlers.
|
|
85
85
|
// With this as a standard import the ChangeHandlers would not be able to access API classes due to circular dependencies.
|
|
86
86
|
// TODO should be removed as soon as the ChangePersistence / FlexController are gone
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
return Promise.all([
|
|
88
|
+
requireAsync("sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration"),
|
|
89
|
+
oLibraryNamePromise
|
|
90
|
+
])
|
|
91
|
+
.then(function(aPromiseValues) {
|
|
92
|
+
return aPromiseValues[0].waitForChangeHandlerRegistration(aPromiseValues[1]);
|
|
91
93
|
})
|
|
92
|
-
|
|
93
94
|
.then(function() {
|
|
94
95
|
var sChangeType = oChange.getChangeType();
|
|
95
96
|
var sLayer = oChange.getLayer();
|
|
@@ -104,6 +105,11 @@ sap.ui.define([
|
|
|
104
105
|
return false;
|
|
105
106
|
}
|
|
106
107
|
var oControl = oModifier.bySelector(oChange.getSelector(), oAppComponent);
|
|
108
|
+
// if the control is currently not available,
|
|
109
|
+
// the change is also not applied anymore and the dependency is still valid
|
|
110
|
+
if (!oControl) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
107
113
|
var bHasChangeApplyFinishedCustomData = FlexCustomData.hasChangeApplyFinishedCustomData(oControl, oChange, oModifier);
|
|
108
114
|
return isDependencyStillValid(oChange, bHasChangeApplyFinishedCustomData);
|
|
109
115
|
},
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* Available for build {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
34
34
|
*
|
|
35
35
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.AddNewInbound
|
|
36
|
-
* @version 1.114.
|
|
36
|
+
* @version 1.114.2
|
|
37
37
|
* @private
|
|
38
38
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
39
39
|
*/
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
25
25
|
*
|
|
26
26
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.ChangeInbound
|
|
27
|
-
* @version 1.114.
|
|
27
|
+
* @version 1.114.2
|
|
28
28
|
* @private
|
|
29
29
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
30
30
|
*/
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* Available for build {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
44
44
|
*
|
|
45
45
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.RemoveAllInboundsExceptOne
|
|
46
|
-
* @version 1.114.
|
|
46
|
+
* @version 1.114.2
|
|
47
47
|
* @private
|
|
48
48
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
49
49
|
*/
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.SetTitle
|
|
22
|
-
* @version 1.114.
|
|
22
|
+
* @version 1.114.2
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Only available during build time {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.fiori.SetAbstract
|
|
22
|
-
* @version 1.114.
|
|
22
|
+
* @version 1.114.2
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Only available during build time {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.fiori.SetRegistrationIds
|
|
22
|
-
* @version 1.114.
|
|
22
|
+
* @version 1.114.2
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -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.AddNewCard
|
|
21
|
-
* @version 1.114.
|
|
21
|
+
* @version 1.114.2
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|
|
@@ -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.ChangeCard
|
|
21
|
-
* @version 1.114.
|
|
21
|
+
* @version 1.114.2
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|
|
@@ -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.114.
|
|
21
|
+
* @version 1.114.2
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* Only available during build time {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
24
24
|
*
|
|
25
25
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith
|
|
26
|
-
* @version 1.114.
|
|
26
|
+
* @version 1.114.2
|
|
27
27
|
* @private
|
|
28
28
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
29
29
|
*/
|