@openui5/sap.ui.fl 1.108.0 → 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 +32 -26
- 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
|
@@ -27,16 +27,73 @@ function(
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
function getFlexReference(mPropertyBag) {
|
|
31
|
+
var oManifest = mPropertyBag.manifest;
|
|
32
|
+
var oComponentData = mPropertyBag.componentData || {};
|
|
33
|
+
|
|
34
|
+
// support of old app variants
|
|
35
|
+
if (oComponentData.startupParameters) {
|
|
36
|
+
if (Array.isArray(oComponentData.startupParameters["sap-app-id"])) {
|
|
37
|
+
return oComponentData.startupParameters["sap-app-id"][0];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var oSapUi5Entry = oManifest.getEntry ? oManifest.getEntry("sap.ui5") : oManifest["sap.ui5"];
|
|
42
|
+
if (oSapUi5Entry) {
|
|
43
|
+
if (oSapUi5Entry.appVariantId) {
|
|
44
|
+
return oSapUi5Entry.appVariantId;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (oSapUi5Entry.componentName) {
|
|
48
|
+
return appendComponentToReference(oSapUi5Entry.componentName);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return appendComponentToReference(getAppIdFromManifest(oManifest));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function getAppIdFromManifest(oManifest) {
|
|
56
|
+
if (oManifest) {
|
|
57
|
+
var APP_ID_AT_DESIGN_TIME = "${pro" + "ject.art" + "ifactId}"; //avoid replaced by content of ${project.artifactId} placeholder at build steps
|
|
58
|
+
var oSapApp = (oManifest.getEntry) ? oManifest.getEntry("sap.app") : oManifest["sap.app"];
|
|
59
|
+
var sAppId = oSapApp && oSapApp.id;
|
|
60
|
+
if (sAppId === APP_ID_AT_DESIGN_TIME) {
|
|
61
|
+
if (oManifest.getComponentName) {
|
|
62
|
+
return oManifest.getComponentName();
|
|
63
|
+
}
|
|
64
|
+
if (oManifest.name) {
|
|
65
|
+
return oManifest.name;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return sAppId;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
throw new Error("No Manifest received, descriptor changes are not possible");
|
|
72
|
+
}
|
|
73
|
+
|
|
30
74
|
/**
|
|
31
75
|
* Provides utility functions for handling manifests; All function work with Manifest Objects or raw manifests
|
|
32
76
|
*
|
|
33
77
|
* @namespace sap.ui.fl.apply._internal.flexState.ManifestUtils
|
|
34
78
|
* @experimental
|
|
35
79
|
* @since 1.74
|
|
36
|
-
* @version 1.
|
|
80
|
+
* @version 1.109.0
|
|
37
81
|
* @private
|
|
38
82
|
*/
|
|
39
83
|
var ManifestUtils = {
|
|
84
|
+
/**
|
|
85
|
+
* Returns the descriptor Id, which is always the reference for descriptor changes
|
|
86
|
+
*
|
|
87
|
+
* @param {object|sap.ui.core.Manifest} oManifest - Manifest of the component
|
|
88
|
+
* @returns {string} Version of application if it is available in the manifest, otherwise an empty string
|
|
89
|
+
*
|
|
90
|
+
* @private
|
|
91
|
+
* @ui5-restricted sap.ui.fl
|
|
92
|
+
*/
|
|
93
|
+
getAppIdFromManifest: getAppIdFromManifest,
|
|
94
|
+
|
|
95
|
+
getFlexReference: getFlexReference,
|
|
96
|
+
|
|
40
97
|
/** Determines the flex reference for a given control by
|
|
41
98
|
* identifying the application component and analyzing the manifest of this component.
|
|
42
99
|
*
|
|
@@ -45,37 +102,12 @@ function(
|
|
|
45
102
|
*/
|
|
46
103
|
getFlexReferenceForControl: function (oControl) {
|
|
47
104
|
var oAppComponent = Utils.getAppComponentForControl(oControl);
|
|
48
|
-
return oAppComponent &&
|
|
105
|
+
return oAppComponent && getFlexReference({
|
|
49
106
|
manifest: oAppComponent.getManifestObject(),
|
|
50
107
|
componentData: oAppComponent.getComponentData()
|
|
51
108
|
});
|
|
52
109
|
},
|
|
53
110
|
|
|
54
|
-
getFlexReference: function(mPropertyBag) {
|
|
55
|
-
var oManifest = mPropertyBag.manifest;
|
|
56
|
-
var oComponentData = mPropertyBag.componentData || {};
|
|
57
|
-
|
|
58
|
-
// support of old app variants
|
|
59
|
-
if (oComponentData.startupParameters) {
|
|
60
|
-
if (Array.isArray(oComponentData.startupParameters["sap-app-id"])) {
|
|
61
|
-
return oComponentData.startupParameters["sap-app-id"][0];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var oSapUi5Entry = oManifest.getEntry ? oManifest.getEntry("sap.ui5") : oManifest["sap.ui5"];
|
|
66
|
-
if (oSapUi5Entry) {
|
|
67
|
-
if (oSapUi5Entry.appVariantId) {
|
|
68
|
-
return oSapUi5Entry.appVariantId;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (oSapUi5Entry.componentName) {
|
|
72
|
-
return appendComponentToReference(oSapUi5Entry.componentName);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return appendComponentToReference(Utils.getAppIdFromManifest(oManifest));
|
|
77
|
-
},
|
|
78
|
-
|
|
79
111
|
getOvpEntry: function (oManifest) {
|
|
80
112
|
return oManifest.getEntry ? oManifest.getEntry("sap.ovp") : oManifest["sap.ovp"];
|
|
81
113
|
},
|
|
@@ -100,13 +132,12 @@ function(
|
|
|
100
132
|
if (oFlAsyncHint) {
|
|
101
133
|
return false;
|
|
102
134
|
}
|
|
103
|
-
|
|
104
135
|
return true;
|
|
105
136
|
},
|
|
106
137
|
|
|
107
138
|
getBaseComponentNameFromManifest: function(oManifest) {
|
|
108
139
|
var oSapUi5Entry = oManifest.getEntry ? oManifest.getEntry("sap.ui5") : oManifest["sap.ui5"];
|
|
109
|
-
return oSapUi5Entry && oSapUi5Entry.componentName ||
|
|
140
|
+
return oSapUi5Entry && oSapUi5Entry.componentName || getAppIdFromManifest(oManifest);
|
|
110
141
|
},
|
|
111
142
|
|
|
112
143
|
isFlexExtensionPointHandlingEnabled: function (oView) {
|
package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/
|
|
8
|
+
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory"
|
|
9
9
|
], function(
|
|
10
|
-
|
|
10
|
+
FlexObjectFactory
|
|
11
11
|
) {
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
@@ -31,7 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
//TODO: add filtering for condensable changeTypes once necessary
|
|
32
32
|
|
|
33
33
|
var aChanges = aChangeDefinitions.map(function(oChangeDefinition) {
|
|
34
|
-
return
|
|
34
|
+
return FlexObjectFactory.createFromFileContent(oChangeDefinition);
|
|
35
35
|
});
|
|
36
36
|
return {
|
|
37
37
|
appDescriptorChanges: aChanges
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* @namespace sap.ui.fl.apply._internal.flexState.changes.DependencyHandler
|
|
24
24
|
* @experimental
|
|
25
25
|
* @since 1.74
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.109.0
|
|
27
27
|
* @private
|
|
28
28
|
* @ui5-restricted sap.ui.fl
|
|
29
29
|
*/
|
|
@@ -245,7 +245,7 @@ sap.ui.define([
|
|
|
245
245
|
/**
|
|
246
246
|
* Adds a change to the map and adds the dependencies to the changes map
|
|
247
247
|
*
|
|
248
|
-
* @param {sap.ui.fl.
|
|
248
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change instance
|
|
249
249
|
* @param {sap.ui.core.UIComponent} oAppComponent - Component instance to get the whole ID for the control
|
|
250
250
|
* @param {object} mChangesMap - Map with changes and dependencies
|
|
251
251
|
*/
|
|
@@ -257,9 +257,9 @@ sap.ui.define([
|
|
|
257
257
|
/**
|
|
258
258
|
* Insert Change into changes map positioned right after the referenced change
|
|
259
259
|
*
|
|
260
|
-
* @param {sap.ui.fl.
|
|
260
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change instance
|
|
261
261
|
* @param {object} mChangesMap - Map with changes and dependencies
|
|
262
|
-
* @param {sap.ui.fl.
|
|
262
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oReferenceChange - Refernce change. New change is positioned right after this one in the changes map
|
|
263
263
|
*/
|
|
264
264
|
DependencyHandler.insertChange = function(oChange, mChangesMap, oReferenceChange) {
|
|
265
265
|
var iIndex = mChangesMap && mChangesMap.aChanges && mChangesMap.aChanges.indexOf(oReferenceChange);
|
|
@@ -271,7 +271,7 @@ sap.ui.define([
|
|
|
271
271
|
/**
|
|
272
272
|
* Adds a change to the map during runtime and adds the dependencies to the initial changes map
|
|
273
273
|
*
|
|
274
|
-
* @param {sap.ui.fl.
|
|
274
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange - Change instance
|
|
275
275
|
* @param {sap.ui.core.UIComponent} oAppComponent - Component instance to get the whole ID for the control
|
|
276
276
|
* @param {object} mChangesMap - Map with changes and dependencies
|
|
277
277
|
* @param {object} mInitialChangesMap - Initial map with changes and dependencies
|
|
@@ -301,7 +301,7 @@ sap.ui.define([
|
|
|
301
301
|
* Saves a function in the dependency that will be called as soon as the dependency is resolved.
|
|
302
302
|
*
|
|
303
303
|
* @param {object} mChangesMap - Changes map
|
|
304
|
-
* @param {sap.ui.fl.
|
|
304
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} sChangeId - Change ID
|
|
305
305
|
* @param {function} fnCallback - Function that will be saved in the dependency
|
|
306
306
|
*/
|
|
307
307
|
DependencyHandler.addChangeApplyCallbackToDependency = function(mChangesMap, sChangeId, fnCallback) {
|
|
@@ -417,7 +417,7 @@ sap.ui.define([
|
|
|
417
417
|
* @param {object} mChangesMap - Map with changes and dependencies
|
|
418
418
|
* @param {object} sControlId - ID of the control
|
|
419
419
|
* @param {sap.ui.core.Component} oAppComponent - Application component instance that is currently loading
|
|
420
|
-
* @returns {sap.ui.fl.
|
|
420
|
+
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} Array of all open dependent changes for the control
|
|
421
421
|
*/
|
|
422
422
|
DependencyHandler.getOpenDependentChangesForControl = function(mChangesMap, sControlId, oAppComponent) {
|
|
423
423
|
var aDependentChanges = [];
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @namespace sap.ui.fl.apply._internal.flexState.changes.ExtensionPointState
|
|
29
29
|
* @experimental Since 1.79
|
|
30
30
|
* @since 1.79
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.109.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted
|
|
34
34
|
*/
|
|
@@ -67,7 +67,7 @@ sap.ui.define([
|
|
|
67
67
|
if (bOriginalSelectorNeedsToBeAdjusted) {
|
|
68
68
|
oChange.originalSelectorToBeAdjusted = mOriginalSelector;
|
|
69
69
|
} else {
|
|
70
|
-
oChange.
|
|
70
|
+
oChange.setDependentSelectors({originalSelector: mOriginalSelector});
|
|
71
71
|
}
|
|
72
72
|
oChange.setContent({boundAggregation: oExtensionPoint.closestAggregationBinding});
|
|
73
73
|
} else {
|
|
@@ -158,7 +158,9 @@ sap.ui.define([
|
|
|
158
158
|
//Set correct selector from extension point targetControl's ID
|
|
159
159
|
replaceChangeSelector(oRuntimeOnlyChange, mExtensionPointInfo, true);
|
|
160
160
|
oRuntimeOnlyChange.setExtensionPointInfo(mExtensionPointInfo);
|
|
161
|
-
oRuntimeOnlyChange.
|
|
161
|
+
var oFlexObjectMetadata = oRuntimeOnlyChange.getFlexObjectMetadata();
|
|
162
|
+
oFlexObjectMetadata.moduleName = oChange.getFlexObjectMetadata().moduleName;
|
|
163
|
+
oRuntimeOnlyChange.setFlexObjectMetadata(oFlexObjectMetadata);
|
|
162
164
|
oRuntimeOnlyChange.setCreation(oChange.getCreation());
|
|
163
165
|
oChangePersistence.addChangeAndUpdateDependencies(mPropertyBag.appComponent, oRuntimeOnlyChange, oChange);
|
|
164
166
|
})
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/Change"
|
|
9
8
|
], function(
|
|
10
|
-
Change
|
|
11
9
|
) {
|
|
12
10
|
"use strict";
|
|
13
11
|
|
|
@@ -23,16 +21,7 @@ sap.ui.define([
|
|
|
23
21
|
*
|
|
24
22
|
* @param {object} mPropertyBag - Contains additional data needed for preparing the map
|
|
25
23
|
* @param {object} mPropertyBag.storageResponse - Storage response with the flex data
|
|
26
|
-
* @returns {object} The prepared map for changes
|
|
27
24
|
*/
|
|
28
|
-
return function(mPropertyBag) {
|
|
29
|
-
var aChangeDefinitions = mPropertyBag.storageResponse.changes.changes;
|
|
30
|
-
var aChanges = aChangeDefinitions.map(function(oChangeDefinition) {
|
|
31
|
-
return new Change(oChangeDefinition);
|
|
32
|
-
});
|
|
33
|
-
// TODO create dependency map and return it
|
|
34
|
-
return {
|
|
35
|
-
changes: aChanges
|
|
36
|
-
};
|
|
25
|
+
return function(/* mPropertyBag */) {
|
|
37
26
|
};
|
|
38
27
|
});
|
|
@@ -117,7 +117,7 @@ sap.ui.define([
|
|
|
117
117
|
*
|
|
118
118
|
* @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
|
|
119
119
|
* @since 1.86
|
|
120
|
-
* @version 1.
|
|
120
|
+
* @version 1.109.0
|
|
121
121
|
* @private
|
|
122
122
|
* @ui5-restricted sap.ui.fl
|
|
123
123
|
*/
|
|
@@ -182,7 +182,7 @@ sap.ui.define([
|
|
|
182
182
|
*
|
|
183
183
|
* @function
|
|
184
184
|
* @since 1.89
|
|
185
|
-
* @version 1.
|
|
185
|
+
* @version 1.109.0
|
|
186
186
|
* @private
|
|
187
187
|
* @ui5-restricted sap.ui.fl
|
|
188
188
|
*
|
|
@@ -59,9 +59,9 @@ sap.ui.define([
|
|
|
59
59
|
if (sSubSection === "variants") {
|
|
60
60
|
oFlexObject = FlexObjectFactory.createCompVariant(oCompVariantChangeDefinition);
|
|
61
61
|
} else {
|
|
62
|
-
oFlexObject =
|
|
62
|
+
oFlexObject = FlexObjectFactory.createFromFileContent(oCompVariantChangeDefinition, UpdatableChange);
|
|
63
63
|
}
|
|
64
|
-
oFlexObject.setState(States.PERSISTED); // prevent persisting these anew
|
|
64
|
+
oFlexObject.setState(States.LifecycleState.PERSISTED); // prevent persisting these anew
|
|
65
65
|
return oFlexObject;
|
|
66
66
|
});
|
|
67
67
|
|
|
@@ -15,7 +15,6 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
16
16
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
17
17
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
18
|
-
"sap/ui/fl/Change",
|
|
19
18
|
"sap/ui/fl/LayerUtils",
|
|
20
19
|
"sap/ui/fl/Utils"
|
|
21
20
|
], function(
|
|
@@ -29,7 +28,6 @@ sap.ui.define([
|
|
|
29
28
|
VariantsApplyUtil,
|
|
30
29
|
States,
|
|
31
30
|
FlexState,
|
|
32
|
-
Change,
|
|
33
31
|
LayerUtils,
|
|
34
32
|
Utils
|
|
35
33
|
) {
|
|
@@ -41,7 +39,7 @@ sap.ui.define([
|
|
|
41
39
|
* @namespace sap.ui.fl.apply._internal.flexState.controlVariants.VariantManagementState
|
|
42
40
|
* @experimental Since 1.74
|
|
43
41
|
* @since 1.74
|
|
44
|
-
* @version 1.
|
|
42
|
+
* @version 1.109.0
|
|
45
43
|
* @private
|
|
46
44
|
* @ui5-restricted
|
|
47
45
|
*/
|
|
@@ -172,7 +170,7 @@ sap.ui.define([
|
|
|
172
170
|
* @param {string} mPropertyBag.reference - Component reference
|
|
173
171
|
* @param {boolean} [mPropertyBag.includeDirtyChanges] - Whether dirty changes of the current session should be included, <code>true</code> by default
|
|
174
172
|
*
|
|
175
|
-
* @returns {object[]|sap.ui.fl.
|
|
173
|
+
* @returns {object[]|sap.ui.fl.apply._internal.flexObjects.FlexObject[]} All changes of the variant
|
|
176
174
|
* @private
|
|
177
175
|
* @ui5-restricted
|
|
178
176
|
*/
|
|
@@ -183,7 +181,7 @@ sap.ui.define([
|
|
|
183
181
|
aResult = oVariant.controlChanges.filter(function(oChange) {
|
|
184
182
|
return (
|
|
185
183
|
mPropertyBag.includeDirtyChanges !== false
|
|
186
|
-
|| oChange.getState() ===
|
|
184
|
+
|| oChange.getState() === States.LifecycleState.PERSISTED
|
|
187
185
|
);
|
|
188
186
|
});
|
|
189
187
|
}
|
|
@@ -287,7 +285,7 @@ sap.ui.define([
|
|
|
287
285
|
* Removes a variant from a variant management reference.
|
|
288
286
|
*
|
|
289
287
|
* @param {object} mPropertyBag - Object with the necessary properties
|
|
290
|
-
* @param {sap.ui.fl.
|
|
288
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlVariant} mPropertyBag.variant - Variant to be removed
|
|
291
289
|
* @param {string} mPropertyBag.vmReference - Variant management reference
|
|
292
290
|
* @param {string} mPropertyBag.reference - Component reference
|
|
293
291
|
*
|
|
@@ -350,7 +348,7 @@ sap.ui.define([
|
|
|
350
348
|
* Add a control change to a variant.
|
|
351
349
|
*
|
|
352
350
|
* @param {object} mPropertyBag - Object with the necessary properties
|
|
353
|
-
* @param {sap.ui.fl.
|
|
351
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} mPropertyBag.change - Control change
|
|
354
352
|
* @param {string} mPropertyBag.vmReference - Variant management reference
|
|
355
353
|
* @param {string} mPropertyBag.vReference - Variant reference
|
|
356
354
|
* @param {string} mPropertyBag.reference - Component reference
|
|
@@ -377,7 +375,7 @@ sap.ui.define([
|
|
|
377
375
|
* Removes a control change from a variant.
|
|
378
376
|
*
|
|
379
377
|
* @param {object} mPropertyBag - Object with the necessary properties
|
|
380
|
-
* @param {sap.ui.fl.
|
|
378
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} mPropertyBag.change - Control change
|
|
381
379
|
* @param {string} mPropertyBag.vmReference - Variant management reference
|
|
382
380
|
* @param {string} mPropertyBag.vReference - Variant reference
|
|
383
381
|
* @param {string} mPropertyBag.reference - Component reference
|
|
@@ -533,7 +531,7 @@ sap.ui.define([
|
|
|
533
531
|
* @param {object} mPropertyBag - Object with the necessary properties
|
|
534
532
|
* @param {string} mPropertyBag.reference - Flex reference
|
|
535
533
|
* @param {string} mPropertyBag.content - Variant section content
|
|
536
|
-
* @param {sap.ui.fl.
|
|
534
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject | sap.ui.fl.apply._internal.flexObjects.FlVariant} mPropertyBag.changeToBeAddedOrDeleted - Flex object to be added or deleted
|
|
537
535
|
*
|
|
538
536
|
* @private
|
|
539
537
|
* @ui5-restricted
|
|
@@ -553,10 +551,10 @@ sap.ui.define([
|
|
|
553
551
|
|
|
554
552
|
if (mPropertyBag.changeToBeAddedOrDeleted) {
|
|
555
553
|
switch (mPropertyBag.changeToBeAddedOrDeleted.getState()) {
|
|
556
|
-
case States.NEW:
|
|
554
|
+
case States.LifecycleState.NEW:
|
|
557
555
|
addChange(mPropertyBag.changeToBeAddedOrDeleted.convertToFileContent(), oFlexObjects);
|
|
558
556
|
break;
|
|
559
|
-
case States.DELETE:
|
|
557
|
+
case States.LifecycleState.DELETE:
|
|
560
558
|
deleteChange(mPropertyBag.changeToBeAddedOrDeleted.convertToFileContent(), oFlexObjects);
|
|
561
559
|
break;
|
|
562
560
|
default:
|
|
@@ -14,8 +14,9 @@ sap.ui.define([
|
|
|
14
14
|
"sap/base/Log",
|
|
15
15
|
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
16
16
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
17
|
-
"sap/ui/fl/
|
|
18
|
-
"sap/ui/fl/LayerUtils"
|
|
17
|
+
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
18
|
+
"sap/ui/fl/LayerUtils",
|
|
19
|
+
"sap/ui/fl/registry/Settings"
|
|
19
20
|
], function(
|
|
20
21
|
each,
|
|
21
22
|
includes,
|
|
@@ -26,8 +27,9 @@ sap.ui.define([
|
|
|
26
27
|
Log,
|
|
27
28
|
VariantsApplyUtil,
|
|
28
29
|
FlexObjectFactory,
|
|
29
|
-
|
|
30
|
-
LayerUtils
|
|
30
|
+
States,
|
|
31
|
+
LayerUtils,
|
|
32
|
+
Settings
|
|
31
33
|
) {
|
|
32
34
|
"use strict";
|
|
33
35
|
|
|
@@ -50,8 +52,8 @@ sap.ui.define([
|
|
|
50
52
|
function addVariantDependentControlChanges(oVariantsMap, aVariantDependentChanges, sReference) {
|
|
51
53
|
var oVariantsMapClone = merge({}, oVariantsMap);
|
|
52
54
|
aVariantDependentChanges.forEach(function(oChange) {
|
|
53
|
-
var oChangeInstance =
|
|
54
|
-
oChangeInstance.setState(
|
|
55
|
+
var oChangeInstance = FlexObjectFactory.createFromFileContent(oChange);
|
|
56
|
+
oChangeInstance.setState(States.LifecycleState.PERSISTED);
|
|
55
57
|
var oVariantEntry = oVariantsMapClone[oChange.variantReference];
|
|
56
58
|
oVariantEntry = oVariantEntry || createStandardVariant(oChange.variantReference, sReference);
|
|
57
59
|
oVariantEntry.controlChanges.push(oChangeInstance);
|
|
@@ -124,6 +126,23 @@ sap.ui.define([
|
|
|
124
126
|
return oReferencedVariant;
|
|
125
127
|
}
|
|
126
128
|
|
|
129
|
+
// add missing user id (for variants created on the same session)
|
|
130
|
+
function addMissingUser(oVariantsMap) {
|
|
131
|
+
var oVariantsMapClone = merge({}, oVariantsMap);
|
|
132
|
+
values(oVariantsMapClone).forEach(function(oVariantEntry) {
|
|
133
|
+
var mSupportInformation = oVariantEntry.instance.getSupportInformation();
|
|
134
|
+
if (!mSupportInformation.user) {
|
|
135
|
+
var sUserId = Settings.getInstanceOrUndef() && Settings.getInstanceOrUndef().getUserId();
|
|
136
|
+
if (sUserId) {
|
|
137
|
+
mSupportInformation.user = sUserId;
|
|
138
|
+
oVariantEntry.instance.setSupportInformation(mSupportInformation);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
return oVariantsMapClone;
|
|
144
|
+
}
|
|
145
|
+
|
|
127
146
|
// prepares initial map for variants
|
|
128
147
|
function getVariantsMap(oStorageResponse, sReference) {
|
|
129
148
|
var oVariantsMap = {};
|
|
@@ -133,6 +152,7 @@ sap.ui.define([
|
|
|
133
152
|
oVariantsMap = addVariantChanges(oVariantsMap, oStorageResponse.variantChanges, sReference);
|
|
134
153
|
oVariantsMap = filterInvisibleVariants(oVariantsMap);
|
|
135
154
|
oVariantsMap = resolveReferences(oVariantsMap, sReference);
|
|
155
|
+
oVariantsMap = addMissingUser(oVariantsMap);
|
|
136
156
|
|
|
137
157
|
return oVariantsMap;
|
|
138
158
|
}
|
|
@@ -300,7 +320,7 @@ sap.ui.define([
|
|
|
300
320
|
|
|
301
321
|
function getActiveChange(aChanges) {
|
|
302
322
|
if (aChanges.length > 0) {
|
|
303
|
-
return
|
|
323
|
+
return FlexObjectFactory.createFromFileContent(aChanges[aChanges.length - 1]);
|
|
304
324
|
}
|
|
305
325
|
return false;
|
|
306
326
|
}
|
|
@@ -14,7 +14,7 @@ sap.ui.define(["sap/ui/core/Core"], function(oCore) {
|
|
|
14
14
|
* @alias sap.ui.fl.apply._internal.preprocessors.EventHistory
|
|
15
15
|
* @experimental Since 1.47.0
|
|
16
16
|
* @author SAP SE
|
|
17
|
-
* @version 1.
|
|
17
|
+
* @version 1.109.0
|
|
18
18
|
*
|
|
19
19
|
* @private
|
|
20
20
|
* @ui5-restricted sap.ui.fl.apply._internal.preprocessors.RegistrationDelegator
|
|
@@ -10,7 +10,6 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/core/Core",
|
|
11
11
|
"sap/ui/core/Element",
|
|
12
12
|
"sap/ui/fl/apply/_internal/controlVariants/URLHandler",
|
|
13
|
-
"sap/ui/fl/variants/VariantManagement",
|
|
14
13
|
"sap/ui/fl/Utils"
|
|
15
14
|
], function(
|
|
16
15
|
Log,
|
|
@@ -18,21 +17,30 @@ sap.ui.define([
|
|
|
18
17
|
Core,
|
|
19
18
|
Element,
|
|
20
19
|
URLHandler,
|
|
21
|
-
VariantManagement,
|
|
22
20
|
Utils
|
|
23
21
|
) {
|
|
24
22
|
"use strict";
|
|
25
23
|
|
|
24
|
+
var VARIANT_MODEL_NAME = "$FlexVariants";
|
|
25
|
+
|
|
26
26
|
/**
|
|
27
27
|
* Provides an API for applications to work with control variants. See also {@link sap.ui.fl.variants.VariantManagement}.
|
|
28
28
|
*
|
|
29
29
|
* @name sap.ui.fl.apply.api.ControlVariantApplyAPI
|
|
30
30
|
* @experimental Since 1.67
|
|
31
31
|
* @since 1.67
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.109.0
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
35
|
var ControlVariantApplyAPI = /** @lends sap.ui.fl.apply.api.ControlVariantApplyAPI */{
|
|
36
|
+
/**
|
|
37
|
+
* Returns the name of the Variant Model
|
|
38
|
+
*
|
|
39
|
+
* @returns {string} Name of the Variant Model
|
|
40
|
+
*/
|
|
41
|
+
getVariantModelName: function() {
|
|
42
|
+
return VARIANT_MODEL_NAME;
|
|
43
|
+
},
|
|
36
44
|
|
|
37
45
|
/**
|
|
38
46
|
* Clears URL technical parameter <code>sap-ui-fl-control-variant-id</code> for control variants.
|
|
@@ -48,7 +56,7 @@ sap.ui.define([
|
|
|
48
56
|
clearVariantParameterInURL: function (mPropertyBag) {
|
|
49
57
|
var aUpdatedVariantParameters;
|
|
50
58
|
var oAppComponent = Utils.getAppComponentForControl(mPropertyBag.control);
|
|
51
|
-
var oVariantModel = oAppComponent && oAppComponent.getModel(
|
|
59
|
+
var oVariantModel = oAppComponent && oAppComponent.getModel(VARIANT_MODEL_NAME);
|
|
52
60
|
if (!oVariantModel) {
|
|
53
61
|
//technical parameters are not updated, only URL hash is updated
|
|
54
62
|
Log.error("Variant model could not be found on the provided control");
|
|
@@ -56,7 +64,7 @@ sap.ui.define([
|
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
//check if variant for the passed variant management control is present
|
|
59
|
-
if (mPropertyBag.control
|
|
67
|
+
if (mPropertyBag.control.isA("sap.ui.fl.variants.VariantManagement")) {
|
|
60
68
|
var sVariantManagementReference = oVariantModel.getLocalId(mPropertyBag.control.getId(), oAppComponent);
|
|
61
69
|
var mCleansedParametersWithIndex = URLHandler.removeURLParameterForVariantManagement({
|
|
62
70
|
model: oVariantModel,
|
|
@@ -112,7 +120,7 @@ sap.ui.define([
|
|
|
112
120
|
return logAndReject(Error("A valid variant management control or component (instance or ID) should be passed as parameter"));
|
|
113
121
|
}
|
|
114
122
|
|
|
115
|
-
var oVariantModel = oAppComponent.getModel(
|
|
123
|
+
var oVariantModel = oAppComponent.getModel(VARIANT_MODEL_NAME);
|
|
116
124
|
if (!oVariantModel) {
|
|
117
125
|
return logAndReject(Error("No variant management model found for the passed control or application component"));
|
|
118
126
|
}
|
|
@@ -155,7 +163,7 @@ sap.ui.define([
|
|
|
155
163
|
attachVariantApplied: function(mPropertyBag) {
|
|
156
164
|
var oControl = mPropertyBag.selector.id && sap.ui.getCore().byId(mPropertyBag.selector.id) || mPropertyBag.selector;
|
|
157
165
|
var oAppComponent = Utils.getAppComponentForControl(oControl);
|
|
158
|
-
var oVariantModel = oAppComponent.getModel(
|
|
166
|
+
var oVariantModel = oAppComponent.getModel(VARIANT_MODEL_NAME);
|
|
159
167
|
|
|
160
168
|
oVariantModel.attachVariantApplied({
|
|
161
169
|
vmControlId: mPropertyBag.vmControlId,
|
|
@@ -177,7 +185,7 @@ sap.ui.define([
|
|
|
177
185
|
detachVariantApplied: function(mPropertyBag) {
|
|
178
186
|
var oControl = mPropertyBag.selector.id && sap.ui.getCore().byId(mPropertyBag.selector.id) || mPropertyBag.selector;
|
|
179
187
|
var oAppComponent = Utils.getAppComponentForControl(oControl);
|
|
180
|
-
var oVariantModel = oAppComponent.getModel(
|
|
188
|
+
var oVariantModel = oAppComponent.getModel(VARIANT_MODEL_NAME);
|
|
181
189
|
oVariantModel.detachVariantApplied(mPropertyBag.vmControlId, oControl.getId());
|
|
182
190
|
}
|
|
183
191
|
};
|