@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
|
@@ -40,7 +40,15 @@ sap.ui.define([
|
|
|
40
40
|
oRm.style("border", "none");
|
|
41
41
|
|
|
42
42
|
oRm.attr("sandbox", "allow-forms allow-popups allow-scripts allow-same-origin allow-modals");
|
|
43
|
-
|
|
43
|
+
|
|
44
|
+
if (oIFrame.getUseLegacyNavigation()) {
|
|
45
|
+
oRm.attr("src", oIFrame.getUrl());
|
|
46
|
+
} else {
|
|
47
|
+
// With the new location.replace approach, the actual
|
|
48
|
+
// target url will be set onAfterRendering
|
|
49
|
+
oRm.attr("src", "about:blank");
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
var sTitle = oIFrame.getTitle();
|
|
45
53
|
if (sTitle) {
|
|
46
54
|
oRm.attr("title", sTitle);
|
|
@@ -164,23 +164,6 @@ sap.ui.define([
|
|
|
164
164
|
type: "sap.ui.core.CSSSize",
|
|
165
165
|
group: "Dimension",
|
|
166
166
|
defaultValue: "100%"
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Renders the name of the variant as a text.
|
|
171
|
-
* The name of the variant is usually rendered as {@link sap.m.Title}
|
|
172
|
-
* but there are use cases - related to accessibility requirements - where the
|
|
173
|
-
* rendering should be done using {@link sap.m.Text} instead.
|
|
174
|
-
* <b>Note:</b>:<br>
|
|
175
|
-
* If the name of the variant is rendered as <code>sap.m.Text</code>, all the <code>sap.m.Title</code>-
|
|
176
|
-
* specific information (<code>headerLevel</code> and <code>titleStyle</code>) is ignored.
|
|
177
|
-
*
|
|
178
|
-
* @since 1.118
|
|
179
|
-
*/
|
|
180
|
-
showAsText: {
|
|
181
|
-
type: "boolean",
|
|
182
|
-
group: "Misc",
|
|
183
|
-
defaultValue: false
|
|
184
167
|
}
|
|
185
168
|
},
|
|
186
169
|
events: {
|
|
@@ -675,12 +658,28 @@ sap.ui.define([
|
|
|
675
658
|
return this;
|
|
676
659
|
};
|
|
677
660
|
|
|
661
|
+
/**
|
|
662
|
+
* Special handling of the rendering of this control.
|
|
663
|
+
* @param {boolean} bValue defines the intended rendering
|
|
664
|
+
* @returns {sap.ui.fl.variants.VariantManagement} the current instance
|
|
665
|
+
* @private
|
|
666
|
+
* @restricted sap.ui.mdc
|
|
667
|
+
*/
|
|
678
668
|
VariantManagement.prototype.setShowAsText = function(bValue) {
|
|
679
|
-
this.setProperty("showAsText", bValue);
|
|
680
669
|
this._oVM.setShowAsText(bValue);
|
|
681
670
|
return this;
|
|
682
671
|
};
|
|
683
672
|
|
|
673
|
+
/**
|
|
674
|
+
* Special handling of the rendering of this control.
|
|
675
|
+
* @returns {boolean} the current intend
|
|
676
|
+
* @private
|
|
677
|
+
* @restricted sap.ui.mdc
|
|
678
|
+
*/
|
|
679
|
+
VariantManagement.prototype.getShowAsText = function() {
|
|
680
|
+
return this._oVM.getShowAsText();
|
|
681
|
+
};
|
|
682
|
+
|
|
684
683
|
VariantManagement.prototype.setEditable = function(bValue) {
|
|
685
684
|
this.setProperty("editable", bValue);
|
|
686
685
|
this._oVM.setShowFooter(bValue);
|
|
@@ -292,7 +292,7 @@ sap.ui.define([
|
|
|
292
292
|
* @class Variant model implementation for JSON format.
|
|
293
293
|
* @extends sap.ui.model.json.JSONModel
|
|
294
294
|
* @author SAP SE
|
|
295
|
-
* @version 1.
|
|
295
|
+
* @version 1.119.0
|
|
296
296
|
* @param {object} oData - Either the URL where to load the JSON from or a JS object
|
|
297
297
|
* @param {object} mPropertyBag - Map of properties required for the constructor
|
|
298
298
|
* @param {sap.ui.fl.FlexController} mPropertyBag.flexController - <code>FlexController</code> instance for the component which uses the variant model
|
|
@@ -1489,6 +1489,7 @@ sap.ui.define([
|
|
|
1489
1489
|
VariantModel.prototype.destroy = function() {
|
|
1490
1490
|
this.oDataSelector.removeUpdateListener(this.fnUpdateListener);
|
|
1491
1491
|
VariantManagementState.clearRuntimeSteadyObjects(this.sFlexReference, this.oAppComponent.getId());
|
|
1492
|
+
VariantManagementState.resetCurrentVariantReference(this.sFlexReference);
|
|
1492
1493
|
JSONModel.prototype.destroy.apply(this);
|
|
1493
1494
|
};
|
|
1494
1495
|
|
|
@@ -201,7 +201,7 @@ sap.ui.define([
|
|
|
201
201
|
*
|
|
202
202
|
* @namespace sap.ui.fl.write._internal.Versions
|
|
203
203
|
* @since 1.74
|
|
204
|
-
* @version 1.
|
|
204
|
+
* @version 1.119.0
|
|
205
205
|
* @private
|
|
206
206
|
* @ui5-restricted sap.ui.fl
|
|
207
207
|
*/
|
|
@@ -267,7 +267,7 @@ sap.ui.define([
|
|
|
267
267
|
Versions.hasVersionsModel = function(mPropertyBag) {
|
|
268
268
|
var sReference = mPropertyBag.reference;
|
|
269
269
|
var sLayer = mPropertyBag.layer;
|
|
270
|
-
return _mInstances[sReference] && _mInstances[sReference][sLayer];
|
|
270
|
+
return !!(_mInstances[sReference] && _mInstances[sReference][sLayer]);
|
|
271
271
|
};
|
|
272
272
|
|
|
273
273
|
Versions.clearInstances = function() {
|
|
@@ -283,7 +283,7 @@ sap.ui.define([
|
|
|
283
283
|
* @returns {Promise<sap.ui.fl.Version>} Promise resolving with the updated version model for the application from the backend
|
|
284
284
|
*/
|
|
285
285
|
Versions.updateModelFromBackend = function(mPropertyBag) {
|
|
286
|
-
if (Versions.hasVersionsModel(mPropertyBag)) {
|
|
286
|
+
if (Versions.hasVersionsModel(mPropertyBag) && Versions.getVersionsModel(mPropertyBag).getProperty("/versioningEnabled")) {
|
|
287
287
|
mPropertyBag.limit = BACKEND_REQUEST_LIMIT;
|
|
288
288
|
return Storage.versions.load(mPropertyBag)
|
|
289
289
|
.then(function(aVersions) {
|
|
@@ -12,7 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/initial/_internal/connectors/Utils",
|
|
13
13
|
"sap/ui/fl/write/_internal/connectors/Utils",
|
|
14
14
|
"sap/base/util/restricted/_pick",
|
|
15
|
-
"sap/ui/fl/
|
|
15
|
+
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
16
16
|
"sap/ui/core/BusyIndicator",
|
|
17
17
|
"sap/base/Log",
|
|
18
18
|
"sap/m/MessageBox"
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
*
|
|
39
39
|
* @namespace sap.ui.fl.write._internal.connectors.KeyUserConnector
|
|
40
40
|
* @since 1.70
|
|
41
|
-
* @version 1.
|
|
41
|
+
* @version 1.119.0
|
|
42
42
|
* @private
|
|
43
43
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
44
44
|
*/
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @class
|
|
18
18
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariant
|
|
19
19
|
* @since 1.87
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.119.0
|
|
21
21
|
* @public
|
|
22
22
|
* @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
|
|
23
23
|
*/
|
|
@@ -115,7 +115,7 @@ sap.ui.define([
|
|
|
115
115
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
|
|
116
116
|
* @since 1.87.0
|
|
117
117
|
* @author SAP SE
|
|
118
|
-
* @version 1.
|
|
118
|
+
* @version 1.119.0
|
|
119
119
|
* @private
|
|
120
120
|
*/
|
|
121
121
|
var ABAPExtensibilityVariantFactory = {};
|
|
@@ -80,7 +80,7 @@ sap.ui.define([
|
|
|
80
80
|
* @extends sap.ui.base.ManagedObject
|
|
81
81
|
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog
|
|
82
82
|
* @author SAP SE
|
|
83
|
-
* @version 1.
|
|
83
|
+
* @version 1.119.0
|
|
84
84
|
* @since 1.93
|
|
85
85
|
* @private
|
|
86
86
|
* @ui5-restricted
|
|
@@ -269,23 +269,35 @@ sap.ui.define([
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
function getSVMControls(sReference) {
|
|
273
|
+
const mCompVariantsMap = FlexState.getCompVariantsMap(sReference);
|
|
274
|
+
const aSVMControls = [];
|
|
275
|
+
if (mCompVariantsMap) {
|
|
276
|
+
Object.values(mCompVariantsMap).forEach(function(mMap) {
|
|
277
|
+
const oSVMControl = mMap.controlId && Core.byId(mMap.controlId);
|
|
278
|
+
if (oSVMControl) {
|
|
279
|
+
aSVMControls.push(oSVMControl);
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
return aSVMControls;
|
|
284
|
+
}
|
|
285
|
+
|
|
272
286
|
/**
|
|
273
287
|
* CompVariant state class to handle the state of the compVariants and its changes.
|
|
274
288
|
* This class is in charge of updating the maps stored in the <code>sap.ui.fl.apply._internal.flexState.FlexState</code>.
|
|
275
289
|
*
|
|
276
290
|
* @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
|
|
277
291
|
* @since 1.83
|
|
278
|
-
* @version 1.
|
|
292
|
+
* @version 1.119.0
|
|
279
293
|
* @private
|
|
280
294
|
* @ui5-restricted sap.ui.fl
|
|
281
295
|
*/
|
|
282
296
|
var CompVariantState = {};
|
|
283
297
|
|
|
284
298
|
CompVariantState.checkSVMControlsForDirty = function(sReference) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
var oControl = mMap.controlId && Core.byId(mMap.controlId);
|
|
288
|
-
return oControl && oControl.getModified();
|
|
299
|
+
return getSVMControls(sReference).some((oSVMControl) => {
|
|
300
|
+
return oSVMControl.getModified();
|
|
289
301
|
});
|
|
290
302
|
};
|
|
291
303
|
|
|
@@ -821,7 +833,7 @@ sap.ui.define([
|
|
|
821
833
|
* @returns {Promise} Promise resolving with an array of responses or rejecting with the first error
|
|
822
834
|
* @private
|
|
823
835
|
*/
|
|
824
|
-
CompVariantState.persist = function(mPropertyBag) {
|
|
836
|
+
CompVariantState.persist = async function(mPropertyBag) {
|
|
825
837
|
function writeObjectAndAddToState(oFlexObject, oStoredResponse, sParentVersion) {
|
|
826
838
|
// new public variant should not be visible for other users
|
|
827
839
|
if (oFlexObject.getLayer() === Layer.PUBLIC) {
|
|
@@ -850,7 +862,7 @@ sap.ui.define([
|
|
|
850
862
|
}
|
|
851
863
|
}).then(function() {
|
|
852
864
|
// update StorageResponse
|
|
853
|
-
|
|
865
|
+
const oFileContent = oFlexObject.convertToFileContent();
|
|
854
866
|
getSubSection(oStoredResponse.changes.comp, oFlexObject).push(oFileContent);
|
|
855
867
|
return oFileContent;
|
|
856
868
|
});
|
|
@@ -868,41 +880,41 @@ sap.ui.define([
|
|
|
868
880
|
ifVariantClearRevertData(oFlexObject);
|
|
869
881
|
return deleteObjectAndRemoveFromStorage(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sParentVersion);
|
|
870
882
|
default:
|
|
871
|
-
|
|
883
|
+
return undefined;
|
|
872
884
|
}
|
|
873
885
|
}
|
|
874
886
|
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
.
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
.
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
});
|
|
899
|
-
return Promise.all(aPromises);
|
|
887
|
+
const sReference = mPropertyBag.reference;
|
|
888
|
+
const sPersistencyKey = mPropertyBag.persistencyKey;
|
|
889
|
+
const mCompVariantsMap = FlexState.getCompVariantsMap(sReference);
|
|
890
|
+
const mCompVariantsMapByPersistencyKey = mCompVariantsMap._getOrCreate(sPersistencyKey);
|
|
891
|
+
|
|
892
|
+
const oStoredResponse = await FlexState.getStorageResponse(sReference);
|
|
893
|
+
const aFlexObjects = getAllCompVariantObjects(mCompVariantsMapByPersistencyKey).filter(needsPersistencyCall);
|
|
894
|
+
const aPromises = aFlexObjects.map(function(oFlexObject, index) {
|
|
895
|
+
if (index === 0) {
|
|
896
|
+
const sParentVersion = getPropertyFromVersionsModel("/persistedVersion", {
|
|
897
|
+
layer: oFlexObject.getLayer(),
|
|
898
|
+
reference: oFlexObject.getFlexObjectMetadata().reference
|
|
899
|
+
});
|
|
900
|
+
// TODO: use condensing route to reduce backend requests
|
|
901
|
+
// need to save first entry to generate draft version in backend
|
|
902
|
+
return saveObject(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sParentVersion)
|
|
903
|
+
.then(function() {
|
|
904
|
+
const aPromises = aFlexObjects.map(function(oFlexObject, index) {
|
|
905
|
+
if (index !== 0) {
|
|
906
|
+
const sDraftVersion = sParentVersion ? Version.Number.Draft : undefined;
|
|
907
|
+
return saveObject(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse, sDraftVersion);
|
|
908
|
+
}
|
|
909
|
+
return undefined;
|
|
900
910
|
});
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
return
|
|
911
|
+
return Promise.all(aPromises);
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
return undefined;
|
|
905
915
|
});
|
|
916
|
+
// TODO Consider not rejecting with first error, but wait for all promises and collect the results
|
|
917
|
+
return Promise.all(aPromises);
|
|
906
918
|
};
|
|
907
919
|
|
|
908
920
|
/**
|
|
@@ -912,16 +924,24 @@ sap.ui.define([
|
|
|
912
924
|
* @returns {Promise} Promise resolving with an array of responses or rejecting with the first error
|
|
913
925
|
* @private
|
|
914
926
|
*/
|
|
915
|
-
CompVariantState.persistAll = function(sReference) {
|
|
916
|
-
|
|
927
|
+
CompVariantState.persistAll = async function(sReference) {
|
|
928
|
+
const mCompEntities = _omit(FlexState.getCompVariantsMap(sReference), "_getOrCreate", "_initialize");
|
|
917
929
|
// Calls must be done sequentially because the backend can't do this in parallel
|
|
918
930
|
// and first call might create draft which requires other parameters for following calls
|
|
919
|
-
|
|
920
|
-
|
|
931
|
+
const aResponses = [];
|
|
932
|
+
const aSVMControls = getSVMControls(sReference);
|
|
933
|
+
for (const sPersistencyKey of Object.keys(mCompEntities)) {
|
|
934
|
+
const oResponse = await CompVariantState.persist({
|
|
921
935
|
reference: sReference,
|
|
922
936
|
persistencyKey: sPersistencyKey
|
|
923
|
-
})
|
|
924
|
-
|
|
937
|
+
});
|
|
938
|
+
aResponses.push(oResponse);
|
|
939
|
+
}
|
|
940
|
+
// persistAll can be triggered from e.g. Key User Adaptation, making the controls no longer dirty
|
|
941
|
+
aSVMControls.forEach((oSVMControl) => {
|
|
942
|
+
oSVMControl.setModified(false);
|
|
943
|
+
});
|
|
944
|
+
return aResponses;
|
|
925
945
|
};
|
|
926
946
|
|
|
927
947
|
/**
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @private
|
|
27
27
|
* @alias sap.ui.fl.write._internal.transport.TransportSelection
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.119.0
|
|
30
30
|
* @since 1.74.0
|
|
31
31
|
* Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
|
|
32
32
|
* of the SmartVariant control.
|