@openui5/sap.ui.fl 1.104.0 → 1.105.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/.reuse/dep5 +1 -1
- 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 +3 -3
- package/src/sap/ui/fl/Change.js +29 -4
- package/src/sap/ui/fl/ChangePersistence.js +26 -14
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnector.js +6 -0
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +9 -3
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +9 -3
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +9 -3
- package/src/sap/ui/fl/FlexController.js +3 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/Layer.js +5 -2
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +76 -41
- package/src/sap/ui/fl/apply/_internal/ChangesController.js +2 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +3 -3
- 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 +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/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/ObjectStorageConnector.js +2 -2
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +3 -3
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +2 -2
- package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +8 -43
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +73 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +11 -20
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +81 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +111 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +51 -17
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +114 -34
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +4 -15
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +22 -6
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.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 +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +27 -35
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/prepareVariantsMap.js +76 -111
- 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 +4 -4
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +2 -2
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +7 -7
- package/src/sap/ui/fl/changeHandler/AddXML.js +14 -16
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +9 -6
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +30 -35
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +14 -15
- package/src/sap/ui/fl/changeHandler/BaseRename.js +9 -15
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +12 -8
- package/src/sap/ui/fl/changeHandler/MoveElements.js +3 -2
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +13 -12
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +18 -21
- 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 +3 -5
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +3 -5
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +13 -22
- 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 +2 -2
- package/src/sap/ui/fl/initial/_internal/Storage.js +18 -5
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +27 -3
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +4 -4
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +8 -0
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +9 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -2
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +3 -3
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +2 -3
- package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +2 -3
- package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +5 -5
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +3 -3
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +9 -6
- package/src/sap/ui/fl/interfaces/Delegate.js +34 -18
- package/src/sap/ui/fl/library.js +351 -27
- package/src/sap/ui/fl/messagebundle_ar.properties +2 -0
- package/src/sap/ui/fl/messagebundle_bg.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ca.properties +2 -0
- package/src/sap/ui/fl/messagebundle_cs.properties +2 -0
- package/src/sap/ui/fl/messagebundle_cy.properties +2 -0
- package/src/sap/ui/fl/messagebundle_da.properties +2 -0
- package/src/sap/ui/fl/messagebundle_de.properties +2 -0
- package/src/sap/ui/fl/messagebundle_el.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +37 -2
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +2 -0
- package/src/sap/ui/fl/messagebundle_es.properties +2 -0
- package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/fl/messagebundle_et.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hu.properties +2 -0
- package/src/sap/ui/fl/messagebundle_id.properties +2 -0
- package/src/sap/ui/fl/messagebundle_it.properties +2 -0
- package/src/sap/ui/fl/messagebundle_iw.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ja.properties +2 -0
- package/src/sap/ui/fl/messagebundle_kk.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ko.properties +2 -0
- package/src/sap/ui/fl/messagebundle_lt.properties +2 -0
- package/src/sap/ui/fl/messagebundle_lv.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ms.properties +2 -0
- package/src/sap/ui/fl/messagebundle_nl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_no.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pt.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ro.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ru.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sh.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sk.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sv.properties +2 -0
- package/src/sap/ui/fl/messagebundle_th.properties +2 -0
- package/src/sap/ui/fl/messagebundle_tr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_uk.properties +2 -0
- package/src/sap/ui/fl/messagebundle_vi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -0
- package/src/sap/ui/fl/requireAsync.js +2 -2
- package/src/sap/ui/fl/support/{apps/uiFlexibilityDiagnostics/helper/Extractor.js → _internal/extractChangeDependencies.js} +55 -57
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +6 -6
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +14 -4
- package/src/sap/ui/fl/support/api/SupportAPI.js +3 -3
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +16 -5
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +18 -8
- 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/i18n/i18n.properties +4 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +11 -3
- 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/support/apps/contentbrowser/view/ContentDetails.view.xml +1 -0
- package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetailsEdit.view.xml +1 -0
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +27 -2
- 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 +41 -14
- package/src/sap/ui/fl/variants/VariantModel.js +90 -98
- package/src/sap/ui/fl/write/_internal/FlexInfoSession.js +46 -0
- package/src/sap/ui/fl/write/_internal/SaveAs.js +8 -9
- package/src/sap/ui/fl/write/_internal/Storage.js +4 -4
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +3 -3
- package/src/sap/ui/fl/write/_internal/Versions.js +3 -3
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +3 -3
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +3 -3
- 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 +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/JsObjectConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +27 -18
- package/src/sap/ui/fl/write/_internal/connectors/LocalStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/ObjectStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +3 -3
- package/src/sap/ui/fl/write/_internal/delegates/ODataV4ReadDelegate.js +2 -2
- 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 +4 -4
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +3 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +3 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +4 -4
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +68 -18
- 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 +47 -10
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +3 -3
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +10 -3
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +24 -18
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +2 -2
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +2 -2
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +9 -7
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +3 -3
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +2 -2
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +5 -46
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +49 -43
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/TranslationAPI.js +2 -2
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/VersionsAPI.js +2 -2
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +4 -3
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +4 -3
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +4 -4
- package/src/sap/ui/fl/Variant.js +0 -511
- package/src/sap/ui/fl/support/Flexibility.js +0 -384
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/Component.js +0 -18
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/controller/Root.controller.js +0 -227
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/index.html +0 -21
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/manifest.json +0 -44
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/view/Root.view.xml +0 -95
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +0 -35
- package/src/sap/ui/fl/support/diagnostics/Flexibility.view.xml +0 -41
- package/src/sap/ui/fl/support/flexibility.css +0 -32
|
@@ -24,6 +24,16 @@ sap.ui.define([
|
|
|
24
24
|
v4: "v4"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
function _extractName(sQualifiedName) {
|
|
28
|
+
if (sQualifiedName && sQualifiedName.split) {
|
|
29
|
+
var aSegments = sQualifiedName.split("."); //If separator does not occur, the returned array contains one element consisting of the entire string
|
|
30
|
+
|
|
31
|
+
return aSegments[aSegments.length - 1];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
/**
|
|
28
38
|
* Extracts error messages from request failure response
|
|
29
39
|
*
|
|
@@ -31,7 +41,7 @@ sap.ui.define([
|
|
|
31
41
|
* @param {object} oXHR - request object
|
|
32
42
|
* @returns {array} errorMessages
|
|
33
43
|
*/
|
|
34
|
-
|
|
44
|
+
function _getMessagesFromXHR(oXHR) {
|
|
35
45
|
var aMessages = [];
|
|
36
46
|
|
|
37
47
|
try {
|
|
@@ -54,12 +64,23 @@ sap.ui.define([
|
|
|
54
64
|
return aMessages;
|
|
55
65
|
}
|
|
56
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Get binding path of a given control. In case of SmartTable or SmartFilterBar the target entity set is relevant.
|
|
69
|
+
*
|
|
70
|
+
* @private
|
|
71
|
+
* @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
|
|
72
|
+
* @param {string} sBindingPath - binding path of control resp. target entity set
|
|
73
|
+
* @returns {string} sBindingPath - binding path resp. target entity set of control or <code>null</code>
|
|
74
|
+
*/
|
|
57
75
|
function _getBindingPath(oControl) {
|
|
58
|
-
var sBindingPath =
|
|
59
|
-
var oBindingContext = oControl.getBindingContext ? oControl.getBindingContext() : null;
|
|
76
|
+
var sBindingPath = _extractName(_getEntitySet(oControl));
|
|
60
77
|
|
|
61
|
-
if (
|
|
62
|
-
|
|
78
|
+
if (!sBindingPath) {
|
|
79
|
+
var oBindingContext = oControl.getBindingContext ? oControl.getBindingContext() : null;
|
|
80
|
+
|
|
81
|
+
if (oBindingContext && oBindingContext.getPath) {
|
|
82
|
+
sBindingPath = oBindingContext.getPath();
|
|
83
|
+
}
|
|
63
84
|
}
|
|
64
85
|
|
|
65
86
|
if (!sBindingPath) {
|
|
@@ -75,11 +96,22 @@ sap.ui.define([
|
|
|
75
96
|
* @private
|
|
76
97
|
* @param {sap.ui.model.odata.v2.ODataModel} oModel - oData model
|
|
77
98
|
* @param {string} sBindingPath - binding path of control
|
|
99
|
+
* @param {string} sEntityType - entity type of control (i.e. SmartFilterBar)
|
|
78
100
|
* @returns {Promise<string>} Resolves with the entity set name to which the control is bound or <code>null</code>
|
|
79
101
|
*/
|
|
80
|
-
function _getBoundEntitySetFromV2Model(oModel, sBindingPath) {
|
|
102
|
+
function _getBoundEntitySetFromV2Model(oModel, sBindingPath, sEntityType) {
|
|
81
103
|
return oModel.metadataLoaded().then(function() {
|
|
82
|
-
var oEntitySet =
|
|
104
|
+
var oEntitySet = null;
|
|
105
|
+
|
|
106
|
+
if (sEntityType) {
|
|
107
|
+
var oEntityType = oModel.oMetadata._getEntityTypeByName(sEntityType);
|
|
108
|
+
oEntitySet = oModel.oMetadata._getEntitySetByType(oEntityType);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (!oEntitySet) {
|
|
112
|
+
oEntitySet = oModel.oMetadata._getEntitySetByPath(sBindingPath);
|
|
113
|
+
}
|
|
114
|
+
|
|
83
115
|
return oEntitySet ? oEntitySet.name : null;
|
|
84
116
|
});
|
|
85
117
|
}
|
|
@@ -92,7 +124,7 @@ sap.ui.define([
|
|
|
92
124
|
* @param {string} sBindingPath - binding path of control
|
|
93
125
|
* @returns {Promise<string>} Resolves with the entity set name to which the control is bound or <code>null</code>
|
|
94
126
|
*/
|
|
95
|
-
|
|
127
|
+
function _getBoundEntitySetFromV4Model(oModel, sBindingPath) {
|
|
96
128
|
var oMetaModel = oModel.getMetaModel();
|
|
97
129
|
var sMetaPath = oMetaModel.getMetaPath(sBindingPath);
|
|
98
130
|
|
|
@@ -113,11 +145,21 @@ sap.ui.define([
|
|
|
113
145
|
* @private
|
|
114
146
|
* @param {sap.ui.model.odata.v2.ODataModel} oModel - oData model
|
|
115
147
|
* @param {string} sBindingPath - binding path of control
|
|
148
|
+
* @param {string} sEntityType - entity type of control (i.e. SmartFilterBar)
|
|
116
149
|
* @returns {Promise<string>} Resolves with the entity type name to which the control is bound or <code>null</code>
|
|
117
150
|
*/
|
|
118
|
-
function _getBoundEntityTypeFromV2Model(oModel, sBindingPath) {
|
|
151
|
+
function _getBoundEntityTypeFromV2Model(oModel, sBindingPath, sEntityType) {
|
|
119
152
|
return oModel.metadataLoaded().then(function() {
|
|
120
|
-
var oEntityType =
|
|
153
|
+
var oEntityType = null;
|
|
154
|
+
|
|
155
|
+
if (sEntityType) {
|
|
156
|
+
oEntityType = oModel.oMetadata._getEntityTypeByName(sEntityType);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (!oEntityType) {
|
|
160
|
+
oEntityType = oModel.oMetadata._getEntityTypeByPath(sBindingPath);
|
|
161
|
+
}
|
|
162
|
+
|
|
121
163
|
return oEntityType ? oEntityType.name : null;
|
|
122
164
|
});
|
|
123
165
|
}
|
|
@@ -130,16 +172,23 @@ sap.ui.define([
|
|
|
130
172
|
* @param {string} sBindingPath - binding path of control
|
|
131
173
|
* @returns {Promise<string>} Resolves with the entity type name to which the control is bound or <code>null</code>
|
|
132
174
|
*/
|
|
133
|
-
|
|
175
|
+
function _getBoundEntityTypeFromV4Model(oModel, sBindingPath) {
|
|
134
176
|
var oMetaModel = oModel.getMetaModel();
|
|
135
177
|
var sMetaPath = oMetaModel.getMetaPath(sBindingPath);
|
|
136
178
|
|
|
137
179
|
return oMetaModel.requestObject(sMetaPath).then(function(oEntitySet) {
|
|
138
|
-
|
|
139
|
-
return aSegments[aSegments.length - 1];
|
|
180
|
+
return _extractName(oEntitySet.$Type);
|
|
140
181
|
});
|
|
141
182
|
}
|
|
142
183
|
|
|
184
|
+
function _getEntitySet(oControl) {
|
|
185
|
+
return oControl.getEntitySet ? oControl.getEntitySet() : null;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function _getEntityType(oControl) {
|
|
189
|
+
return oControl.getEntityType ? oControl.getEntityType() : null;
|
|
190
|
+
}
|
|
191
|
+
|
|
143
192
|
function _getServiceUri(oModel) {
|
|
144
193
|
var sServiceUri = null;
|
|
145
194
|
|
|
@@ -200,7 +249,7 @@ sap.ui.define([
|
|
|
200
249
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.Utils
|
|
201
250
|
* @experimental Since 1.87.0
|
|
202
251
|
* @author SAP SE
|
|
203
|
-
* @version 1.
|
|
252
|
+
* @version 1.105.0
|
|
204
253
|
*/
|
|
205
254
|
var Utils = {};
|
|
206
255
|
|
|
@@ -216,7 +265,8 @@ sap.ui.define([
|
|
|
216
265
|
var oModel = _getModel(oControl);
|
|
217
266
|
var sServiceUri = _getServiceUri(oModel);
|
|
218
267
|
var sBindingPath = _getBindingPath(oControl);
|
|
219
|
-
|
|
268
|
+
var sEntityType = _getEntityType(oControl);
|
|
269
|
+
return Boolean(sServiceUri && (sBindingPath || sEntityType));
|
|
220
270
|
}
|
|
221
271
|
|
|
222
272
|
Log.warning("No Control passed");
|
|
@@ -269,7 +319,7 @@ sap.ui.define([
|
|
|
269
319
|
var sProtocolType = _getProtocolType(oModel);
|
|
270
320
|
|
|
271
321
|
if (sProtocolType === mProtocolType.v2) {
|
|
272
|
-
return _getBoundEntitySetFromV2Model(oModel, _getBindingPath(oControl));
|
|
322
|
+
return _getBoundEntitySetFromV2Model(oModel, _getBindingPath(oControl), _getEntityType(oControl));
|
|
273
323
|
} else if (sProtocolType === mProtocolType.v4) {
|
|
274
324
|
return _getBoundEntitySetFromV4Model(oModel, _getBindingPath(oControl));
|
|
275
325
|
}
|
|
@@ -289,7 +339,7 @@ sap.ui.define([
|
|
|
289
339
|
var sProtocolType = _getProtocolType(oModel);
|
|
290
340
|
|
|
291
341
|
if (sProtocolType === mProtocolType.v2) {
|
|
292
|
-
return _getBoundEntityTypeFromV2Model(oModel, _getBindingPath(oControl));
|
|
342
|
+
return _getBoundEntityTypeFromV2Model(oModel, _getBindingPath(oControl), _getEntityType(oControl));
|
|
293
343
|
} else if (sProtocolType === mProtocolType.v4) {
|
|
294
344
|
return _getBoundEntityTypeFromV4Model(oModel, _getBindingPath(oControl));
|
|
295
345
|
}
|
|
@@ -344,7 +394,7 @@ sap.ui.define([
|
|
|
344
394
|
* @param {Map} mParameters Map of given parameters
|
|
345
395
|
* @returns {string} encoded URI parameters
|
|
346
396
|
*/
|
|
347
|
-
|
|
397
|
+
Utils.getUriParameters = function(mParameters) {
|
|
348
398
|
if (!mParameters) {
|
|
349
399
|
return "";
|
|
350
400
|
}
|
|
@@ -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.105.0
|
|
84
84
|
* @since 1.93
|
|
85
85
|
* @experimental Since 1.93
|
|
86
86
|
* @private
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
@@ -12,6 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/apply/_internal/ChangesController",
|
|
13
13
|
"sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState",
|
|
14
14
|
"sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger",
|
|
15
|
+
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
15
16
|
"sap/ui/fl/ChangePersistenceFactory",
|
|
16
17
|
"sap/ui/fl/LayerUtils",
|
|
17
18
|
"sap/ui/fl/apply/_internal/flexState/compVariants/Utils",
|
|
@@ -24,6 +25,7 @@ sap.ui.define([
|
|
|
24
25
|
ChangesController,
|
|
25
26
|
CompVariantState,
|
|
26
27
|
CompVariantMerger,
|
|
28
|
+
VariantManagementState,
|
|
27
29
|
ChangePersistenceFactory,
|
|
28
30
|
LayerUtils,
|
|
29
31
|
CompVariantsUtils,
|
|
@@ -34,7 +36,7 @@ sap.ui.define([
|
|
|
34
36
|
/**
|
|
35
37
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexObjectState
|
|
36
38
|
* @since 1.83
|
|
37
|
-
* @version 1.
|
|
39
|
+
* @version 1.105.0
|
|
38
40
|
* @private
|
|
39
41
|
* @ui5-restricted sap.ui.fl
|
|
40
42
|
*/
|
|
@@ -87,17 +89,52 @@ sap.ui.define([
|
|
|
87
89
|
return ChangePersistenceFactory.getChangePersistenceForComponent(mPropertyBag.reference);
|
|
88
90
|
}
|
|
89
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Removes variant-dependent changes belonging to variants which are currently not selected
|
|
94
|
+
*
|
|
95
|
+
* @param {array} aChanges - List of changes to check
|
|
96
|
+
* @param {sap.ui.fl.Control} oControl - Control for which the changes are being checked
|
|
97
|
+
* @returns {sap.ui.fl.Change[]} List of variant-dependent changes belonging to the currently selected variants
|
|
98
|
+
*/
|
|
99
|
+
function filterChangesByCurrentVariants(aChanges, oControl) {
|
|
100
|
+
// 1. Get current variant references
|
|
101
|
+
var oComponent = Utils.getAppComponentForControl(oControl);
|
|
102
|
+
var oModel = oComponent.getModel(Utils.VARIANT_MODEL_NAME);
|
|
103
|
+
var sFlexReference = oModel && oModel.sFlexReference;
|
|
104
|
+
var aVariantManagementReferences = VariantManagementState.getVariantManagementReferences(sFlexReference);
|
|
105
|
+
|
|
106
|
+
if (aVariantManagementReferences.length === 0) {
|
|
107
|
+
return aChanges;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var aCurrentVariantReferences = aVariantManagementReferences.map(function(sVMReference) {
|
|
111
|
+
return oModel.getCurrentVariantReference(sVMReference);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// 2. Remove variant-dependent changes not assigned to a current variant reference
|
|
115
|
+
return aChanges.filter(function(oChange) {
|
|
116
|
+
return aCurrentVariantReferences.some(function(sCurrentVariantReference) {
|
|
117
|
+
return oChange.getVariantReference() === sCurrentVariantReference
|
|
118
|
+
|| !oChange.getVariantReference();
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
90
123
|
function getChangePersistenceEntities(mPropertyBag) {
|
|
91
124
|
var oChangePersistence = getChangePersistence(mPropertyBag);
|
|
92
125
|
|
|
93
126
|
return oChangePersistence.getChangesForComponent(_omit(mPropertyBag, ["invalidateCache", "selector"]), mPropertyBag.invalidateCache)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
127
|
+
.then(function(aPersistedChanges) {
|
|
128
|
+
var aDirtyChanges = [];
|
|
129
|
+
if (mPropertyBag.includeDirtyChanges) {
|
|
130
|
+
aDirtyChanges = oChangePersistence.getDirtyChanges();
|
|
131
|
+
}
|
|
132
|
+
var aChanges = aPersistedChanges.concat(aDirtyChanges);
|
|
133
|
+
if (mPropertyBag.onlyCurrentVariants) {
|
|
134
|
+
return filterChangesByCurrentVariants(aChanges, mPropertyBag.selector);
|
|
135
|
+
}
|
|
136
|
+
return aChanges;
|
|
137
|
+
});
|
|
101
138
|
}
|
|
102
139
|
|
|
103
140
|
function saveChangePersistenceEntities(mPropertyBag, oAppComponent) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
@@ -259,7 +259,7 @@ sap.ui.define([
|
|
|
259
259
|
*
|
|
260
260
|
* @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
|
|
261
261
|
* @since 1.83
|
|
262
|
-
* @version 1.
|
|
262
|
+
* @version 1.105.0
|
|
263
263
|
* @private
|
|
264
264
|
* @ui5-restricted sap.ui.fl
|
|
265
265
|
*/
|
|
@@ -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.105.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.
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* Entity that handles ABAP transport related information.
|
|
28
28
|
* @alias sap.ui.fl.write._internal.transport.Transports
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.105.0
|
|
31
31
|
* @since 1.74.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
@@ -49,7 +49,9 @@ sap.ui.define([
|
|
|
49
49
|
* "localonly" tells the consumer if only local development is valid and no transport selection should take place.
|
|
50
50
|
* "transports" is an array of objects with attributes "transportId", "owner", "description", "locked"(true/false).
|
|
51
51
|
* "errorCode" can have the values "INVALID_PACKAGE" or "NO_TRANSPORTS" or is an empty string if there is no error.
|
|
52
|
-
*
|
|
52
|
+
*
|
|
53
|
+
* @private
|
|
54
|
+
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
53
55
|
*/
|
|
54
56
|
getTransports: function (mParameters) {
|
|
55
57
|
if (FlexUtils.getClient()) {
|
|
@@ -82,7 +84,9 @@ sap.ui.define([
|
|
|
82
84
|
* @param {string} mParameters.changeIds Array of change ID objects with attributes "namespace", "fileName", "fileType"
|
|
83
85
|
* @param {string} mParameters.reference Application ID of the changes which should be transported
|
|
84
86
|
* @returns {Promise} without parameters
|
|
85
|
-
*
|
|
87
|
+
*
|
|
88
|
+
* @private
|
|
89
|
+
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
86
90
|
*/
|
|
87
91
|
makeChangesTransportable: function (mParameters) {
|
|
88
92
|
if (!mParameters.transportId) {
|
|
@@ -113,6 +117,9 @@ sap.ui.define([
|
|
|
113
117
|
* @param {Array} aLocalChanges List of changes which data have to be extracted
|
|
114
118
|
* @param {Array} [aAppVariantDescriptors] List of app variant descriptors which data have to be extracted
|
|
115
119
|
* @returns {Array} Returns an array of object containing all required data to transport the existing local changes
|
|
120
|
+
*
|
|
121
|
+
* @private
|
|
122
|
+
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
116
123
|
*/
|
|
117
124
|
convertToChangeTransportData: function (aLocalChanges, aAppVariantDescriptors) {
|
|
118
125
|
var aTransportData = [];
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/base/util/includes",
|
|
9
|
+
"sap/base/util/restricted/_omit",
|
|
10
|
+
"sap/base/Log",
|
|
11
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
12
|
+
"sap/ui/core/Component",
|
|
13
|
+
"sap/ui/core/Element",
|
|
14
|
+
"sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes",
|
|
8
15
|
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
9
16
|
"sap/ui/fl/apply/_internal/changes/Reverter",
|
|
17
|
+
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
10
18
|
"sap/ui/fl/apply/_internal/ChangesController",
|
|
11
|
-
"sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes",
|
|
12
19
|
"sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory",
|
|
13
20
|
"sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage",
|
|
14
|
-
"sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory"
|
|
15
|
-
"sap/base/Log",
|
|
16
|
-
"sap/ui/core/Component",
|
|
17
|
-
"sap/ui/core/Element",
|
|
18
|
-
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
19
|
-
"sap/base/util/includes",
|
|
20
|
-
"sap/base/util/restricted/_omit"
|
|
21
|
+
"sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory"
|
|
21
22
|
], function(
|
|
23
|
+
includes,
|
|
24
|
+
_omit,
|
|
25
|
+
Log,
|
|
26
|
+
JsControlTreeModifier,
|
|
27
|
+
Component,
|
|
28
|
+
Element,
|
|
29
|
+
DescriptorChangeTypes,
|
|
22
30
|
Applier,
|
|
23
31
|
Reverter,
|
|
32
|
+
FlexObjectFactory,
|
|
24
33
|
ChangesController,
|
|
25
|
-
DescriptorChangeTypes,
|
|
26
34
|
DescriptorChangeFactory,
|
|
27
35
|
ChangeHandlerStorage,
|
|
28
|
-
AppVariantInlineChangeFactory
|
|
29
|
-
Log,
|
|
30
|
-
Component,
|
|
31
|
-
Element,
|
|
32
|
-
JsControlTreeModifier,
|
|
33
|
-
includes,
|
|
34
|
-
_omit
|
|
36
|
+
AppVariantInlineChangeFactory
|
|
35
37
|
) {
|
|
36
38
|
"use strict";
|
|
37
39
|
|
|
@@ -93,6 +95,10 @@ sap.ui.define([
|
|
|
93
95
|
});
|
|
94
96
|
}
|
|
95
97
|
|
|
98
|
+
if (mPropertyBag.changeSpecificData.changeType === "codeExt") {
|
|
99
|
+
return FlexObjectFactory.createControllerExtensionChange(mPropertyBag.changeSpecificData);
|
|
100
|
+
}
|
|
101
|
+
|
|
96
102
|
// flex change
|
|
97
103
|
if (mPropertyBag.selector.name && mPropertyBag.selector.view) {
|
|
98
104
|
oFlexController = ChangesController.getFlexControllerInstance(mPropertyBag.selector.view);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
@@ -19,7 +19,6 @@ sap.ui.define([
|
|
|
19
19
|
* Provides an API to determine which features are available for flexibility.
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.write.api.FeaturesAPI
|
|
22
|
-
* @experimental Since 1.70
|
|
23
22
|
* @since 1.70
|
|
24
23
|
* @public
|
|
25
24
|
*
|
|
@@ -77,7 +76,7 @@ sap.ui.define([
|
|
|
77
76
|
* feature should be visible to the current user. This only applies if key user adaptation
|
|
78
77
|
* should be handled standalone without an SAP Fiori launchpad.
|
|
79
78
|
*
|
|
80
|
-
* @returns {Promise<boolean>} Resolves to a boolean indicating if key user is
|
|
79
|
+
* @returns {Promise<boolean>} Resolves to a boolean indicating if the key user role is assigned to the user
|
|
81
80
|
* @public
|
|
82
81
|
*/
|
|
83
82
|
isKeyUser: function () {
|
|
@@ -92,7 +91,8 @@ sap.ui.define([
|
|
|
92
91
|
*
|
|
93
92
|
* @param {string} sLayer - Layer to check for the draft versioning
|
|
94
93
|
* @returns {Promise<boolean>} Resolves to a boolean indicating if versioning is enabled
|
|
95
|
-
* @
|
|
94
|
+
* @private
|
|
95
|
+
* @ui5-restricted sap.ui.rta
|
|
96
96
|
*/
|
|
97
97
|
isVersioningEnabled: function (sLayer) {
|
|
98
98
|
return Settings.getInstance()
|
|
@@ -106,7 +106,8 @@ sap.ui.define([
|
|
|
106
106
|
*
|
|
107
107
|
* @param {sap.ui.fl.Layer} sLayer - Current layer
|
|
108
108
|
* @returns {Promise<boolean>} Resolves to a boolean indicating if the key user is also an admin
|
|
109
|
-
* @
|
|
109
|
+
* @private
|
|
110
|
+
* @ui5-restricted sap.ui.rta
|
|
110
111
|
*/
|
|
111
112
|
isKeyUserTranslationEnabled: function (sLayer) {
|
|
112
113
|
if (sLayer === Layer.CUSTOMER) {
|
|
@@ -123,7 +124,8 @@ sap.ui.define([
|
|
|
123
124
|
*
|
|
124
125
|
* @param {string} sLayer - Layer to get correct connector
|
|
125
126
|
* @returns {Promise<boolean>} Resolves to a boolean indicating if context sharing is enabled
|
|
126
|
-
* @
|
|
127
|
+
* @private
|
|
128
|
+
* @ui5-restricted sap.ui.fl.write.api.ContextSharingAPI
|
|
127
129
|
*/
|
|
128
130
|
isContextSharingEnabled: function (sLayer) {
|
|
129
131
|
if (sLayer !== Layer.CUSTOMER) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
*
|
|
25
25
|
* @namespace sap.ui.fl.write.api.FieldExtensibility
|
|
26
26
|
* @since 1.87
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.105.0
|
|
28
28
|
* @private
|
|
29
29
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
30
30
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
@@ -16,12 +16,10 @@ sap.ui.define([
|
|
|
16
16
|
"sap/ui/fl/write/_internal/flexState/FlexObjectState",
|
|
17
17
|
"sap/ui/fl/write/_internal/Storage",
|
|
18
18
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
19
|
-
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
20
19
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
21
20
|
"sap/ui/fl/Layer",
|
|
22
21
|
"sap/ui/fl/LayerUtils",
|
|
23
|
-
"sap/ui/fl/registry/Settings"
|
|
24
|
-
"sap/ui/fl/Utils"
|
|
22
|
+
"sap/ui/fl/registry/Settings"
|
|
25
23
|
], function(
|
|
26
24
|
includes,
|
|
27
25
|
_omit,
|
|
@@ -34,12 +32,10 @@ sap.ui.define([
|
|
|
34
32
|
FlexObjectState,
|
|
35
33
|
Storage,
|
|
36
34
|
ManifestUtils,
|
|
37
|
-
VariantManagementState,
|
|
38
35
|
FeaturesAPI,
|
|
39
36
|
Layer,
|
|
40
37
|
LayerUtils,
|
|
41
|
-
Settings
|
|
42
|
-
FlUtils
|
|
38
|
+
Settings
|
|
43
39
|
) {
|
|
44
40
|
"use strict";
|
|
45
41
|
|
|
@@ -84,37 +80,6 @@ sap.ui.define([
|
|
|
84
80
|
});
|
|
85
81
|
}
|
|
86
82
|
|
|
87
|
-
/**
|
|
88
|
-
* Removes variant-dependent changes belonging to variants which are currently not selected
|
|
89
|
-
*
|
|
90
|
-
* @param {array} aChanges - List of changes to check
|
|
91
|
-
* @param {sap.ui.fl.Control} oControl - Control for which the changes are being checked
|
|
92
|
-
* @returns {sap.ui.fl.Change[]} List of variant-dependent changes belonging to the currently selected variants
|
|
93
|
-
*/
|
|
94
|
-
function filterChangesByCurrentVariants(aChanges, oControl) {
|
|
95
|
-
// 1. Get current variant references
|
|
96
|
-
var oComponent = FlUtils.getAppComponentForControl(oControl);
|
|
97
|
-
var oModel = oComponent.getModel(FlUtils.VARIANT_MODEL_NAME);
|
|
98
|
-
var sFlexReference = oModel && oModel.sFlexReference;
|
|
99
|
-
var aVariantManagementReferences = VariantManagementState.getVariantManagementReferences(sFlexReference);
|
|
100
|
-
|
|
101
|
-
if (aVariantManagementReferences.length === 0) {
|
|
102
|
-
return aChanges;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
var aCurrentVariantReferences = aVariantManagementReferences.map(function(sVMReference) {
|
|
106
|
-
return oModel.getCurrentVariantReference(sVMReference);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// 2. Remove variant-dependent changes not assigned to a current variant reference
|
|
110
|
-
return aChanges.filter(function(oChange) {
|
|
111
|
-
return aCurrentVariantReferences.some(function(sCurrentVariantReference) {
|
|
112
|
-
return oChange.getVariantReference() === sCurrentVariantReference
|
|
113
|
-
|| !oChange.getVariantReference();
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
83
|
/**
|
|
119
84
|
* Determines if user-specific changes or variants are present in the flex persistence.
|
|
120
85
|
*
|
|
@@ -414,13 +379,7 @@ sap.ui.define([
|
|
|
414
379
|
}
|
|
415
380
|
|
|
416
381
|
//TODO: Check the mPropertyBag.selector parameter name - the methods called on FlexObjectState expect a control
|
|
417
|
-
return FlexObjectState.getFlexObjects(mPropertyBag)
|
|
418
|
-
.then(function(aChanges) {
|
|
419
|
-
if (mPropertyBag.onlyCurrentVariants) {
|
|
420
|
-
return filterChangesByCurrentVariants(aChanges, mPropertyBag.selector);
|
|
421
|
-
}
|
|
422
|
-
return aChanges;
|
|
423
|
-
});
|
|
382
|
+
return FlexObjectState.getFlexObjects(mPropertyBag);
|
|
424
383
|
};
|
|
425
384
|
|
|
426
385
|
return PersistenceWriteAPI;
|