@openui5/sap.ui.fl 1.127.0 → 1.128.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/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +37 -47
- 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 +11 -9
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +17 -12
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +3 -1
- 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/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +3 -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/AddTechnicalAttributes.js +75 -0
- 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/ChangeOutbound.js +76 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +44 -0
- 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/SetCloudDevAdaptationStatus.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 +56 -9
- 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/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +66 -0
- 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 +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +12 -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/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +41 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +39 -39
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +3 -0
- 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/changes/UIChangesState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +9 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.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 +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.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/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 +13 -4
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/Utils.js +19 -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/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -0
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -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/support/_internal/getAllUIChanges.js +9 -59
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +53 -0
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +56 -5
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +13 -2
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +23 -14
- package/src/sap/ui/fl/variants/VariantModel.js +7 -6
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +12 -12
- package/src/sap/ui/fl/write/_internal/SaveAs.js +11 -12
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +8 -68
- 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 +65 -16
- 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/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +1 -0
- 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/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 → FlexObjectManager.js} +26 -56
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +9 -6
- 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 +6 -6
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +4 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +3 -4
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +8 -8
- package/src/sap/ui/fl/write/api/TranslationAPI.js +6 -6
- package/src/sap/ui/fl/write/api/VersionsAPI.js +34 -9
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/fl/apply/_internal/flexState/changes/UIChangesState",
|
|
9
|
+
"sap/ui/fl/apply/_internal/flexState/FlexObjectState",
|
|
10
|
+
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
11
|
+
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
12
|
+
"sap/ui/fl/Utils"
|
|
13
|
+
], function(
|
|
14
|
+
UIChangesState,
|
|
15
|
+
FlexObjectState,
|
|
16
|
+
FlexState,
|
|
17
|
+
ManifestUtils,
|
|
18
|
+
Utils
|
|
19
|
+
) {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns an array with all UI Changes for the application.
|
|
24
|
+
*
|
|
25
|
+
* @namespace sap.ui.fl.support._internal.getAllUIChanges
|
|
26
|
+
* @since 1.128
|
|
27
|
+
* @version 1.128.0
|
|
28
|
+
* @private
|
|
29
|
+
* @ui5-restricted sap.ui.fl.support.api.SupportAPI
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
function getFlexObjectInfos(oCurrentAppContainerObject) {
|
|
33
|
+
const oAppComponent = oCurrentAppContainerObject.oContainer.getComponentInstance();
|
|
34
|
+
const sReference = ManifestUtils.getFlexReferenceForControl(oAppComponent);
|
|
35
|
+
return {
|
|
36
|
+
allUIChanges: UIChangesState.getAllUIChanges(sReference),
|
|
37
|
+
allFlexObjects: FlexState.getFlexObjectsDataSelector().get({ reference: sReference }),
|
|
38
|
+
dirtyFlexObjects: FlexObjectState.getDirtyFlexObjects(sReference),
|
|
39
|
+
completeDependencyMap: FlexObjectState.getCompleteDependencyMap(sReference),
|
|
40
|
+
liveDependencyMap: FlexObjectState.getLiveDependencyMap(sReference)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return async function(oAppComponent) {
|
|
45
|
+
// in most scenarios the appComponent will already be passed, but in iFrame cases (like cFLP) the appComponent is not available
|
|
46
|
+
// outside of the iFrame. In this case the function is called from inside the iFrame and has to fetch the appComponent
|
|
47
|
+
if (!oAppComponent) {
|
|
48
|
+
const oAppLifeCycleService = await Utils.getUShellService("AppLifeCycle");
|
|
49
|
+
return getFlexObjectInfos(oAppLifeCycleService.getCurrentApplication().componentInstance);
|
|
50
|
+
}
|
|
51
|
+
return getFlexObjectInfos(oAppComponent);
|
|
52
|
+
};
|
|
53
|
+
});
|
|
@@ -5,30 +5,81 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/base/Log",
|
|
9
|
+
"sap/ui/core/ComponentRegistry",
|
|
8
10
|
"sap/ui/fl/support/_internal/getAllUIChanges",
|
|
11
|
+
"sap/ui/fl/support/_internal/getFlexObjectInfos",
|
|
9
12
|
"sap/ui/fl/support/_internal/getFlexSettings",
|
|
10
|
-
"sap/ui/fl/support/_internal/getChangeDependencies"
|
|
13
|
+
"sap/ui/fl/support/_internal/getChangeDependencies",
|
|
14
|
+
"sap/ui/fl/Utils"
|
|
11
15
|
], function(
|
|
16
|
+
Log,
|
|
17
|
+
ComponentRegistry,
|
|
12
18
|
getAllUIChanges,
|
|
19
|
+
getFlexObjectInfos,
|
|
13
20
|
getFlexSettings,
|
|
14
|
-
getChangeDependencies
|
|
21
|
+
getChangeDependencies,
|
|
22
|
+
Utils
|
|
15
23
|
) {
|
|
16
24
|
"use strict";
|
|
17
25
|
|
|
26
|
+
async function findComponentAndCallFunction(fnFunction, sModulePath) {
|
|
27
|
+
if (Utils.getUshellContainer()) {
|
|
28
|
+
const oAppLifeCycleService = await Utils.getUShellService("AppLifeCycle");
|
|
29
|
+
const oCurrentApp = oAppLifeCycleService.getCurrentApplication();
|
|
30
|
+
if (oCurrentApp.componentInstance) {
|
|
31
|
+
return fnFunction(oCurrentApp.componentInstance);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// potential cFLP scenario with the instance running in an iFrame where the top has no access to the componentInstance
|
|
35
|
+
// in this case the module has to be required inside the iFrame and executed there
|
|
36
|
+
const oIntent = await oCurrentApp.getIntent();
|
|
37
|
+
// The iFrame ID is not public API and may change in the future.
|
|
38
|
+
// Until there is an API, this is the way how to get any hold on the app at all
|
|
39
|
+
var iFrame = document.getElementById(`application-${oIntent.semanticObject}-${oIntent.action}`);
|
|
40
|
+
if (!iFrame) {
|
|
41
|
+
const sError = "Possible cFLP scenario, but the iFrame can't be found";
|
|
42
|
+
Log.error(sError);
|
|
43
|
+
throw Error(sError);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return new Promise(function(resolve) {
|
|
47
|
+
iFrame.contentWindow.sap.ui.require([sModulePath], function(fnModuleInsideIFrame) {
|
|
48
|
+
fnModuleInsideIFrame().then(resolve);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// standalone case
|
|
54
|
+
const aApplications = ComponentRegistry.filter(function(oComponent) {
|
|
55
|
+
return oComponent.getManifestObject().getRawJson()["sap.app"].type === "application";
|
|
56
|
+
});
|
|
57
|
+
if (aApplications.length === 1) {
|
|
58
|
+
return getAllUIChanges(aApplications[0]);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
throw Error("No application component found");
|
|
62
|
+
}
|
|
63
|
+
|
|
18
64
|
/**
|
|
19
65
|
* Provides an API for support tools
|
|
20
66
|
*
|
|
21
67
|
* @namespace sap.ui.fl.support.api.SupportAPI
|
|
22
68
|
* @since 1.98
|
|
23
|
-
* @version 1.
|
|
69
|
+
* @version 1.128.0
|
|
24
70
|
* @private
|
|
25
71
|
* @ui5-restricted ui5 support tools
|
|
26
72
|
*/
|
|
27
73
|
var SupportAPI = /** @lends sap.ui.fl.support.api.SupportAPI */{
|
|
28
|
-
getAllUIChanges
|
|
74
|
+
getAllUIChanges() {
|
|
75
|
+
return findComponentAndCallFunction(getAllUIChanges, "sap/ui/fl/support/_internal/getAllUIChanges");
|
|
76
|
+
},
|
|
77
|
+
getFlexObjectInfos() {
|
|
78
|
+
return findComponentAndCallFunction(getFlexObjectInfos, "sap/ui/fl/support/_internal/getFlexObjectInfos");
|
|
79
|
+
},
|
|
29
80
|
getChangeDependencies,
|
|
30
81
|
getFlexSettings
|
|
31
82
|
};
|
|
32
83
|
|
|
33
84
|
return SupportAPI;
|
|
34
|
-
});
|
|
85
|
+
});
|
|
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/fl/Utils", "sap/ui/thirdparty/jquery"], function(Utils, j
|
|
|
13
13
|
* @constructor
|
|
14
14
|
* @alias sap.ui.fl.support.apps.contentbrowser.lrepConnector.LRepConnector
|
|
15
15
|
* @author SAP SE
|
|
16
|
-
* @version 1.
|
|
16
|
+
* @version 1.128.0
|
|
17
17
|
* @since 1.45
|
|
18
18
|
* @private
|
|
19
19
|
*/
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @alias sap.ui.fl.transport.TransportSelection
|
|
18
18
|
* @constructor
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.128.0
|
|
21
21
|
* @since 1.38.0
|
|
22
22
|
* Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
|
|
23
23
|
* of the SmartVariant control.
|
|
@@ -11,9 +11,20 @@ sap.ui.define([
|
|
|
11
11
|
) {
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
14
|
+
function splitEscapePath(sPropertyPath) {
|
|
15
|
+
const sReplaceEscapeWithDummy = sPropertyPath.replaceAll("\\/", "*");
|
|
16
|
+
const aPath = sReplaceEscapeWithDummy.split("/");
|
|
17
|
+
return aPath.map((element) => element.replaceAll("*", "/"));
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
function setPropValueByPath(oEntityProp, oRoot) {
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
let aPath;
|
|
22
|
+
if (oEntityProp.propertyPath.includes("\\")) {
|
|
23
|
+
aPath = splitEscapePath(oEntityProp.propertyPath);
|
|
24
|
+
} else {
|
|
25
|
+
aPath = oEntityProp.propertyPath.split("/");
|
|
26
|
+
}
|
|
27
|
+
const valueByPath = ObjectPath.get(aPath, oRoot);
|
|
17
28
|
|
|
18
29
|
if (valueByPath && oEntityProp.operation === "INSERT") {
|
|
19
30
|
throw new Error("Path has already a value. 'INSERT' operation is not appropriate.");
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
"use strict";
|
|
34
34
|
|
|
35
35
|
// shortcut for sap.ui.core.TitleLevel
|
|
36
|
-
var {TitleLevel} = coreLibrary;
|
|
36
|
+
var { TitleLevel } = coreLibrary;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Constructor for a new <code>VariantManagement</code>.
|
|
@@ -139,11 +139,11 @@ sap.ui.define([
|
|
|
139
139
|
},
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
* Semantic level of the header.
|
|
143
|
+
* For more information, see {@link sap.m.Title#setLevel}.
|
|
144
|
+
*
|
|
145
|
+
* @since 1.104
|
|
146
|
+
*/
|
|
147
147
|
headerLevel: {
|
|
148
148
|
type: "sap.ui.core.TitleLevel",
|
|
149
149
|
group: "Appearance",
|
|
@@ -688,23 +688,23 @@ sap.ui.define([
|
|
|
688
688
|
};
|
|
689
689
|
|
|
690
690
|
/**
|
|
691
|
-
|
|
691
|
+
* Special handling of the rendering of this control.
|
|
692
692
|
* @param {boolean} bValue Defines the intended rendering
|
|
693
693
|
* @returns {sap.ui.fl.variants.VariantManagement} The current instance
|
|
694
694
|
* @private
|
|
695
695
|
* @restricted sap.ui.mdc
|
|
696
|
-
|
|
696
|
+
*/
|
|
697
697
|
VariantManagement.prototype.setShowAsText = function(bValue) {
|
|
698
698
|
this._oVM.setShowAsText(bValue);
|
|
699
699
|
return this;
|
|
700
700
|
};
|
|
701
701
|
|
|
702
702
|
/**
|
|
703
|
-
|
|
703
|
+
* Special handling of the rendering of this control.
|
|
704
704
|
* @returns {boolean} The current intent
|
|
705
705
|
* @private
|
|
706
706
|
* @restricted sap.ui.mdc
|
|
707
|
-
|
|
707
|
+
*/
|
|
708
708
|
VariantManagement.prototype.getShowAsText = function() {
|
|
709
709
|
return this._oVM.getShowAsText();
|
|
710
710
|
};
|
|
@@ -920,7 +920,7 @@ sap.ui.define([
|
|
|
920
920
|
};
|
|
921
921
|
|
|
922
922
|
VariantManagement.prototype._createItemsModel = function(sModelName) {
|
|
923
|
-
|
|
923
|
+
this._oItemsTemplate = new VariantItem({
|
|
924
924
|
key: `{${sModelName}>key}`,
|
|
925
925
|
title: `{${sModelName}>title}`,
|
|
926
926
|
sharing: `{${sModelName}>sharing}`,
|
|
@@ -937,7 +937,7 @@ sap.ui.define([
|
|
|
937
937
|
this._oVM.bindAggregation("items", {
|
|
938
938
|
path: `${this.oContext}/variants`,
|
|
939
939
|
model: sModelName,
|
|
940
|
-
template:
|
|
940
|
+
template: this._oItemsTemplate,
|
|
941
941
|
filters: new Filter({
|
|
942
942
|
path: "visible",
|
|
943
943
|
operator: FilterOperator.EQ,
|
|
@@ -1035,8 +1035,15 @@ sap.ui.define([
|
|
|
1035
1035
|
this._oVM.detachSelect(this._fireSelect, this);
|
|
1036
1036
|
this._oVM.detachSave(this._fireSave, this);
|
|
1037
1037
|
|
|
1038
|
-
|
|
1039
|
-
|
|
1038
|
+
if (this._oVM) {
|
|
1039
|
+
this._oVM.destroy();
|
|
1040
|
+
this._oVM = undefined;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
if (this._oItemsTemplate) {
|
|
1044
|
+
this._oItemsTemplate.destroy();
|
|
1045
|
+
this._oItemsTemplate = undefined;
|
|
1046
|
+
}
|
|
1040
1047
|
|
|
1041
1048
|
this._fRegisteredApplyAutomaticallyOnStandardVariant = null;
|
|
1042
1049
|
this.oContext = undefined;
|
|
@@ -1046,6 +1053,8 @@ sap.ui.define([
|
|
|
1046
1053
|
this._aSaveEventHandlers = undefined;
|
|
1047
1054
|
this._aManageEventHandlers = undefined;
|
|
1048
1055
|
this._aSelectEventHandlers = undefined;
|
|
1056
|
+
|
|
1057
|
+
Control.prototype.exit.apply(this, aArgs);
|
|
1049
1058
|
};
|
|
1050
1059
|
|
|
1051
1060
|
// <overwrite for docu>
|
|
@@ -26,11 +26,11 @@ sap.ui.define([
|
|
|
26
26
|
"sap/ui/fl/apply/_internal/flexState/FlexObjectState",
|
|
27
27
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
28
28
|
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
29
|
+
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
29
30
|
"sap/ui/fl/Layer",
|
|
30
31
|
"sap/ui/fl/LayerUtils",
|
|
31
32
|
"sap/ui/fl/Utils",
|
|
32
33
|
"sap/ui/fl/registry/Settings",
|
|
33
|
-
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
34
34
|
"sap/ui/model/BindingMode",
|
|
35
35
|
"sap/ui/model/json/JSONModel"
|
|
36
36
|
], function(
|
|
@@ -55,11 +55,11 @@ sap.ui.define([
|
|
|
55
55
|
FlexObjectState,
|
|
56
56
|
ManifestUtils,
|
|
57
57
|
VariantUtil,
|
|
58
|
+
ContextBasedAdaptationsAPI,
|
|
58
59
|
Layer,
|
|
59
60
|
LayerUtils,
|
|
60
61
|
Utils,
|
|
61
62
|
Settings,
|
|
62
|
-
ContextBasedAdaptationsAPI,
|
|
63
63
|
BindingMode,
|
|
64
64
|
JSONModel
|
|
65
65
|
) {
|
|
@@ -306,7 +306,7 @@ sap.ui.define([
|
|
|
306
306
|
* @class Variant model implementation for JSON format.
|
|
307
307
|
* @extends sap.ui.model.json.JSONModel
|
|
308
308
|
* @author SAP SE
|
|
309
|
-
* @version 1.
|
|
309
|
+
* @version 1.128.0
|
|
310
310
|
* @param {object} oData - Either the URL where to load the JSON from or a JS object
|
|
311
311
|
* @param {object} mPropertyBag - Map of properties required for the constructor
|
|
312
312
|
* @param {sap.ui.fl.FlexController} mPropertyBag.flexController - <code>FlexController</code> instance for the component which uses the variant model
|
|
@@ -628,7 +628,7 @@ sap.ui.define([
|
|
|
628
628
|
.then((oReturn) => {
|
|
629
629
|
if (!oReturn.success) {
|
|
630
630
|
var oException = oReturn.error || new Error("The change could not be applied.");
|
|
631
|
-
this.
|
|
631
|
+
this.oChangePersistence.deleteChange(oChange, true);
|
|
632
632
|
throw oException;
|
|
633
633
|
}
|
|
634
634
|
});
|
|
@@ -789,7 +789,8 @@ sap.ui.define([
|
|
|
789
789
|
};
|
|
790
790
|
|
|
791
791
|
VariantModel.prototype.removeVariant = function(mPropertyBag) {
|
|
792
|
-
var aChangesToBeDeleted =
|
|
792
|
+
var aChangesToBeDeleted = FlexObjectState.getDirtyFlexObjects(this.sFlexReference)
|
|
793
|
+
.filter(function(oChange) {
|
|
793
794
|
return (oChange.getVariantReference && oChange.getVariantReference() === mPropertyBag.variant.getId()) ||
|
|
794
795
|
oChange.getId() === mPropertyBag.variant.getId();
|
|
795
796
|
});
|
|
@@ -1501,7 +1502,7 @@ sap.ui.define([
|
|
|
1501
1502
|
return oChange.getId();
|
|
1502
1503
|
});
|
|
1503
1504
|
|
|
1504
|
-
return this.
|
|
1505
|
+
return FlexObjectState.getDirtyFlexObjects(this.sFlexReference).filter(function(oChange) {
|
|
1505
1506
|
return aChangeFileNames.includes(oChange.getId()) && !oChange.getSavedToVariant();
|
|
1506
1507
|
});
|
|
1507
1508
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
RADIO_BUTTON_GROUP_LABEL=
|
|
2
|
-
ADD_CONTEXTS_BUTTON=
|
|
3
|
-
REMOVE_ALL_BUTTON=
|
|
4
|
-
NO_DATA=
|
|
5
|
-
SELECT_ROLE_DIALOG_TITLE=
|
|
6
|
-
COLUMN_CONTEXT_ID=
|
|
7
|
-
COLUMN_CONTEXT_DESCRIPTION=
|
|
8
|
-
SELECTED_CONTEXT_LIST_TITLE=
|
|
9
|
-
NO_DESCRIPTION=
|
|
10
|
-
NO_SELECTED_ROLES=
|
|
11
|
-
NO_SELECTED_ROLES_WITH_ADVICE=
|
|
12
|
-
VISIBILITY=
|
|
1
|
+
RADIO_BUTTON_GROUP_LABEL=ljonvFscQfFk1oGzI3c0/g_Visibility
|
|
2
|
+
ADD_CONTEXTS_BUTTON=WpqLmJzxQFT5hppV0oWSwg_Add Roles
|
|
3
|
+
REMOVE_ALL_BUTTON=suTXSwopbwtnb6+85ArXaw_Remove All
|
|
4
|
+
NO_DATA=I1bWi0ey/Wvn2UTHtE3i4g_No roles found
|
|
5
|
+
SELECT_ROLE_DIALOG_TITLE=ViYV+sjlpAGK6t1nyrZmRg_Select Roles
|
|
6
|
+
COLUMN_CONTEXT_ID=x1mo1EDRY2e9lJpGm0PNug_Role
|
|
7
|
+
COLUMN_CONTEXT_DESCRIPTION=M9XtTNeBapBCOGZyIpClvw_Description
|
|
8
|
+
SELECTED_CONTEXT_LIST_TITLE=ZeLd7YWYJ3swVvD0+nNelw_Selected Roles
|
|
9
|
+
NO_DESCRIPTION=PPSp+tER40fcq/AiBejuuA_No description available
|
|
10
|
+
NO_SELECTED_ROLES=UAMemN6rvmRz23bzRaWFvA_No roles selected.
|
|
11
|
+
NO_SELECTED_ROLES_WITH_ADVICE=XEdQyZS2xN/XkLY5XGusrw_No roles selected. Please select at least one role.
|
|
12
|
+
VISIBILITY=Zgl2xVdHdB9pcejiEKuHMw_Visible for all users. Add roles to restrict the visibility of the view.
|
|
@@ -9,6 +9,8 @@ sap.ui.define([
|
|
|
9
9
|
"sap/base/util/merge",
|
|
10
10
|
"sap/base/Log",
|
|
11
11
|
"sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes",
|
|
12
|
+
"sap/ui/fl/apply/_internal/flexState/FlexObjectState",
|
|
13
|
+
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
12
14
|
"sap/ui/fl/registry/Settings",
|
|
13
15
|
"sap/ui/fl/write/_internal/appVariant/AppVariantFactory",
|
|
14
16
|
"sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory",
|
|
@@ -20,6 +22,8 @@ sap.ui.define([
|
|
|
20
22
|
merge,
|
|
21
23
|
Log,
|
|
22
24
|
DescriptorChangeTypes,
|
|
25
|
+
FlexObjectState,
|
|
26
|
+
ManifestUtils,
|
|
23
27
|
Settings,
|
|
24
28
|
AppVariantFactory,
|
|
25
29
|
AppVariantInlineChangeFactory,
|
|
@@ -135,23 +139,15 @@ sap.ui.define([
|
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
function _getDirtyDescrChanges(vSelector) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return [];
|
|
141
|
-
}
|
|
142
|
-
return oFlexControllerPersistence.getDirtyChanges().filter(function(oChange) {
|
|
142
|
+
const sReference = ManifestUtils.getFlexReferenceForSelector(vSelector);
|
|
143
|
+
return FlexObjectState.getDirtyFlexObjects(sReference).filter(function(oChange) {
|
|
143
144
|
return DescriptorChangeTypes.getChangeTypes().includes(oChange.getChangeType());
|
|
144
145
|
});
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
function _getDirtyChanges(vSelector) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return [];
|
|
151
|
-
}
|
|
152
|
-
var aChanges = oFlexControllerPersistence.getDirtyChanges();
|
|
153
|
-
aChanges = aChanges.slice();
|
|
154
|
-
return aChanges;
|
|
149
|
+
const sReference = ManifestUtils.getFlexReferenceForSelector(vSelector);
|
|
150
|
+
return FlexObjectState.getDirtyFlexObjects(sReference).slice();
|
|
155
151
|
}
|
|
156
152
|
|
|
157
153
|
function _deleteDescrChangesFromPersistence(vSelector) {
|
|
@@ -228,6 +224,9 @@ sap.ui.define([
|
|
|
228
224
|
if (aUIChanges.length) {
|
|
229
225
|
// Save the dirty UI changes to backend => firing PersistenceWriteApi.save
|
|
230
226
|
return oFlexController.saveAll(Utils.getAppComponentForSelector(mPropertyBag.selector), true)
|
|
227
|
+
.then(function() {
|
|
228
|
+
oFlexController._oChangePersistence.removeDirtyChanges();
|
|
229
|
+
})
|
|
231
230
|
.catch(function(oError) {
|
|
232
231
|
// Delete the inconsistent app variant if the UI changes failed to save
|
|
233
232
|
return this.deleteAppVariant({
|