@openui5/sap.ui.fl 1.124.1 → 1.125.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 +5 -0
- package/THIRDPARTY.txt +7 -0
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +4 -2
- 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 +3 -124
- 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 +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +5 -5
- 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 +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/extensionPoint/Registry.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 +1 -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/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +249 -0
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +3 -2
- 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 +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +6 -138
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +0 -4
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +19 -29
- 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 +4 -4
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +4 -8
- 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 +10 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- 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/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/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.properties +15 -0
- package/src/sap/ui/fl/messagebundle_ar.properties +11 -1
- package/src/sap/ui/fl/messagebundle_bg.properties +10 -0
- package/src/sap/ui/fl/messagebundle_ca.properties +10 -0
- package/src/sap/ui/fl/messagebundle_cnr.properties +10 -0
- package/src/sap/ui/fl/messagebundle_cs.properties +10 -0
- package/src/sap/ui/fl/messagebundle_cy.properties +10 -0
- package/src/sap/ui/fl/messagebundle_da.properties +10 -0
- package/src/sap/ui/fl/messagebundle_de.properties +10 -0
- package/src/sap/ui/fl/messagebundle_el.properties +10 -0
- package/src/sap/ui/fl/messagebundle_en.properties +10 -0
- package/src/sap/ui/fl/messagebundle_en_GB.properties +10 -0
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +10 -0
- package/src/sap/ui/fl/messagebundle_es.properties +10 -0
- package/src/sap/ui/fl/messagebundle_es_MX.properties +10 -0
- package/src/sap/ui/fl/messagebundle_et.properties +10 -0
- package/src/sap/ui/fl/messagebundle_fi.properties +10 -0
- package/src/sap/ui/fl/messagebundle_fr.properties +10 -0
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +10 -0
- package/src/sap/ui/fl/messagebundle_hi.properties +10 -0
- package/src/sap/ui/fl/messagebundle_hr.properties +10 -0
- package/src/sap/ui/fl/messagebundle_hu.properties +10 -0
- package/src/sap/ui/fl/messagebundle_id.properties +10 -0
- package/src/sap/ui/fl/messagebundle_it.properties +10 -0
- package/src/sap/ui/fl/messagebundle_iw.properties +10 -0
- package/src/sap/ui/fl/messagebundle_ja.properties +10 -0
- package/src/sap/ui/fl/messagebundle_kk.properties +10 -0
- package/src/sap/ui/fl/messagebundle_ko.properties +10 -0
- package/src/sap/ui/fl/messagebundle_lt.properties +10 -0
- package/src/sap/ui/fl/messagebundle_lv.properties +10 -0
- package/src/sap/ui/fl/messagebundle_mk.properties +10 -0
- package/src/sap/ui/fl/messagebundle_ms.properties +10 -0
- package/src/sap/ui/fl/messagebundle_nl.properties +10 -0
- package/src/sap/ui/fl/messagebundle_no.properties +10 -0
- package/src/sap/ui/fl/messagebundle_pl.properties +10 -0
- package/src/sap/ui/fl/messagebundle_pt.properties +10 -0
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +10 -0
- package/src/sap/ui/fl/messagebundle_ro.properties +10 -0
- package/src/sap/ui/fl/messagebundle_ru.properties +10 -0
- package/src/sap/ui/fl/messagebundle_sh.properties +10 -0
- package/src/sap/ui/fl/messagebundle_sk.properties +11 -1
- package/src/sap/ui/fl/messagebundle_sl.properties +16 -6
- package/src/sap/ui/fl/messagebundle_sr.properties +10 -0
- package/src/sap/ui/fl/messagebundle_sv.properties +10 -0
- package/src/sap/ui/fl/messagebundle_th.properties +10 -0
- package/src/sap/ui/fl/messagebundle_tr.properties +10 -0
- package/src/sap/ui/fl/messagebundle_uk.properties +10 -0
- package/src/sap/ui/fl/messagebundle_vi.properties +10 -0
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +10 -0
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +10 -0
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +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 +2 -3
- 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/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantModel.js +32 -13
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -2
- package/src/sap/ui/fl/variants/context/i18n/i18n_sh.properties +3 -3
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +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/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 +4 -3
- 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 +290 -131
- 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/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -5
- 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/ChangesWriteAPI.js +38 -3
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +5 -4
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +0 -2
package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js
CHANGED
|
@@ -15,124 +15,157 @@ sap.ui.define([
|
|
|
15
15
|
) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const sExtensionDataServiceUri = "/sap/opu/odata/SAP/APS_CUSTOM_FIELD_MAINTENANCE_SRV/";
|
|
19
|
+
const sNamespace = "sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant";
|
|
20
|
+
|
|
21
|
+
const oKeyOfAction = {
|
|
22
|
+
CustomField: "CUSTOM_FIELD",
|
|
23
|
+
CustomLogic: "CUSTOM_LOGIC"
|
|
24
|
+
};
|
|
25
|
+
const oNavigationIntents = {
|
|
26
|
+
[oKeyOfAction.CustomField]: {
|
|
27
|
+
semanticObject: "CustomField",
|
|
28
|
+
action: "manage"
|
|
29
|
+
},
|
|
30
|
+
[oKeyOfAction.CustomLogic]: {
|
|
31
|
+
semanticObject: "CustomLogic",
|
|
32
|
+
action: "develop"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const oTextKeys = {
|
|
37
|
+
BusinessContextTitle: "BUSINESS_CONTEXT_TITLE",
|
|
38
|
+
MenuButtonLabel: "BTN_CREATE",
|
|
39
|
+
MenuButtonTooltip: "BTN_FREP_CCF",
|
|
40
|
+
MenuCreateCustomField: "BTN_MENU_CREATE_CUSTOM_FIELD",
|
|
41
|
+
StandaloneCreateCustomField: "BTN_CREATE_CUSTOM_FIELD",
|
|
42
|
+
MenuCreateCustomLogic: "BTN_MENU_CREATE_CUSTOM_LOGIC",
|
|
43
|
+
StandaloneCreateCustomLogic: "BTN_CREATE_CUSTOM_LOGIC"
|
|
24
44
|
};
|
|
25
|
-
var aNavigationIntents = [{
|
|
26
|
-
semanticObject: "CustomField",
|
|
27
|
-
action: "develop"
|
|
28
|
-
}, {
|
|
29
|
-
semanticObject: "CustomField",
|
|
30
|
-
action: "manage"
|
|
31
|
-
}, {
|
|
32
|
-
semanticObject: "CustomLogic",
|
|
33
|
-
action: "develop"
|
|
34
|
-
}];
|
|
35
|
-
var aTextKeys = [
|
|
36
|
-
"BTN_FREP_CCF",
|
|
37
|
-
"BTN_ADD_FIELD",
|
|
38
|
-
"BTN_ADD_LOGIC"
|
|
39
|
-
];
|
|
40
45
|
|
|
41
46
|
/**
|
|
42
47
|
* Extension variant for ABAP single tenant environnments (via so called Custom Fields)
|
|
43
48
|
*
|
|
44
49
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant
|
|
45
50
|
* @since 1.87
|
|
46
|
-
* @version 1.
|
|
51
|
+
* @version 1.125.0
|
|
47
52
|
* @public
|
|
48
53
|
*/
|
|
49
|
-
|
|
50
|
-
var SingleTenantABAPExtensibilityVariant = ABAPExtensibilityVariant.extend("sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant", {
|
|
51
|
-
_iExtensibilityType: mExtensibilityType.None,
|
|
52
|
-
|
|
54
|
+
const SingleTenantABAPExtensibilityVariant = ABAPExtensibilityVariant.extend(sNamespace, {
|
|
53
55
|
/**
|
|
54
56
|
* @inheritDoc
|
|
55
57
|
*/
|
|
56
|
-
getExtensionData() {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
async getExtensionData() {
|
|
59
|
+
const oExtensionData = await this._oExtensionDataPromise;
|
|
60
|
+
|
|
61
|
+
if (oExtensionData === null) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
61
64
|
|
|
65
|
+
const aBusinessContexts = oExtensionData.businessContexts;
|
|
66
|
+
|
|
67
|
+
if (!this._containsData(aBusinessContexts)) {
|
|
62
68
|
return null;
|
|
63
|
-
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return this._convertBusinessContextsToExtensionData(aBusinessContexts);
|
|
64
72
|
},
|
|
65
73
|
|
|
66
74
|
/**
|
|
67
75
|
* @inheritDoc
|
|
68
76
|
*/
|
|
69
|
-
getNavigationUri() {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return Utils.getNavigationUriForIntent({
|
|
73
|
-
target: aNavigationIntents[this._iExtensibilityType],
|
|
74
|
-
params: {
|
|
75
|
-
businessContexts: aBusinessContexts.map(function(oBusinessContext) {
|
|
76
|
-
return oBusinessContext.BusinessContext;
|
|
77
|
-
}),
|
|
78
|
-
serviceVersion: this._mServiceInfo.serviceVersion,
|
|
79
|
-
serviceName: this._mServiceInfo.serviceName,
|
|
80
|
-
entityType: this._mBindingInfo.entityTypeName
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
77
|
+
async getNavigationUri(sActionKey) {
|
|
78
|
+
// Fallback mechanism for users of scenario one (implicit navigation targets).
|
|
79
|
+
const sResolvedActionKey = sActionKey ?? await this._getFallbackNavigationActionKey();
|
|
84
80
|
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
if (sResolvedActionKey === null) {
|
|
82
|
+
// No fallback action key for navigation was found.
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Implements scenario two (explicit navigation targets).
|
|
87
|
+
const oExtensionData = await this._oExtensionDataPromise;
|
|
88
|
+
if (oExtensionData === null) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const aBusinessContexts = oExtensionData.businessContexts;
|
|
93
|
+
const oNavigationSupported = oExtensionData.navigationSupported;
|
|
94
|
+
|
|
95
|
+
if (!this._containsData(aBusinessContexts)) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!oNavigationSupported[sResolvedActionKey]) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const aMappedBusinessContexts = aBusinessContexts.map(function(oBusinessContext) {
|
|
104
|
+
return oBusinessContext.BusinessContext;
|
|
105
|
+
});
|
|
106
|
+
return Utils.getNavigationUriForIntent({
|
|
107
|
+
target: oNavigationIntents[sResolvedActionKey],
|
|
108
|
+
params: {
|
|
109
|
+
businessContexts: aMappedBusinessContexts,
|
|
110
|
+
serviceVersion: this._mServiceInfo.serviceVersion,
|
|
111
|
+
serviceName: this._mServiceInfo.serviceName,
|
|
112
|
+
entityType: this._mBindingInfo.entityTypeName
|
|
113
|
+
}
|
|
114
|
+
});
|
|
87
115
|
},
|
|
88
116
|
|
|
89
117
|
/**
|
|
90
118
|
* @inheritDoc
|
|
91
119
|
*/
|
|
92
|
-
getTexts() {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
headerText: Utils.getText("BUSINESS_CONTEXT_TITLE")
|
|
98
|
-
};
|
|
99
|
-
}
|
|
120
|
+
async getTexts() {
|
|
121
|
+
const oExtensionData = await this._oExtensionDataPromise;
|
|
122
|
+
if (oExtensionData === null) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
100
125
|
|
|
126
|
+
const aBusinessContexts = oExtensionData.businessContexts;
|
|
127
|
+
|
|
128
|
+
if (!this._containsData(aBusinessContexts)) {
|
|
101
129
|
return null;
|
|
102
|
-
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const sButtonText = await this._getMenuButtonLabel();
|
|
133
|
+
const sTooltip = await this._getMenuButtonTooltip();
|
|
134
|
+
const oOptions = await this._getMenuButtonOptions();
|
|
135
|
+
|
|
136
|
+
if (oOptions.length === 1) {
|
|
137
|
+
oOptions[0].text = sButtonText;
|
|
138
|
+
oOptions[0].tooltip = sTooltip;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
headerText: Utils.getText(oTextKeys.BusinessContextTitle),
|
|
143
|
+
buttonText: sButtonText,
|
|
144
|
+
tooltip: sTooltip,
|
|
145
|
+
options: oOptions
|
|
146
|
+
};
|
|
103
147
|
},
|
|
104
148
|
|
|
105
149
|
/**
|
|
106
150
|
* @inheritDoc
|
|
107
151
|
*/
|
|
108
|
-
isActive() {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
_adjustExtensibilityTypeByAuthorizations(aNavigationSupportedForIntents, iExtensibilityType) {
|
|
115
|
-
if (aNavigationSupportedForIntents[iExtensibilityType]) {
|
|
116
|
-
return iExtensibilityType; // authorization matches Business Context features
|
|
117
|
-
} else if (aNavigationSupportedForIntents[mExtensibilityType.Both]) {
|
|
118
|
-
return mExtensibilityType.Both; // user has authorization for CFL app
|
|
119
|
-
} else if (iExtensibilityType === mExtensibilityType.Both) {
|
|
120
|
-
if (aNavigationSupportedForIntents[mExtensibilityType.Fields]) {
|
|
121
|
-
return mExtensibilityType.Fields; // user has authorization for CF app only
|
|
122
|
-
} else if (aNavigationSupportedForIntents[mExtensibilityType.Logic]) {
|
|
123
|
-
return mExtensibilityType.Logic; // user has authorization for CL app only
|
|
124
|
-
}
|
|
152
|
+
async isActive() {
|
|
153
|
+
const oExtensionData = await this._oExtensionDataPromise;
|
|
154
|
+
if (oExtensionData === null) {
|
|
155
|
+
return false;
|
|
125
156
|
}
|
|
126
157
|
|
|
127
|
-
|
|
158
|
+
const aBusinessContexts = oExtensionData.businessContexts;
|
|
159
|
+
|
|
160
|
+
return this._containsData(aBusinessContexts);
|
|
128
161
|
},
|
|
129
162
|
|
|
130
163
|
_containsData(aBusinessContexts) {
|
|
131
|
-
return
|
|
164
|
+
return Array.isArray(aBusinessContexts) && aBusinessContexts.length > 0;
|
|
132
165
|
},
|
|
133
166
|
|
|
134
167
|
_convertBusinessContextsToExtensionData(aBusinessContexts) {
|
|
135
|
-
|
|
168
|
+
const aExtensionData = aBusinessContexts.map((oBusinessContext) => {
|
|
136
169
|
return {
|
|
137
170
|
description: oBusinessContext.BusinessContextDescription,
|
|
138
171
|
businessContext: oBusinessContext.BusinessContext
|
|
@@ -144,68 +177,73 @@ sap.ui.define([
|
|
|
144
177
|
};
|
|
145
178
|
},
|
|
146
179
|
|
|
147
|
-
_determineExtensionData() {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
Utils.executeRequest(this._getExtensionDataServiceUri(), this._getExtensionDataServiceParameters()).then(function(oResponse) {
|
|
156
|
-
if (oResponse.errorOccurred === false) {
|
|
157
|
-
var aBusinessContexts = this._extractBusinessContextsFromResponse(oResponse.result);
|
|
158
|
-
this._iExtensibilityType = this._determineExtensibilityType(aNavigationSupportedForIntents, aBusinessContexts);
|
|
159
|
-
if (this._iExtensibilityType !== mExtensibilityType.None) {
|
|
160
|
-
fResolve(aBusinessContexts);
|
|
161
|
-
} else {
|
|
162
|
-
fResolve(null);
|
|
163
|
-
}
|
|
164
|
-
} else if (oResponse.statusCode === 404 && this._mServiceInfo.serviceType === UriParser.mServiceType.v4) {
|
|
165
|
-
// in this case we assume that the backend system is just too old to support v4 based services
|
|
166
|
-
fResolve(null);
|
|
167
|
-
} else {
|
|
168
|
-
fReject(oResponse);
|
|
169
|
-
}
|
|
170
|
-
}.bind(this));
|
|
171
|
-
} else {
|
|
172
|
-
fResolve(null);
|
|
173
|
-
}
|
|
174
|
-
}.bind(this));
|
|
175
|
-
}.bind(this));
|
|
176
|
-
},
|
|
180
|
+
async _determineExtensionData() {
|
|
181
|
+
let [
|
|
182
|
+
bNavigationSupportedForCustomField,
|
|
183
|
+
bNavigationSupportedForCustomLogic
|
|
184
|
+
] = await Utils.isNavigationSupportedForIntents([
|
|
185
|
+
oNavigationIntents[oKeyOfAction.CustomField],
|
|
186
|
+
oNavigationIntents[oKeyOfAction.CustomLogic]
|
|
187
|
+
]);
|
|
177
188
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
if (iExtensibilityType !== mExtensibilityType.None) {
|
|
181
|
-
return this._adjustExtensibilityTypeByAuthorizations(aNavigationSupportedForIntents, iExtensibilityType);
|
|
189
|
+
if (!(bNavigationSupportedForCustomField || bNavigationSupportedForCustomLogic)) {
|
|
190
|
+
return null;
|
|
182
191
|
}
|
|
183
192
|
|
|
184
|
-
|
|
193
|
+
const sServiceUri = this._getExtensionDataServiceUri();
|
|
194
|
+
const oServiceParameters = this._getExtensionDataServiceParameters();
|
|
195
|
+
const oResponse = await Utils.executeRequest(sServiceUri, oServiceParameters);
|
|
196
|
+
|
|
197
|
+
if (oResponse.errorOccurred === false) {
|
|
198
|
+
const aBusinessContexts = this._extractBusinessContextsFromResponse(oResponse.result);
|
|
199
|
+
|
|
200
|
+
const {
|
|
201
|
+
supportsStructuralEnhancements: bSupportsStructuralEnhancements,
|
|
202
|
+
supportsLogicEnhancements: bSupportsLogicEnhancements
|
|
203
|
+
} = this._determineSupportedExtensibilityTypes(aBusinessContexts);
|
|
204
|
+
|
|
205
|
+
bNavigationSupportedForCustomField &&= bSupportsStructuralEnhancements;
|
|
206
|
+
bNavigationSupportedForCustomLogic &&= bSupportsLogicEnhancements;
|
|
207
|
+
|
|
208
|
+
if (!(bNavigationSupportedForCustomField || bNavigationSupportedForCustomLogic)) {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return {
|
|
213
|
+
businessContexts: aBusinessContexts,
|
|
214
|
+
navigationSupported: {
|
|
215
|
+
[oKeyOfAction.CustomField]: bNavigationSupportedForCustomField,
|
|
216
|
+
[oKeyOfAction.CustomLogic]: bNavigationSupportedForCustomLogic
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
} else if (oResponse.statusCode === 404 && this._mServiceInfo.serviceType === UriParser.mServiceType.v4) {
|
|
220
|
+
// in this case we assume that the backend system is just too old to support v4 based services
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
throw oResponse;
|
|
185
225
|
},
|
|
186
226
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
227
|
+
_determineSupportedExtensibilityTypes(aBusinessContexts) {
|
|
228
|
+
let bSupportsLogicEnhancements = false;
|
|
229
|
+
let bSupportsStructuralEnhancements = false;
|
|
190
230
|
|
|
191
|
-
|
|
192
|
-
|
|
231
|
+
for (const oBusinessContext of aBusinessContexts) {
|
|
232
|
+
const bHasSupportsLogicEnhancements = oBusinessContext.hasOwnProperty("SupportsLogicEnhancements");
|
|
233
|
+
if (!bHasSupportsLogicEnhancements || oBusinessContext.SupportsLogicEnhancements === true) {
|
|
193
234
|
bSupportsLogicEnhancements = true;
|
|
194
235
|
}
|
|
195
|
-
|
|
236
|
+
|
|
237
|
+
const bHasSupportsStructuralEnhancements = oBusinessContext.hasOwnProperty("SupportsStructuralEnhancements");
|
|
238
|
+
if (!bHasSupportsStructuralEnhancements || oBusinessContext.SupportsStructuralEnhancements === true) {
|
|
196
239
|
bSupportsStructuralEnhancements = true;
|
|
197
240
|
}
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
if (bSupportsLogicEnhancements && bSupportsStructuralEnhancements) {
|
|
201
|
-
return mExtensibilityType.Both;
|
|
202
|
-
} else if (!bSupportsLogicEnhancements && bSupportsStructuralEnhancements) {
|
|
203
|
-
return mExtensibilityType.Fields;
|
|
204
|
-
} else if (bSupportsLogicEnhancements && !bSupportsStructuralEnhancements) {
|
|
205
|
-
return mExtensibilityType.Logic;
|
|
206
241
|
}
|
|
207
242
|
|
|
208
|
-
return
|
|
243
|
+
return {
|
|
244
|
+
supportsLogicEnhancements: bSupportsLogicEnhancements,
|
|
245
|
+
supportsStructuralEnhancements: bSupportsStructuralEnhancements
|
|
246
|
+
};
|
|
209
247
|
},
|
|
210
248
|
|
|
211
249
|
_extractBusinessContextsFromResponse(oResponse) {
|
|
@@ -213,16 +251,21 @@ sap.ui.define([
|
|
|
213
251
|
},
|
|
214
252
|
|
|
215
253
|
_getExtensionDataServiceParameters() {
|
|
216
|
-
|
|
254
|
+
const oParameters = {
|
|
217
255
|
EntitySetName: "", // required by backend
|
|
218
256
|
EntityTypeName: this._mBindingInfo.entityTypeName
|
|
219
257
|
};
|
|
220
258
|
|
|
221
259
|
if (this._mServiceInfo.serviceType === UriParser.mServiceType.v4) {
|
|
222
|
-
// ResourcePath='/sap/opu/odata4/sap/aps_integration_test/sadl/sap/i_cfd_tsm_so_core/0001/'
|
|
260
|
+
// ResourcePath='/sap/opu/odata4/sap/aps_integration_test/sadl/sap/i_cfd_tsm_so_core/0001/'
|
|
261
|
+
// EntitySetName=''
|
|
262
|
+
// EntityTypeName='BusinessPartner'
|
|
223
263
|
oParameters.ResourcePath = `${UriParser.sODataV4ResourcePathPrefix + this._mServiceInfo.serviceName}/${this._mServiceInfo.serviceVersion}`;
|
|
224
264
|
} else {
|
|
225
|
-
// ServiceName='CFD_TSM_BUPA_MAINT_SRV'
|
|
265
|
+
// ServiceName='CFD_TSM_BUPA_MAINT_SRV'
|
|
266
|
+
// ServiceVersion='0001'
|
|
267
|
+
// EntitySetName=''
|
|
268
|
+
// EntityTypeName='BusinessPartner'
|
|
226
269
|
oParameters.ServiceName = this._mServiceInfo.serviceName;
|
|
227
270
|
oParameters.ServiceVersion = this._mServiceInfo.serviceVersion;
|
|
228
271
|
}
|
|
@@ -238,6 +281,122 @@ sap.ui.define([
|
|
|
238
281
|
|
|
239
282
|
// sap/opu/odata/SAP/APS_CUSTOM_FIELD_MAINTENANCE_SRV/GetBusinessContextsByEntityType
|
|
240
283
|
return `${sExtensionDataServiceUri}GetBusinessContextsByEntityType`;
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
async _getMenuButtonText(sTextKeyForExplicitNavigation) {
|
|
287
|
+
const oExtensionData = await this._oExtensionDataPromise;
|
|
288
|
+
|
|
289
|
+
if (oExtensionData === null) {
|
|
290
|
+
return undefined;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const oNavigationSupported = oExtensionData.navigationSupported;
|
|
294
|
+
|
|
295
|
+
let iNumberOfAvailableExtensibilityTypes = 0;
|
|
296
|
+
for (const sExtensibilityType in oNavigationSupported) {
|
|
297
|
+
if (!oNavigationSupported[sExtensibilityType]) {
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
iNumberOfAvailableExtensibilityTypes++;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Explicit navigation through menu button
|
|
305
|
+
if (iNumberOfAvailableExtensibilityTypes > 1) {
|
|
306
|
+
return Utils.getText(sTextKeyForExplicitNavigation);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// No navigation target
|
|
310
|
+
if (iNumberOfAvailableExtensibilityTypes === 0) {
|
|
311
|
+
return undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
if (oNavigationSupported[oKeyOfAction.CustomField]) {
|
|
315
|
+
// Implicit navigation to custom fields
|
|
316
|
+
return Utils.getText(oTextKeys.StandaloneCreateCustomField);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (oNavigationSupported[oKeyOfAction.CustomLogic]) {
|
|
320
|
+
// Implicit navigation to custom logic
|
|
321
|
+
return Utils.getText(oTextKeys.StandaloneCreateCustomLogic);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Reaching this point is essentially an error condition
|
|
325
|
+
return undefined;
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
_getMenuButtonLabel() {
|
|
329
|
+
return this._getMenuButtonText(oTextKeys.MenuButtonLabel);
|
|
330
|
+
},
|
|
331
|
+
|
|
332
|
+
_getMenuButtonTooltip() {
|
|
333
|
+
return this._getMenuButtonText(oTextKeys.MenuButtonTooltip);
|
|
334
|
+
},
|
|
335
|
+
|
|
336
|
+
async _getMenuButtonOptions() {
|
|
337
|
+
const oExtensionData = await this._oExtensionDataPromise;
|
|
338
|
+
|
|
339
|
+
if (oExtensionData === null) {
|
|
340
|
+
return [];
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const oNavigationSupported = oExtensionData.navigationSupported;
|
|
344
|
+
|
|
345
|
+
const aOptions = [];
|
|
346
|
+
|
|
347
|
+
if (oNavigationSupported[oKeyOfAction.CustomField]) {
|
|
348
|
+
aOptions.push(this._getFieldsMenuButtonOption());
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (oNavigationSupported[oKeyOfAction.CustomLogic]) {
|
|
352
|
+
aOptions.push(this._getLogicMenuButtonOption());
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
return aOptions;
|
|
356
|
+
},
|
|
357
|
+
|
|
358
|
+
_getFieldsMenuButtonOption() {
|
|
359
|
+
const sButtonText = Utils.getText(oTextKeys.MenuCreateCustomField);
|
|
360
|
+
|
|
361
|
+
return {
|
|
362
|
+
actionKey: oKeyOfAction.CustomField,
|
|
363
|
+
text: sButtonText,
|
|
364
|
+
tooltip: sButtonText
|
|
365
|
+
};
|
|
366
|
+
},
|
|
367
|
+
|
|
368
|
+
_getLogicMenuButtonOption() {
|
|
369
|
+
const sButtonText = Utils.getText(oTextKeys.MenuCreateCustomLogic);
|
|
370
|
+
|
|
371
|
+
return {
|
|
372
|
+
actionKey: oKeyOfAction.CustomLogic,
|
|
373
|
+
text: sButtonText,
|
|
374
|
+
tooltip: sButtonText
|
|
375
|
+
};
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
async _getFallbackNavigationActionKey() {
|
|
379
|
+
const oExtensionData = await this._oExtensionDataPromise;
|
|
380
|
+
if (oExtensionData === null) {
|
|
381
|
+
return null;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
const aBusinessContexts = oExtensionData.businessContexts;
|
|
385
|
+
const oNavigationSupported = oExtensionData.navigationSupported;
|
|
386
|
+
|
|
387
|
+
if (!this._containsData(aBusinessContexts)) {
|
|
388
|
+
return null;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
for (const sActionKey in oNavigationSupported) {
|
|
392
|
+
if (!oNavigationSupported[sActionKey]) {
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
return sActionKey;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
return null;
|
|
241
400
|
}
|
|
242
401
|
});
|
|
243
402
|
|
|
@@ -82,7 +82,7 @@ sap.ui.define([
|
|
|
82
82
|
* @extends sap.ui.base.ManagedObject
|
|
83
83
|
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog
|
|
84
84
|
* @author SAP SE
|
|
85
|
-
* @version 1.
|
|
85
|
+
* @version 1.125.0
|
|
86
86
|
* @since 1.93
|
|
87
87
|
* @private
|
|
88
88
|
* @ui5-restricted
|
|
@@ -8,9 +8,7 @@ sap.ui.define([
|
|
|
8
8
|
"sap/base/util/restricted/_omit",
|
|
9
9
|
"sap/base/util/restricted/_pick",
|
|
10
10
|
"sap/ui/core/Element",
|
|
11
|
-
"sap/ui/core/Lib",
|
|
12
11
|
"sap/ui/fl/Layer",
|
|
13
|
-
"sap/ui/fl/LayerUtils",
|
|
14
12
|
"sap/ui/fl/Utils",
|
|
15
13
|
"sap/ui/fl/apply/_internal/flexObjects/CompVariant",
|
|
16
14
|
"sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData",
|
|
@@ -28,9 +26,7 @@ sap.ui.define([
|
|
|
28
26
|
_omit,
|
|
29
27
|
_pick,
|
|
30
28
|
Element,
|
|
31
|
-
Lib,
|
|
32
29
|
Layer,
|
|
33
|
-
LayerUtils,
|
|
34
30
|
Utils,
|
|
35
31
|
CompVariant,
|
|
36
32
|
CompVariantRevertData,
|
|
@@ -291,7 +287,7 @@ sap.ui.define([
|
|
|
291
287
|
*
|
|
292
288
|
* @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
|
|
293
289
|
* @since 1.83
|
|
294
|
-
* @version 1.
|
|
290
|
+
* @version 1.125.0
|
|
295
291
|
* @private
|
|
296
292
|
* @ui5-restricted sap.ui.fl
|
|
297
293
|
*/
|
|
@@ -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.125.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.125.0
|
|
31
31
|
* @since 1.74.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted sap.ui.fl.write._internal.transport
|