@openui5/sap.ui.fl 1.108.1 → 1.109.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/THIRDPARTY.txt +1 -1
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +4 -4
- package/src/sap/ui/fl/ChangePersistence.js +39 -48
- 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 +26 -26
- package/src/sap/ui/fl/FlexControllerFactory.js +6 -5
- package/src/sap/ui/fl/LayerUtils.js +3 -3
- package/src/sap/ui/fl/Utils.js +68 -274
- package/src/sap/ui/fl/apply/_internal/ChangesController.js +17 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +12 -12
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +4 -4
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +10 -8
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +5 -4
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +2 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +6 -6
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData.js +5 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +11 -11
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +24 -11
- package/src/sap/ui/fl/apply/_internal/flexObjects/RevertData.js +2 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +19 -4
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +462 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +16 -6
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +2 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.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 +60 -29
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +7 -7
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +5 -3
- package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +1 -12
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.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 +9 -11
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/prepareVariantsMap.js +27 -7
- 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 +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +16 -8
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +10 -46
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +4 -4
- 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 +5 -4
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +6 -6
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +20 -18
- package/src/sap/ui/fl/changeHandler/BaseRename.js +6 -6
- package/src/sap/ui/fl/changeHandler/HideControl.js +5 -5
- package/src/sap/ui/fl/changeHandler/MoveControls.js +5 -5
- package/src/sap/ui/fl/changeHandler/MoveElements.js +2 -2
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +2 -2
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +2 -2
- package/src/sap/ui/fl/changeHandler/StashControl.js +5 -5
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +5 -5
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +5 -5
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +4 -4
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.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/designtime/variants/VariantManagement.designtime.js +4 -2
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -14
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +2 -2
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +3 -3
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +3 -3
- 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/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/themes/base/library.source.less +0 -2
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +2 -2
- 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 +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +38 -7
- package/src/sap/ui/fl/variants/VariantModel.js +96 -47
- package/src/sap/ui/fl/variants/context/Component.js +0 -1
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +1 -0
- package/src/sap/ui/fl/write/_internal/SaveAs.js +4 -2
- package/src/sap/ui/fl/write/_internal/Storage.js +11 -11
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +28 -26
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +9 -4
- package/src/sap/ui/fl/write/_internal/condenser/classifications/LastOneWins.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Reverse.js +2 -2
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Update.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +4 -2
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +11 -15
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +2 -2
- 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 +17 -16
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +32 -36
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +18 -19
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +6 -6
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +5 -3
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +6 -6
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +8 -8
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +4 -4
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
- package/ui5.yaml +4 -2
- package/src/sap/ui/fl/Change.js +0 -1092
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +0 -122
- package/src/sap/ui/fl/themes/base/VariantManagement.less +0 -97
|
@@ -11,6 +11,7 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
12
12
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
13
13
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
14
|
+
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
14
15
|
"sap/ui/fl/variants/VariantModel",
|
|
15
16
|
"sap/base/Log",
|
|
16
17
|
"sap/ui/performance/Measurement"
|
|
@@ -21,6 +22,7 @@ sap.ui.define([
|
|
|
21
22
|
Applier,
|
|
22
23
|
FlexState,
|
|
23
24
|
ManifestUtils,
|
|
25
|
+
ControlVariantApplyAPI,
|
|
24
26
|
VariantModel,
|
|
25
27
|
Log,
|
|
26
28
|
Measurement
|
|
@@ -32,7 +34,7 @@ sap.ui.define([
|
|
|
32
34
|
* @alias sap.ui.fl.FlexControllerFactory
|
|
33
35
|
* @experimental Since 1.27.0
|
|
34
36
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
37
|
+
* @version 1.109.0
|
|
36
38
|
*
|
|
37
39
|
* @private
|
|
38
40
|
* @ui5-restricted sap.ui.fl
|
|
@@ -109,7 +111,6 @@ sap.ui.define([
|
|
|
109
111
|
return Promise.resolve(oResult);
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
window.sessionStorage.removeItem("sap.ui.rta.restart." + Layer.CUSTOMER);
|
|
113
114
|
return new Promise(function (resolve, reject) {
|
|
114
115
|
Promise.all([
|
|
115
116
|
sap.ui.getCore().loadLibrary("sap.ui.rta", {async: true}),
|
|
@@ -162,7 +163,7 @@ sap.ui.define([
|
|
|
162
163
|
oInitialPromise = FlexControllerFactory._componentInstantiationPromises.get(oAppComponent);
|
|
163
164
|
}
|
|
164
165
|
return oInitialPromise.then(function() {
|
|
165
|
-
var oExistingVariantModel = oAppComponent.getModel(
|
|
166
|
+
var oExistingVariantModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
|
|
166
167
|
if (!oExistingVariantModel) {
|
|
167
168
|
// If variant model is not present on the app component
|
|
168
169
|
// then a new variant model should be set on it.
|
|
@@ -173,7 +174,7 @@ sap.ui.define([
|
|
|
173
174
|
return oExistingVariantModel;
|
|
174
175
|
}).then(function (oVariantModel) {
|
|
175
176
|
// set app component's variant model on the embedded component
|
|
176
|
-
oComponent.setModel(oVariantModel,
|
|
177
|
+
oComponent.setModel(oVariantModel, ControlVariantApplyAPI.getVariantModelName());
|
|
177
178
|
});
|
|
178
179
|
}
|
|
179
180
|
return Promise.resolve();
|
|
@@ -206,7 +207,7 @@ sap.ui.define([
|
|
|
206
207
|
return oVariantModel.initialize();
|
|
207
208
|
})
|
|
208
209
|
.then(function() {
|
|
209
|
-
oAppComponent.setModel(oVariantModel,
|
|
210
|
+
oAppComponent.setModel(oVariantModel, ControlVariantApplyAPI.getVariantModelName());
|
|
210
211
|
Measurement.end("flexProcessing");
|
|
211
212
|
return oVariantModel;
|
|
212
213
|
}).then(function (oResult) {
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
*
|
|
42
42
|
* @namespace sap.ui.fl.LayerUtils
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.109.0
|
|
45
45
|
*/
|
|
46
46
|
var LayerUtils = {
|
|
47
47
|
_mLayersIndex: mLayersIndex,
|
|
@@ -220,9 +220,9 @@ sap.ui.define([
|
|
|
220
220
|
/**
|
|
221
221
|
* Filters the passed Changes or change definitions and returns only the ones in the current layer
|
|
222
222
|
*
|
|
223
|
-
* @param {sap.ui.fl.
|
|
223
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject|object[]} aChanges Array of Changes or ChangeDefinitions
|
|
224
224
|
* @param {string} sCurrentLayer Current Layer
|
|
225
|
-
* @returns {sap.ui.fl.
|
|
225
|
+
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject|object[]} Array of filtered Changes
|
|
226
226
|
*/
|
|
227
227
|
filterChangeOrChangeDefinitionsByCurrentLayer: function(aChanges, sCurrentLayer) {
|
|
228
228
|
if (!sCurrentLayer) {
|
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -37,21 +37,42 @@ sap.ui.define([
|
|
|
37
37
|
) {
|
|
38
38
|
"use strict";
|
|
39
39
|
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns the type of "sap.app" from the manifest object passed.
|
|
43
|
+
* @param {sap.ui.core.Manifest} oManifest - Manifest object
|
|
44
|
+
* @returns {string|undefined} Manifest object's <code>type</code> property for <code>sap.app</code> entry
|
|
45
|
+
*/
|
|
46
|
+
function getComponentType(oManifest) {
|
|
47
|
+
// manifest instance
|
|
48
|
+
if (oManifest && oManifest.getEntry) {
|
|
49
|
+
return oManifest.getEntry("sap.app") && oManifest.getEntry("sap.app").type;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// raw manifest
|
|
53
|
+
return oManifest && oManifest["sap.app"] && oManifest["sap.app"].type;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function getStartUpParameter(oComponentData, sParameterName) {
|
|
57
|
+
if (oComponentData && oComponentData.startupParameters && sParameterName) {
|
|
58
|
+
if (Array.isArray(oComponentData.startupParameters[sParameterName])) {
|
|
59
|
+
return oComponentData.startupParameters[sParameterName][0];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
40
64
|
/**
|
|
41
65
|
* Provides utility functions for the SAPUI5 flexibility library
|
|
42
66
|
*
|
|
43
67
|
* @namespace
|
|
44
68
|
* @alias sap.ui.fl.Utils
|
|
45
69
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
70
|
+
* @version 1.109.0
|
|
47
71
|
*
|
|
48
72
|
* @private
|
|
49
73
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
50
74
|
*/
|
|
51
75
|
var Utils = {
|
|
52
|
-
APP_ID_AT_DESIGN_TIME: "${pro" + "ject.art" + "ifactId}", //avoid replaced by content of ${project.artifactId} placeholder at build steps
|
|
53
|
-
VARIANT_MODEL_NAME: "$FlexVariants",
|
|
54
|
-
|
|
55
76
|
/**
|
|
56
77
|
* Formats the log message by replacing placeholders with values and logging the message.
|
|
57
78
|
*
|
|
@@ -70,8 +91,8 @@ sap.ui.define([
|
|
|
70
91
|
// determine UI5 component out of given control
|
|
71
92
|
if (oControl) {
|
|
72
93
|
var oAppComponent = this.getAppComponentForControl(oControl);
|
|
73
|
-
if (oAppComponent) {
|
|
74
|
-
return !!
|
|
94
|
+
if (oAppComponent && oAppComponent.getComponentData) {
|
|
95
|
+
return !!getStartUpParameter(oAppComponent.getComponentData(), "sap-app-id");
|
|
75
96
|
}
|
|
76
97
|
}
|
|
77
98
|
|
|
@@ -90,24 +111,18 @@ sap.ui.define([
|
|
|
90
111
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
91
112
|
*/
|
|
92
113
|
getAppDescriptor: function(oControl) {
|
|
93
|
-
var oManifest = null;
|
|
94
|
-
var oComponent = null;
|
|
95
|
-
var oComponentMetaData = null;
|
|
96
|
-
|
|
97
114
|
// determine UI5 component out of given control
|
|
98
115
|
if (oControl) {
|
|
99
|
-
oComponent = this.getAppComponentForControl(oControl);
|
|
116
|
+
var oComponent = this.getAppComponentForControl(oControl);
|
|
100
117
|
|
|
101
118
|
// determine manifest out of found component
|
|
102
119
|
if (oComponent && oComponent.getMetadata) {
|
|
103
|
-
oComponentMetaData = oComponent.getMetadata();
|
|
120
|
+
var oComponentMetaData = oComponent.getMetadata();
|
|
104
121
|
if (oComponentMetaData && oComponentMetaData.getManifest) {
|
|
105
|
-
|
|
122
|
+
return oComponentMetaData.getManifest();
|
|
106
123
|
}
|
|
107
124
|
}
|
|
108
125
|
}
|
|
109
|
-
|
|
110
|
-
return oManifest;
|
|
111
126
|
},
|
|
112
127
|
|
|
113
128
|
/**
|
|
@@ -122,7 +137,7 @@ sap.ui.define([
|
|
|
122
137
|
* @ui5-restricted sap.ui.fl.apply._internal.flexState.Loader
|
|
123
138
|
*/
|
|
124
139
|
getSiteIdByComponentData: function(oComponentData) {
|
|
125
|
-
return
|
|
140
|
+
return getStartUpParameter(oComponentData, "hcpApplicationId");
|
|
126
141
|
},
|
|
127
142
|
|
|
128
143
|
/**
|
|
@@ -158,7 +173,7 @@ sap.ui.define([
|
|
|
158
173
|
/**
|
|
159
174
|
* Determines if the passed change is related to control variants.
|
|
160
175
|
* @see sap.ui.fl.variants.VariantManagement
|
|
161
|
-
* @param {sap.ui.fl.
|
|
176
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange Change object
|
|
162
177
|
* @returns {boolean} If the passed change is a variant management change
|
|
163
178
|
* @name sap.ui.fl.Utils.isChangeRelatedToVariants
|
|
164
179
|
*
|
|
@@ -172,70 +187,6 @@ sap.ui.define([
|
|
|
172
187
|
|| oChange.getVariantReference();
|
|
173
188
|
},
|
|
174
189
|
|
|
175
|
-
/**
|
|
176
|
-
* Determines the content for a given startUpParameter name
|
|
177
|
-
*
|
|
178
|
-
* @param {sap.ui.core.Component} oComponent - component instance
|
|
179
|
-
* @param {string} sParameterName - startUpParameterName that shall be determined
|
|
180
|
-
* @returns {string} content of found startUpParameter
|
|
181
|
-
* @private
|
|
182
|
-
*/
|
|
183
|
-
_getComponentStartUpParameter: function(oComponent, sParameterName) {
|
|
184
|
-
var startUpParameterContent = null;
|
|
185
|
-
|
|
186
|
-
if (sParameterName) {
|
|
187
|
-
if (oComponent && oComponent.getComponentData) {
|
|
188
|
-
startUpParameterContent = this._getStartUpParameter(oComponent.getComponentData(), sParameterName);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return startUpParameterContent;
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
_getStartUpParameter: function(oComponentData, sParameterName) {
|
|
196
|
-
if (oComponentData && oComponentData.startupParameters && sParameterName) {
|
|
197
|
-
if (Array.isArray(oComponentData.startupParameters[sParameterName])) {
|
|
198
|
-
return oComponentData.startupParameters[sParameterName][0];
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Gets the component instance for a component ID.
|
|
205
|
-
*
|
|
206
|
-
* @param {string} sComponentId component ID
|
|
207
|
-
* @returns {sap.ui.core.Component} component for the component ID
|
|
208
|
-
* @private
|
|
209
|
-
*/
|
|
210
|
-
_getComponent: function(sComponentId) {
|
|
211
|
-
var oComponent;
|
|
212
|
-
if (sComponentId) {
|
|
213
|
-
oComponent = Component.get(sComponentId);
|
|
214
|
-
}
|
|
215
|
-
return oComponent;
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Returns ComponentId of the control. If the control has no component, it walks up the control tree in order to find a control having one
|
|
220
|
-
*
|
|
221
|
-
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
222
|
-
* @returns {string} The component id or empty string if component id couldn't be found
|
|
223
|
-
* @see sap.ui.core.Component.getOwnerIdFor
|
|
224
|
-
* @private
|
|
225
|
-
*/
|
|
226
|
-
_getComponentIdForControl: function(oControl) {
|
|
227
|
-
var sComponentId = Utils._getOwnerIdForControl(oControl);
|
|
228
|
-
if (!sComponentId) {
|
|
229
|
-
if (oControl && typeof oControl.getParent === "function") {
|
|
230
|
-
var oParent = oControl.getParent();
|
|
231
|
-
if (oParent) {
|
|
232
|
-
return Utils._getComponentIdForControl(oParent);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return sComponentId || "";
|
|
237
|
-
},
|
|
238
|
-
|
|
239
190
|
/**
|
|
240
191
|
* Returns the Component that belongs to given control. If the control has no component, it walks up the control tree in order to find a
|
|
241
192
|
* control having one.
|
|
@@ -246,7 +197,26 @@ sap.ui.define([
|
|
|
246
197
|
* @ui5-restricted sap.ui.fl
|
|
247
198
|
*/
|
|
248
199
|
getComponentForControl: function(oControl) {
|
|
249
|
-
|
|
200
|
+
function getComponentIdForControl (oControl) {
|
|
201
|
+
var sComponentId = Component.getOwnerIdFor(oControl);
|
|
202
|
+
if (!sComponentId) {
|
|
203
|
+
if (oControl && typeof oControl.getParent === "function") {
|
|
204
|
+
var oParent = oControl.getParent();
|
|
205
|
+
if (oParent) {
|
|
206
|
+
return getComponentIdForControl(oParent);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return sComponentId || "";
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// determine UI5 component out of given control
|
|
214
|
+
if (oControl) {
|
|
215
|
+
var sComponentId = getComponentIdForControl(oControl);
|
|
216
|
+
if (sComponentId) {
|
|
217
|
+
return Component.get(sComponentId);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
250
220
|
},
|
|
251
221
|
|
|
252
222
|
/**
|
|
@@ -259,56 +229,8 @@ sap.ui.define([
|
|
|
259
229
|
* @ui5-restricted sap.ui.fl
|
|
260
230
|
*/
|
|
261
231
|
getAppComponentForControl: function(oControl) {
|
|
262
|
-
var oComponent = oControl instanceof Component ? oControl :
|
|
263
|
-
return this._getAppComponentForComponent(oComponent);
|
|
264
|
-
},
|
|
232
|
+
var oComponent = oControl instanceof Component ? oControl : Utils.getComponentForControl(oControl);
|
|
265
233
|
|
|
266
|
-
/**
|
|
267
|
-
* Returns an object with 'name' and 'version' of the App Component where the App Descriptor changes are saved
|
|
268
|
-
*
|
|
269
|
-
* @param {sap.ui.base.ManagedObject} oControl control or app component for which the flex controller should be instantiated
|
|
270
|
-
* @returns {Promise} Returns Object with name and version of Component for App Descriptor changes
|
|
271
|
-
*/
|
|
272
|
-
getAppDescriptorComponentObjectForControl: function(oControl) {
|
|
273
|
-
var oAppComponent = this.getAppComponentForControl(oControl);
|
|
274
|
-
var oManifest = oAppComponent.getManifest();
|
|
275
|
-
return {
|
|
276
|
-
name: this.getAppIdFromManifest(oManifest)
|
|
277
|
-
};
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Returns the Component that belongs to given control. If the control has no component, it walks up the control tree in order to find a
|
|
282
|
-
* control having one.
|
|
283
|
-
*
|
|
284
|
-
* @param {sap.ui.base.ManagedObject} oControl - Managed object instance
|
|
285
|
-
* @returns {sap.ui.core.Component|null} found component
|
|
286
|
-
* @private
|
|
287
|
-
*/
|
|
288
|
-
_getComponentForControl: function(oControl) {
|
|
289
|
-
var oComponent = null;
|
|
290
|
-
var sComponentId = null;
|
|
291
|
-
|
|
292
|
-
// determine UI5 component out of given control
|
|
293
|
-
if (oControl) {
|
|
294
|
-
sComponentId = Utils._getComponentIdForControl(oControl);
|
|
295
|
-
if (sComponentId) {
|
|
296
|
-
oComponent = Utils._getComponent(sComponentId);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
return oComponent;
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Returns the Component that belongs to given component whose type is "application".
|
|
305
|
-
*
|
|
306
|
-
* @param {sap.ui.core.Component} oComponent - SAPUI5 component
|
|
307
|
-
* @returns {sap.ui.core.Component|null} component instance if found or null
|
|
308
|
-
* @private
|
|
309
|
-
*/
|
|
310
|
-
_getAppComponentForComponent: function(oComponent) {
|
|
311
|
-
var oSapApp = null;
|
|
312
234
|
// special case for Fiori Elements to reach the real appComponent
|
|
313
235
|
if (oComponent && oComponent.getAppComponent && oComponent.getAppComponent() instanceof Component) {
|
|
314
236
|
return oComponent.getAppComponent();
|
|
@@ -320,19 +242,16 @@ sap.ui.define([
|
|
|
320
242
|
}
|
|
321
243
|
|
|
322
244
|
if (oComponent && oComponent.getManifestEntry) {
|
|
323
|
-
oSapApp = oComponent.getManifestEntry("sap.app");
|
|
324
|
-
} else {
|
|
325
|
-
// if no manifest entry
|
|
326
|
-
return oComponent;
|
|
327
|
-
}
|
|
245
|
+
var oSapApp = oComponent.getManifestEntry("sap.app");
|
|
328
246
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
247
|
+
if (oSapApp && oSapApp.type && oSapApp.type !== "application") {
|
|
248
|
+
if (oComponent instanceof Component) {
|
|
249
|
+
// we need to call this method only when the component is an instance of Component in order to walk up the tree
|
|
250
|
+
// returns owner app component
|
|
251
|
+
oComponent = Utils.getComponentForControl(oComponent);
|
|
252
|
+
}
|
|
253
|
+
return this.getAppComponentForControl(oComponent);
|
|
334
254
|
}
|
|
335
|
-
return this.getAppComponentForControl(oComponent);
|
|
336
255
|
}
|
|
337
256
|
|
|
338
257
|
return oComponent;
|
|
@@ -350,32 +269,16 @@ sap.ui.define([
|
|
|
350
269
|
* @ui5-restricted sap.ui.fl
|
|
351
270
|
*/
|
|
352
271
|
getViewForControl: function(oControl) {
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
|
|
356
|
-
getFirstAncestorOfControlWithControlType: function(oControl, controlType) {
|
|
357
|
-
if (oControl instanceof controlType) {
|
|
272
|
+
if (oControl instanceof View) {
|
|
358
273
|
return oControl;
|
|
359
274
|
}
|
|
360
275
|
|
|
361
276
|
if (oControl && typeof oControl.getParent === "function") {
|
|
362
277
|
oControl = oControl.getParent();
|
|
363
|
-
return Utils.
|
|
278
|
+
return Utils.getViewForControl(oControl);
|
|
364
279
|
}
|
|
365
280
|
},
|
|
366
281
|
|
|
367
|
-
/**
|
|
368
|
-
* Returns OwnerId of the control
|
|
369
|
-
*
|
|
370
|
-
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
371
|
-
* @returns {string} The owner id
|
|
372
|
-
* @see sap.ui.core.Component.getOwnerIdFor
|
|
373
|
-
* @private
|
|
374
|
-
*/
|
|
375
|
-
_getOwnerIdForControl: function(oControl) {
|
|
376
|
-
return Component.getOwnerIdFor(oControl);
|
|
377
|
-
},
|
|
378
|
-
|
|
379
282
|
/**
|
|
380
283
|
* Returns the tenant number for the communication with the ABAP back end.
|
|
381
284
|
*
|
|
@@ -389,30 +292,11 @@ sap.ui.define([
|
|
|
389
292
|
getClient: function() {
|
|
390
293
|
var oUriParams;
|
|
391
294
|
var sClient;
|
|
392
|
-
oUriParams =
|
|
295
|
+
oUriParams = UriParameters.fromQuery(window.location.search);
|
|
393
296
|
sClient = oUriParams.get("sap-client");
|
|
394
297
|
return sClient || undefined;
|
|
395
298
|
},
|
|
396
299
|
|
|
397
|
-
_getUriParameters: function() {
|
|
398
|
-
return UriParameters.fromQuery(window.location.search);
|
|
399
|
-
},
|
|
400
|
-
/**
|
|
401
|
-
* Returns whether the hot fix mode is active (url parameter hotfix=true)
|
|
402
|
-
*
|
|
403
|
-
* @private
|
|
404
|
-
* @ui5-restricted sap.ui.fl.apply.api.SmartVariantManagementApplyAPI
|
|
405
|
-
*
|
|
406
|
-
* @returns {boolean} is hotfix mode active, or not
|
|
407
|
-
*/
|
|
408
|
-
isHotfixMode: function() {
|
|
409
|
-
var oUriParams;
|
|
410
|
-
var sIsHotfixMode;
|
|
411
|
-
oUriParams = this._getUriParameters();
|
|
412
|
-
sIsHotfixMode = oUriParams.get("hotfix");
|
|
413
|
-
return (sIsHotfixMode === "true");
|
|
414
|
-
},
|
|
415
|
-
|
|
416
300
|
getLrepUrl: function() {
|
|
417
301
|
var aFlexibilityServices = Configuration.getFlexibilityServices();
|
|
418
302
|
var oLrepConfiguration = aFlexibilityServices.find(function(oServiceConfig) {
|
|
@@ -481,40 +365,6 @@ sap.ui.define([
|
|
|
481
365
|
}
|
|
482
366
|
},
|
|
483
367
|
|
|
484
|
-
/**
|
|
485
|
-
* Converts ASCII coding into a string. Required for restoring stored code extensions
|
|
486
|
-
*
|
|
487
|
-
* @param {string} ascii string containing ascii code valid numbers separated by ','
|
|
488
|
-
* @returns {string} parsedString parsed string
|
|
489
|
-
*/
|
|
490
|
-
asciiToString: function(ascii) {
|
|
491
|
-
var asciiArray = ascii.split(",");
|
|
492
|
-
var parsedString = "";
|
|
493
|
-
for (var i = 0; i < asciiArray.length; i++) {
|
|
494
|
-
parsedString += String.fromCharCode(asciiArray[i]);
|
|
495
|
-
}
|
|
496
|
-
return parsedString;
|
|
497
|
-
},
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Converts a string into ASCII coding. Required for restoring stored code extensions
|
|
501
|
-
*
|
|
502
|
-
* @param {string} string string which has to be encoded
|
|
503
|
-
* @returns {string} ascii imput parsed to ascii numbers separated by ','
|
|
504
|
-
*/
|
|
505
|
-
stringToAscii: function(string) {
|
|
506
|
-
var ascii = "";
|
|
507
|
-
|
|
508
|
-
for (var i = 0; i < string.length; i++) {
|
|
509
|
-
ascii += string.charCodeAt(i) + ",";
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
// remove last ","
|
|
513
|
-
ascii = ascii.substring(0, ascii.length - 1);
|
|
514
|
-
|
|
515
|
-
return ascii;
|
|
516
|
-
},
|
|
517
|
-
|
|
518
368
|
/**
|
|
519
369
|
* See {@link sap.ui.core.BaseTreeModifier#checkControlId} method
|
|
520
370
|
*/
|
|
@@ -531,16 +381,6 @@ sap.ui.define([
|
|
|
531
381
|
*/
|
|
532
382
|
hasLocalIdSuffix: BaseTreeModifier.hasLocalIdSuffix,
|
|
533
383
|
|
|
534
|
-
/**
|
|
535
|
-
* Returns the a string containing all url parameters of the current window.location
|
|
536
|
-
*
|
|
537
|
-
* @returns {string} Substring of url containing the url query parameters
|
|
538
|
-
* @private
|
|
539
|
-
*/
|
|
540
|
-
_getAllUrlParameters: function() {
|
|
541
|
-
return window.location.search.substring(1);
|
|
542
|
-
},
|
|
543
|
-
|
|
544
384
|
/**
|
|
545
385
|
* Returns URL hash when ushell container is available synchronously.
|
|
546
386
|
*
|
|
@@ -641,34 +481,15 @@ sap.ui.define([
|
|
|
641
481
|
return sRootNamespace;
|
|
642
482
|
},
|
|
643
483
|
|
|
644
|
-
/** Returns the type of "sap.app" from the manifest object passed.
|
|
645
|
-
* @param {sap.ui.core.Manifest} oManifest - Manifest object
|
|
646
|
-
* @returns {string|undefined} Manifest object's <code>type</code> property for <code>sap.app</code> entry
|
|
647
|
-
* @private
|
|
648
|
-
*/
|
|
649
|
-
_getComponentTypeFromManifest: function(oManifest) {
|
|
650
|
-
return oManifest && oManifest.getEntry && oManifest.getEntry("sap.app") && oManifest.getEntry("sap.app").type;
|
|
651
|
-
},
|
|
652
|
-
|
|
653
|
-
/** Returns the type of "sap.app" from the manifest object passed.
|
|
654
|
-
* @param {sap.ui.core.Manifest} oManifest - Raw manifest object
|
|
655
|
-
* @returns {string|undefined} Manifest object's <code>type</code> property for <code>sap.app</code> entry
|
|
656
|
-
* @private
|
|
657
|
-
*/
|
|
658
|
-
_getComponentTypeFromRawManifest: function(oManifest) {
|
|
659
|
-
return oManifest && oManifest["sap.app"] && oManifest["sap.app"].type;
|
|
660
|
-
},
|
|
661
|
-
|
|
662
484
|
/** Returns <code>true</code> if the passed manifest object is of type "application".
|
|
663
485
|
* @param {sap.ui.core.Manifest} oManifest - Manifest object
|
|
664
|
-
* @param {boolean} isRaw - is manifest raw object
|
|
665
486
|
* @returns {boolean} <code>true</code> if the passed manifest object is of type "application"
|
|
666
487
|
*
|
|
667
488
|
* @private
|
|
668
489
|
* @ui5-restricted sap.ui.fl
|
|
669
490
|
*/
|
|
670
|
-
isApplication: function(oManifest
|
|
671
|
-
var sComponentType =
|
|
491
|
+
isApplication: function(oManifest) {
|
|
492
|
+
var sComponentType = getComponentType(oManifest);
|
|
672
493
|
return sComponentType === "application";
|
|
673
494
|
},
|
|
674
495
|
|
|
@@ -691,34 +512,7 @@ sap.ui.define([
|
|
|
691
512
|
* @ui5-restricted sap.ui.fl
|
|
692
513
|
*/
|
|
693
514
|
isEmbeddedComponent: function(oComponent) {
|
|
694
|
-
return oComponent instanceof Component &&
|
|
695
|
-
},
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Returns the descriptor Id, which is always the reference for descriptor changes
|
|
699
|
-
*
|
|
700
|
-
* @param {object|sap.ui.core.Manifest} oManifest - Manifest of the component
|
|
701
|
-
* @returns {string} Version of application if it is available in the manifest, otherwise an empty string
|
|
702
|
-
*
|
|
703
|
-
* @private
|
|
704
|
-
* @ui5-restricted sap.ui.fl
|
|
705
|
-
*/
|
|
706
|
-
getAppIdFromManifest: function(oManifest) {
|
|
707
|
-
if (oManifest) {
|
|
708
|
-
var oSapApp = (oManifest.getEntry) ? oManifest.getEntry("sap.app") : oManifest["sap.app"];
|
|
709
|
-
var sAppId = oSapApp && oSapApp.id;
|
|
710
|
-
if (sAppId === Utils.APP_ID_AT_DESIGN_TIME) {
|
|
711
|
-
if (oManifest.getComponentName) {
|
|
712
|
-
return oManifest.getComponentName();
|
|
713
|
-
}
|
|
714
|
-
if (oManifest.name) {
|
|
715
|
-
return oManifest.name;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
return sAppId;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
throw new Error("No Manifest received, descriptor changes are not possible");
|
|
515
|
+
return oComponent instanceof Component && getComponentType(oComponent.getManifestObject()) === "component";
|
|
722
516
|
},
|
|
723
517
|
|
|
724
518
|
/**
|
|
@@ -893,7 +687,7 @@ sap.ui.define([
|
|
|
893
687
|
*
|
|
894
688
|
* @param {map} mChanges Map of all changes
|
|
895
689
|
* @param {string} sChangeId Id of the change that should be retrieved
|
|
896
|
-
* @returns {sap.ui.fl.
|
|
690
|
+
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject | undefined} Returns the change if it is in the map, otherwise undefined
|
|
897
691
|
*/
|
|
898
692
|
getChangeFromChangesMap: function(mChanges, sChangeId) {
|
|
899
693
|
var oResult;
|
|
@@ -6,13 +6,28 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/FlexControllerFactory",
|
|
9
|
+
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
9
10
|
"sap/ui/fl/Utils"
|
|
10
11
|
], function(
|
|
11
12
|
OldFlexControllerFactory,
|
|
13
|
+
ManifestUtils,
|
|
12
14
|
FlexUtils
|
|
13
15
|
) {
|
|
14
16
|
"use strict";
|
|
15
17
|
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Returns an object with 'name' and 'version' of the App Component where the App Descriptor changes are saved
|
|
22
|
+
*
|
|
23
|
+
* @param {sap.ui.base.ManagedObject} oControl control or app component for which the flex controller should be instantiated
|
|
24
|
+
* @returns {string} Returns name of Component for App Descriptor changes
|
|
25
|
+
*/
|
|
26
|
+
function getAppDescriptorComponentObjectForControl(oControl) {
|
|
27
|
+
var oManifest = FlexUtils.getAppDescriptor(oControl);
|
|
28
|
+
return ManifestUtils.getAppIdFromManifest(oManifest);
|
|
29
|
+
}
|
|
30
|
+
|
|
16
31
|
var ChangesController = {
|
|
17
32
|
/**
|
|
18
33
|
* Returns the FlexController of the app component where the UI changes are saved
|
|
@@ -39,8 +54,8 @@ sap.ui.define([
|
|
|
39
54
|
return OldFlexControllerFactory.create(vSelector.appId);
|
|
40
55
|
}
|
|
41
56
|
var oAppComponent = vSelector.appComponent || vSelector;
|
|
42
|
-
var
|
|
43
|
-
return OldFlexControllerFactory.create(
|
|
57
|
+
var sAppId = getAppDescriptorComponentObjectForControl(oAppComponent);
|
|
58
|
+
return OldFlexControllerFactory.create(sAppId);
|
|
44
59
|
},
|
|
45
60
|
|
|
46
61
|
/**
|
|
@@ -287,7 +287,7 @@ sap.ui.define([
|
|
|
287
287
|
/**
|
|
288
288
|
* Applying a specific change on the passed control, if it is not already applied.
|
|
289
289
|
*
|
|
290
|
-
* @param {sap.ui.fl.
|
|
290
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change object which should be applied on the passed control
|
|
291
291
|
* @param {sap.ui.core.Control} oControl - Control which is the target of the passed change
|
|
292
292
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
293
293
|
* @param {object} mPropertyBag.view - View to process
|
|
@@ -422,7 +422,7 @@ sap.ui.define([
|
|
|
422
422
|
* @param {string} mPropertyBag.viewId - ID of the processed view
|
|
423
423
|
* @param {string} mPropertyBag.appComponent - Application component instance responsible for the view
|
|
424
424
|
* @param {object} mPropertyBag.modifier - Polymorph reuse operations handling the changes on the given view type
|
|
425
|
-
* @param {sap.ui.fl.
|
|
425
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} aChanges List of flexibility changes on controls for the current processed view
|
|
426
426
|
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Promise that is resolved after all changes were reverted in asynchronous case or FakePromise for the synchronous processing scenario including view object in both cases
|
|
427
427
|
*/
|
|
428
428
|
applyAllChangesForXMLView: function(mPropertyBag, aChanges) {
|