@openui5/sap.ui.fl 1.118.0 → 1.119.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 +2 -2
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +1 -1
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +1 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +14 -7
- package/src/sap/ui/fl/Utils.js +72 -172
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +8 -4
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory.js +28 -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/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 +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +5 -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 +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +17 -88
- 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 +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +6 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +96 -77
- 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 +1 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +45 -59
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +168 -260
- package/src/sap/ui/fl/changeHandler/MoveElements.js +33 -87
- 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 +31 -53
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +24 -26
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +3 -5
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +2 -0
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +5 -0
- package/src/sap/ui/fl/{write → initial}/_internal/FlexInfoSession.js +11 -3
- package/src/sap/ui/fl/initial/_internal/Storage.js +5 -5
- 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/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_bg.properties +2 -2
- package/src/sap/ui/fl/messagebundle_en.properties +2 -2
- package/src/sap/ui/fl/messagebundle_ja.properties +6 -6
- package/src/sap/ui/fl/messagebundle_sl.properties +2 -2
- package/src/sap/ui/fl/messagebundle_uk.properties +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +60 -27
- package/src/sap/ui/fl/util/IFrameRenderer.js +9 -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/VariantManagement.js +17 -18
- package/src/sap/ui/fl/variants/VariantModel.js +2 -1
- package/src/sap/ui/fl/variants/context/manifest.json +2 -2
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +3 -3
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +2 -2
- 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 +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +63 -43
- 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 +1 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +12 -2
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +14 -11
|
@@ -4,13 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
sap.ui.define([
|
|
8
|
-
"sap/base/Log",
|
|
9
|
-
"sap/ui/fl/Utils"
|
|
10
|
-
], function(
|
|
11
|
-
Log,
|
|
12
|
-
FlUtils
|
|
13
|
-
) {
|
|
7
|
+
sap.ui.define([], function() {
|
|
14
8
|
"use strict";
|
|
15
9
|
|
|
16
10
|
/**
|
|
@@ -18,7 +12,7 @@ sap.ui.define([
|
|
|
18
12
|
*
|
|
19
13
|
* @alias sap.ui.fl.changeHandler.MoveElements
|
|
20
14
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
15
|
+
* @version 1.119.0
|
|
22
16
|
* @since 1.34.0
|
|
23
17
|
*/
|
|
24
18
|
var MoveElements = { };
|
|
@@ -27,80 +21,39 @@ sap.ui.define([
|
|
|
27
21
|
|
|
28
22
|
function fnCheckConditions(oChange, oModifier, oView, oAppComponent) {
|
|
29
23
|
if (!oChange) {
|
|
30
|
-
|
|
24
|
+
throw new Error("No change instance");
|
|
31
25
|
}
|
|
32
26
|
|
|
33
27
|
var oChangeContent = oChange.getContent();
|
|
34
28
|
|
|
35
29
|
if (!oChangeContent || !oChangeContent.movedElements || oChangeContent.movedElements.length === 0) {
|
|
36
|
-
|
|
30
|
+
throw new Error("Change format invalid");
|
|
37
31
|
}
|
|
38
32
|
if (!oChange.getSelector().aggregation) {
|
|
39
|
-
|
|
33
|
+
throw new Error("No source aggregation supplied via selector for move");
|
|
40
34
|
}
|
|
41
35
|
if (!oChangeContent.target || !oChangeContent.target.selector) {
|
|
42
|
-
|
|
36
|
+
throw new Error("No target supplied for move");
|
|
43
37
|
}
|
|
44
38
|
if (!oModifier.bySelector(oChangeContent.target.selector, oAppComponent, oView)) {
|
|
45
|
-
|
|
39
|
+
throw new Error("Move target parent not found");
|
|
46
40
|
}
|
|
47
41
|
if (!oChangeContent.target.selector.aggregation) {
|
|
48
|
-
|
|
42
|
+
throw new Error("No target aggregation supplied for move");
|
|
49
43
|
}
|
|
50
|
-
|
|
51
|
-
return Promise.resolve();
|
|
52
44
|
}
|
|
53
45
|
|
|
54
|
-
function fnGetElementControlOrThrowError(mMovedElement, oModifier, oAppComponent, oView) {
|
|
46
|
+
async function fnGetElementControlOrThrowError(mMovedElement, oModifier, oAppComponent, oView) {
|
|
55
47
|
if (!mMovedElement.selector && !mMovedElement.id) {
|
|
56
|
-
|
|
48
|
+
throw new Error("Change format invalid - moveElements element has no id attribute");
|
|
57
49
|
}
|
|
58
50
|
if (typeof mMovedElement.targetIndex !== "number") {
|
|
59
|
-
|
|
51
|
+
throw new Error(
|
|
60
52
|
`Missing targetIndex for element with id '${mMovedElement.selector.id}' in movedElements supplied`
|
|
61
|
-
)
|
|
53
|
+
);
|
|
62
54
|
}
|
|
63
55
|
|
|
64
|
-
return
|
|
65
|
-
.then(function() {
|
|
66
|
-
return oModifier.bySelector(mMovedElement.selector || mMovedElement.id, oAppComponent, oView);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function fnHandleMovedElement(
|
|
71
|
-
mMovedElement,
|
|
72
|
-
oModifier,
|
|
73
|
-
oAppComponent,
|
|
74
|
-
oView,
|
|
75
|
-
oSourceParent,
|
|
76
|
-
oTargetParent,
|
|
77
|
-
sSourceAggregation,
|
|
78
|
-
sTargetAggregation
|
|
79
|
-
) {
|
|
80
|
-
var oMovedElement;
|
|
81
|
-
return fnGetElementControlOrThrowError(mMovedElement, oModifier, oAppComponent, oView)
|
|
82
|
-
.then(function(oRetrievedMovedElement) {
|
|
83
|
-
oMovedElement = oRetrievedMovedElement;
|
|
84
|
-
if (!oMovedElement) {
|
|
85
|
-
Log.warning("Element to move not found");
|
|
86
|
-
return Promise.reject();
|
|
87
|
-
}
|
|
88
|
-
return Promise.resolve()
|
|
89
|
-
.then(oModifier.removeAggregation.bind(
|
|
90
|
-
oModifier,
|
|
91
|
-
oSourceParent,
|
|
92
|
-
sSourceAggregation,
|
|
93
|
-
oMovedElement
|
|
94
|
-
))
|
|
95
|
-
.then(oModifier.insertAggregation.bind(
|
|
96
|
-
oModifier,
|
|
97
|
-
oTargetParent,
|
|
98
|
-
sTargetAggregation,
|
|
99
|
-
oMovedElement,
|
|
100
|
-
mMovedElement.targetIndex,
|
|
101
|
-
oView
|
|
102
|
-
));
|
|
103
|
-
});
|
|
56
|
+
return await oModifier.bySelector(mMovedElement.selector || mMovedElement.id, oAppComponent, oView);
|
|
104
57
|
}
|
|
105
58
|
|
|
106
59
|
/**
|
|
@@ -118,38 +71,31 @@ sap.ui.define([
|
|
|
118
71
|
* @function
|
|
119
72
|
* @name sap.ui.fl.changeHandler.MoveElements#applyChange
|
|
120
73
|
*/
|
|
121
|
-
MoveElements.applyChange = function(oChange, oSourceParent, mPropertyBag) {
|
|
74
|
+
MoveElements.applyChange = async function(oChange, oSourceParent, mPropertyBag) {
|
|
122
75
|
var oModifier = mPropertyBag.modifier;
|
|
123
76
|
var oView = mPropertyBag.view;
|
|
124
77
|
var oAppComponent = mPropertyBag.appComponent;
|
|
125
78
|
var oChangeContent = oChange.getContent();
|
|
126
|
-
var sSourceAggregation;
|
|
127
|
-
var sTargetAggregation;
|
|
128
|
-
var oTargetParent;
|
|
129
79
|
|
|
130
|
-
|
|
131
|
-
.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
sTargetAggregation));
|
|
150
|
-
});
|
|
151
|
-
return FlUtils.execPromiseQueueSequentially(aPromises, true, true);
|
|
152
|
-
});
|
|
80
|
+
fnCheckConditions(oChange, oModifier, oView, oAppComponent);
|
|
81
|
+
const sSourceAggregation = oChange.getSelector().aggregation;
|
|
82
|
+
const sTargetAggregation = oChangeContent.target.selector.aggregation;
|
|
83
|
+
const oTargetParent = await oModifier.bySelector(oChangeContent.target.selector, oAppComponent, oView);
|
|
84
|
+
for (const mMovedElement of oChangeContent.movedElements) {
|
|
85
|
+
const oMovedElement = await fnGetElementControlOrThrowError(mMovedElement, oModifier, oAppComponent, oView);
|
|
86
|
+
if (!oMovedElement) {
|
|
87
|
+
throw new Error("Element to move not found");
|
|
88
|
+
}
|
|
89
|
+
await oModifier.moveAggregation(
|
|
90
|
+
oSourceParent,
|
|
91
|
+
sSourceAggregation,
|
|
92
|
+
oTargetParent,
|
|
93
|
+
sTargetAggregation,
|
|
94
|
+
oMovedElement,
|
|
95
|
+
mMovedElement.targetIndex,
|
|
96
|
+
oView
|
|
97
|
+
);
|
|
98
|
+
}
|
|
153
99
|
};
|
|
154
100
|
|
|
155
101
|
/**
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Change handler for stashing of a control.
|
|
20
20
|
* @alias sap.ui.fl.changeHandler.StashControl
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.119.0
|
|
23
23
|
* @since 1.27.0
|
|
24
24
|
*/
|
|
25
25
|
var StashControl = {};
|
|
@@ -34,39 +34,17 @@ sap.ui.define([
|
|
|
34
34
|
* @returns {Promise} Promise resolving when the change is applied.
|
|
35
35
|
* @public
|
|
36
36
|
*/
|
|
37
|
-
StashControl.applyChange = function(oChange, oControl, mPropertyBag) {
|
|
38
|
-
var bStashed;
|
|
37
|
+
StashControl.applyChange = async function(oChange, oControl, mPropertyBag) {
|
|
39
38
|
var oModifier = mPropertyBag.modifier;
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.
|
|
44
|
-
|
|
45
|
-
return oModifier.
|
|
46
|
-
})
|
|
47
|
-
.then(function(iOriginalIndex) {
|
|
48
|
-
this.setChangeRevertData(oChange, bStashed, iOriginalIndex);
|
|
49
|
-
if (LayerUtils.isDeveloperLayer(oChange.getLayer())) {
|
|
50
|
-
return oModifier.setStashed(oControl, true);
|
|
51
|
-
}
|
|
52
|
-
return oModifier.setVisible(oControl, false);
|
|
53
|
-
}.bind(this));
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
function fnHandleUnstashedControl(iUnstashedIndex, mRevertData, oUnstashedControl, oModifier) {
|
|
57
|
-
var sAggregationName;
|
|
58
|
-
if (iUnstashedIndex !== mRevertData.originalIndex) {
|
|
59
|
-
var oParent = oModifier.getParent(oUnstashedControl);
|
|
60
|
-
return Promise.return()
|
|
61
|
-
.then(oModifier.getParentAggregationName.bind(oModifier, oUnstashedControl))
|
|
62
|
-
.then(function(sRetrievedAggregationName) {
|
|
63
|
-
sAggregationName = sRetrievedAggregationName;
|
|
64
|
-
return oModifier.removeAggregation(oParent, sAggregationName, oUnstashedControl);
|
|
65
|
-
})
|
|
66
|
-
.then(oModifier.insertAggregation.bind(oModifier, oParent, sAggregationName, oUnstashedControl, mRevertData.originalIndex));
|
|
40
|
+
const bStashed = await oModifier.getStashed(oControl);
|
|
41
|
+
const iOriginalIndex = await oModifier.findIndexInParentAggregation(oControl);
|
|
42
|
+
this.setChangeRevertData(oChange, bStashed, iOriginalIndex);
|
|
43
|
+
if (LayerUtils.isDeveloperLayer(oChange.getLayer())) {
|
|
44
|
+
return oModifier.setStashed(oControl, true);
|
|
67
45
|
}
|
|
68
|
-
return
|
|
69
|
-
}
|
|
46
|
+
return oModifier.setVisible(oControl, false);
|
|
47
|
+
};
|
|
70
48
|
|
|
71
49
|
/**
|
|
72
50
|
* Reverts previously applied change
|
|
@@ -78,28 +56,28 @@ sap.ui.define([
|
|
|
78
56
|
* @returns {Promise} Promise resolving when change is reverted
|
|
79
57
|
* @public
|
|
80
58
|
*/
|
|
81
|
-
StashControl.revertChange = function(oChange, oControl, mPropertyBag) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
59
|
+
StashControl.revertChange = async function(oChange, oControl, mPropertyBag) {
|
|
60
|
+
const mRevertData = oChange.getRevertData();
|
|
61
|
+
const oModifier = mPropertyBag.modifier;
|
|
62
|
+
if (LayerUtils.isDeveloperLayer(oChange.getLayer())) {
|
|
63
|
+
const oUnstashedControl = oModifier.setStashed(oControl, mRevertData.originalValue, mPropertyBag.appComponent);
|
|
64
|
+
if (oUnstashedControl) {
|
|
65
|
+
const iUnstashedIndex = await oModifier.findIndexInParentAggregation(oUnstashedControl);
|
|
66
|
+
if (iUnstashedIndex !== mRevertData.originalIndex) {
|
|
67
|
+
const oParent = oModifier.getParent(oUnstashedControl);
|
|
68
|
+
const sAggregationName = await oModifier.getParentAggregationName(oUnstashedControl);
|
|
69
|
+
await oModifier.moveAggregation(
|
|
70
|
+
oParent,
|
|
71
|
+
sAggregationName,
|
|
72
|
+
oParent,
|
|
73
|
+
sAggregationName,
|
|
74
|
+
oUnstashedControl,
|
|
75
|
+
mRevertData.originalIndex);
|
|
95
76
|
}
|
|
96
|
-
return Promise.resolve();
|
|
97
77
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
.
|
|
101
|
-
oChange.resetRevertData();
|
|
102
|
-
});
|
|
78
|
+
}
|
|
79
|
+
oModifier.setVisible(oControl, !mRevertData.originalValue);
|
|
80
|
+
oChange.resetRevertData();
|
|
103
81
|
};
|
|
104
82
|
|
|
105
83
|
/**
|
|
@@ -134,8 +112,8 @@ sap.ui.define([
|
|
|
134
112
|
};
|
|
135
113
|
|
|
136
114
|
StashControl.getChangeVisualizationInfo = function(oChange, oAppComponent) {
|
|
137
|
-
|
|
138
|
-
|
|
115
|
+
const oSelector = oChange.getSelector();
|
|
116
|
+
const oElement = JsControlTreeModifier.bySelector(oSelector, oAppComponent);
|
|
139
117
|
return {
|
|
140
118
|
affectedControls: [oSelector],
|
|
141
119
|
displayControls: [oElement.getParent().getId()]
|
|
@@ -15,7 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
* Change handler for unstashing of a control.
|
|
16
16
|
* @alias sap.ui.fl.changeHandler.UnstashControl
|
|
17
17
|
* @author SAP SE
|
|
18
|
-
* @version 1.
|
|
18
|
+
* @version 1.119.0
|
|
19
19
|
* @since 1.27.0
|
|
20
20
|
*/
|
|
21
21
|
var UnstashControl = {};
|
|
@@ -30,33 +30,31 @@ sap.ui.define([
|
|
|
30
30
|
* @returns {sap.ui.core.Control} Returns the unstashed control
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
|
-
UnstashControl.applyChange = function(oChange, oControl, mPropertyBag) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var bStashed = false;
|
|
37
|
-
var oUnstashedControl;
|
|
33
|
+
UnstashControl.applyChange = async function(oChange, oControl, mPropertyBag) {
|
|
34
|
+
const mContent = oChange.getContent();
|
|
35
|
+
const oModifier = mPropertyBag.modifier;
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
oChange.setRevertData({
|
|
43
|
-
originalValue: bPreviouslyStashed
|
|
44
|
-
});
|
|
45
|
-
oUnstashedControl = oModifier.setStashed(oControl, bStashed, mPropertyBag.appComponent) || oControl;
|
|
46
|
-
// old way including move, new way will have separate move change
|
|
47
|
-
// only applicable for XML modifier
|
|
48
|
-
if (mContent.parentAggregationName) {
|
|
49
|
-
var sTargetAggregation = mContent.parentAggregationName;
|
|
50
|
-
var oTargetParent = oModifier.getParent(oUnstashedControl);
|
|
51
|
-
return Promise.resolve()
|
|
52
|
-
.then(oModifier.removeAggregation.bind(oModifier, oTargetParent, sTargetAggregation, oUnstashedControl))
|
|
53
|
-
.then(oModifier.insertAggregation.bind(oModifier, oTargetParent, sTargetAggregation, oUnstashedControl, mContent.index, mPropertyBag.view));
|
|
54
|
-
}
|
|
55
|
-
return undefined;
|
|
56
|
-
})
|
|
57
|
-
.then(function() {
|
|
58
|
-
return oUnstashedControl;
|
|
37
|
+
const bPreviouslyStashed = await oModifier.getStashed(oControl);
|
|
38
|
+
oChange.setRevertData({
|
|
39
|
+
originalValue: bPreviouslyStashed
|
|
59
40
|
});
|
|
41
|
+
const oUnstashedControl = oModifier.setStashed(oControl, false, mPropertyBag.appComponent) || oControl;
|
|
42
|
+
// old way including move, new way will have separate move change
|
|
43
|
+
// only applicable for XML modifier
|
|
44
|
+
if (mContent.parentAggregationName) {
|
|
45
|
+
const sTargetAggregation = mContent.parentAggregationName;
|
|
46
|
+
const oTargetParent = oModifier.getParent(oUnstashedControl);
|
|
47
|
+
await oModifier.moveAggregation(
|
|
48
|
+
oTargetParent,
|
|
49
|
+
sTargetAggregation,
|
|
50
|
+
oTargetParent,
|
|
51
|
+
sTargetAggregation,
|
|
52
|
+
oUnstashedControl,
|
|
53
|
+
mContent.index,
|
|
54
|
+
mPropertyBag.view
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
return oUnstashedControl;
|
|
60
58
|
};
|
|
61
59
|
|
|
62
60
|
/**
|
|
@@ -18,13 +18,13 @@ sap.ui.define([
|
|
|
18
18
|
*
|
|
19
19
|
* @alias sap.ui.fl.changeHandler.UpdateIFrame
|
|
20
20
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.119.0
|
|
22
22
|
* @since 1.72
|
|
23
23
|
* @private
|
|
24
24
|
*/
|
|
25
25
|
var UpdateIFrame = {};
|
|
26
26
|
|
|
27
|
-
var aUpdatableProperties = ["width", "height", "url", "_settings"];
|
|
27
|
+
var aUpdatableProperties = ["width", "height", "url", "useLegacyNavigation", "_settings"];
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Extract an IFrame control settings.
|
|
@@ -41,9 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
var oPromise = Promise.resolve()
|
|
42
42
|
.then(oModifier.getProperty.bind(oModifier, oIFrame, sPropertyName))
|
|
43
43
|
.then(function(vValue) {
|
|
44
|
-
|
|
45
|
-
oSettings[sPropertyName] = vValue;
|
|
46
|
-
}
|
|
44
|
+
oSettings[sPropertyName] = vValue;
|
|
47
45
|
});
|
|
48
46
|
aPromises.push(oPromise);
|
|
49
47
|
});
|
|
@@ -35,6 +35,8 @@ sap.ui.define([
|
|
|
35
35
|
mIFrameSettings[sIFrameProperty] = vValue;
|
|
36
36
|
mIFrameSettings._settings[sIFrameProperty] = vValue;
|
|
37
37
|
});
|
|
38
|
+
mIFrameSettings.useLegacyNavigation = !!oChangeContent.useLegacyNavigation;
|
|
39
|
+
mIFrameSettings._settings.useLegacyNavigation = !!oChangeContent.useLegacyNavigation;
|
|
38
40
|
|
|
39
41
|
if (mRenameInfo) {
|
|
40
42
|
mIFrameSettings.renameInfo = mRenameInfo;
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* @namespace
|
|
20
20
|
* @name sap.ui.fl.descriptorRelated
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.119.0
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.rta, smart business
|
|
25
25
|
*/
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @namespace
|
|
30
30
|
* @name sap.ui.fl.descriptorRelated.api
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.119.0
|
|
33
33
|
* @private
|
|
34
34
|
* @ui5-restricted sap.ui.rta, smart business
|
|
35
35
|
*/
|
|
@@ -43,7 +43,7 @@ sap.ui.define([
|
|
|
43
43
|
* @constructor
|
|
44
44
|
* @alias sap.ui.fl.descriptorRelated.api.DescriptorChange
|
|
45
45
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
46
|
+
* @version 1.119.0
|
|
47
47
|
* @private
|
|
48
48
|
* @ui5-restricted sap.ui.rta, smart business
|
|
49
49
|
*/
|
|
@@ -124,7 +124,7 @@ sap.ui.define([
|
|
|
124
124
|
* @constructor
|
|
125
125
|
* @alias sap.ui.fl.descriptorRelated.api.DescriptorChangeFactory
|
|
126
126
|
* @author SAP SE
|
|
127
|
-
* @version 1.
|
|
127
|
+
* @version 1.119.0
|
|
128
128
|
* @private
|
|
129
129
|
* @ui5-restricted sap.ui.rta, smart business
|
|
130
130
|
*/
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* @namespace
|
|
39
39
|
* @alias sap.ui.fl.descriptorRelated.api.DescriptorInlineChangeFactory
|
|
40
40
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
41
|
+
* @version 1.119.0
|
|
42
42
|
* @private
|
|
43
43
|
* @deprecated Since version 1.76
|
|
44
44
|
* @ui5-restricted sap.ui.rta, smart business
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
* @namespace
|
|
17
17
|
* @alias sap.ui.fl.descriptorRelated.api.DescriptorVariantFactory
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.119.0
|
|
20
20
|
* @private
|
|
21
21
|
* @deprecated Since version 1.73
|
|
22
22
|
* @ui5-restricted sap.ui.rta, smart business
|
|
@@ -37,6 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
frameHeight: oInitialSettings.height,
|
|
38
38
|
title: oInitialSettings.title,
|
|
39
39
|
asContainer: !!oInitialSettings.title,
|
|
40
|
+
useLegacyNavigation: oInitialSettings.useLegacyNavigation,
|
|
40
41
|
updateMode: true
|
|
41
42
|
};
|
|
42
43
|
return oAddIFrameDialog.open(mDialogSettings);
|
|
@@ -65,6 +66,10 @@ sap.ui.define([
|
|
|
65
66
|
bContentChanged = true;
|
|
66
67
|
oNewContent.url = mSettings.frameUrl;
|
|
67
68
|
}
|
|
69
|
+
if (mSettings.useLegacyNavigation !== !!oInitialSettings.useLegacyNavigation) {
|
|
70
|
+
bContentChanged = true;
|
|
71
|
+
oNewContent.useLegacyNavigation = mSettings.useLegacyNavigation;
|
|
72
|
+
}
|
|
68
73
|
|
|
69
74
|
if (bContentChanged) {
|
|
70
75
|
aChanges.push({
|
|
@@ -29,12 +29,16 @@ sap.ui.define([
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
FlexInfoSession.set = function(oInfo, oControl) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
if (oInfo) {
|
|
33
|
+
var sReference = ManifestUtils.getFlexReferenceForControl(oControl);
|
|
34
|
+
FlexInfoSession.setByReference(oInfo, sReference);
|
|
35
|
+
}
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
FlexInfoSession.setByReference = function(oInfo, sReference) {
|
|
37
|
-
|
|
39
|
+
if (oInfo) {
|
|
40
|
+
window.sessionStorage.setItem(getSessionStorageKey(sReference), JSON.stringify(oInfo));
|
|
41
|
+
}
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
FlexInfoSession.remove = function(oControl) {
|
|
@@ -42,5 +46,9 @@ sap.ui.define([
|
|
|
42
46
|
window.sessionStorage.removeItem(getSessionStorageKey(sReference));
|
|
43
47
|
};
|
|
44
48
|
|
|
49
|
+
FlexInfoSession.removeByReference = function(sReference) {
|
|
50
|
+
window.sessionStorage.removeItem(getSessionStorageKey(sReference));
|
|
51
|
+
};
|
|
52
|
+
|
|
45
53
|
return FlexInfoSession;
|
|
46
54
|
});
|
|
@@ -8,16 +8,16 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
9
9
|
"sap/ui/fl/initial/_internal/StorageResultMerger",
|
|
10
10
|
"sap/ui/fl/initial/_internal/storageResultDisassemble",
|
|
11
|
+
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
11
12
|
"sap/ui/fl/write/api/Version",
|
|
12
|
-
"sap/ui/fl/Utils"
|
|
13
|
-
"sap/ui/fl/write/_internal/FlexInfoSession"
|
|
13
|
+
"sap/ui/fl/Utils"
|
|
14
14
|
], function(
|
|
15
15
|
StorageUtils,
|
|
16
16
|
StorageResultMerger,
|
|
17
17
|
storageResultDisassemble,
|
|
18
|
+
FlexInfoSession,
|
|
18
19
|
Version,
|
|
19
|
-
Utils
|
|
20
|
-
FlexInfoSession
|
|
20
|
+
Utils
|
|
21
21
|
) {
|
|
22
22
|
"use strict";
|
|
23
23
|
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
*
|
|
59
59
|
* @namespace sap.ui.fl.initial._internal.Storage
|
|
60
60
|
* @since 1.67
|
|
61
|
-
* @version 1.
|
|
61
|
+
* @version 1.119.0
|
|
62
62
|
* @private
|
|
63
63
|
* @ui5-restricted sap.ui.fl
|
|
64
64
|
*/
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
*
|
|
28
28
|
* @namespace sap.ui.fl.initial._internal.StorageUtils
|
|
29
29
|
* @since 1.74
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.119.0
|
|
31
31
|
* @private
|
|
32
32
|
* @ui5-restricted sap.ui.fl.initial._internal.Storage, sap.ui.fl.write._internal.Storage,
|
|
33
33
|
* sap.ui.fl.initial._internal.connectors.ObjectStorageConnector, sap.ui.fl.initial._internal.connectors.ObjectPathConnector
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
*
|
|
45
45
|
* @namespace sap.ui.fl.initial._internal.connectors.Utils
|
|
46
46
|
* @since 1.70
|
|
47
|
-
* @version 1.
|
|
47
|
+
* @version 1.119.0
|
|
48
48
|
* @private
|
|
49
49
|
* @ui5-restricted sap.ui.fl.initial._internal.connectors, sap.ui.fl.write._internal.connectors, sap.ui.fl.write._internal.transport
|
|
50
50
|
*/
|
|
@@ -51,7 +51,7 @@ function(
|
|
|
51
51
|
* @name sap.ui.fl.initial._internal.storageResultDisassemble
|
|
52
52
|
* @function
|
|
53
53
|
* @since 1.70
|
|
54
|
-
* @version 1.
|
|
54
|
+
* @version 1.119.0
|
|
55
55
|
* @private
|
|
56
56
|
* @ui5-restricted sap.ui.fl.initial._internal.Storage
|
|
57
57
|
* Disassembles a response with a variant section into one or more plain responses.
|