@openui5/sap.ui.fl 1.93.3 → 1.96.1
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 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +1 -1
- package/src/sap/ui/fl/Change.js +18 -14
- package/src/sap/ui/fl/ChangePersistence.js +92 -82
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/ControlPersonalizationAPI.js +3 -1
- package/src/sap/ui/fl/EventHistory.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 +28 -22
- package/src/sap/ui/fl/FlexControllerFactory.js +9 -2
- package/src/sap/ui/fl/LayerUtils.js +34 -22
- package/src/sap/ui/fl/PreprocessorImpl.js +1 -1
- package/src/sap/ui/fl/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/Utils.js +54 -34
- package/src/sap/ui/fl/Variant.js +2 -11
- package/src/sap/ui/fl/XmlPreprocessorImpl.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +39 -34
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -29
- 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 +3 -2
- 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 +52 -0
- 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/controlVariants/URLHandler.js +40 -29
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +10 -8
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +14 -0
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +102 -30
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +52 -4
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +5 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -28
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +25 -5
- 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 +10 -8
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +6 -3
- 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 +8 -5
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +18 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +12 -8
- package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +10 -4
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.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 +9 -9
- package/src/sap/ui/fl/library.support.js +56 -46
- package/src/sap/ui/fl/messagebundle.properties +39 -2
- package/src/sap/ui/fl/messagebundle_ar.properties +12 -4
- package/src/sap/ui/fl/messagebundle_bg.properties +12 -4
- package/src/sap/ui/fl/messagebundle_ca.properties +13 -5
- package/src/sap/ui/fl/messagebundle_cs.properties +12 -4
- package/src/sap/ui/fl/messagebundle_cy.properties +12 -4
- package/src/sap/ui/fl/messagebundle_da.properties +12 -4
- package/src/sap/ui/fl/messagebundle_de.properties +12 -4
- package/src/sap/ui/fl/messagebundle_el.properties +12 -4
- package/src/sap/ui/fl/messagebundle_en.properties +10 -2
- package/src/sap/ui/fl/messagebundle_en_GB.properties +9 -1
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +8 -0
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +35 -2
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +8 -0
- package/src/sap/ui/fl/messagebundle_es.properties +13 -5
- package/src/sap/ui/fl/messagebundle_es_MX.properties +12 -4
- package/src/sap/ui/fl/messagebundle_et.properties +12 -4
- package/src/sap/ui/fl/messagebundle_fi.properties +12 -4
- package/src/sap/ui/fl/messagebundle_fr.properties +12 -4
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +12 -4
- package/src/sap/ui/fl/messagebundle_hi.properties +12 -4
- package/src/sap/ui/fl/messagebundle_hr.properties +12 -4
- package/src/sap/ui/fl/messagebundle_hu.properties +12 -4
- package/src/sap/ui/fl/messagebundle_id.properties +12 -4
- package/src/sap/ui/fl/messagebundle_it.properties +13 -5
- package/src/sap/ui/fl/messagebundle_iw.properties +12 -4
- package/src/sap/ui/fl/messagebundle_ja.properties +12 -4
- package/src/sap/ui/fl/messagebundle_kk.properties +12 -4
- package/src/sap/ui/fl/messagebundle_ko.properties +13 -5
- package/src/sap/ui/fl/messagebundle_lt.properties +12 -4
- package/src/sap/ui/fl/messagebundle_lv.properties +12 -4
- package/src/sap/ui/fl/messagebundle_ms.properties +12 -4
- package/src/sap/ui/fl/messagebundle_nl.properties +12 -4
- package/src/sap/ui/fl/messagebundle_no.properties +12 -4
- package/src/sap/ui/fl/messagebundle_pl.properties +12 -4
- package/src/sap/ui/fl/messagebundle_pt.properties +12 -4
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +12 -4
- package/src/sap/ui/fl/messagebundle_ro.properties +12 -4
- package/src/sap/ui/fl/messagebundle_ru.properties +12 -4
- package/src/sap/ui/fl/messagebundle_sh.properties +14 -6
- package/src/sap/ui/fl/messagebundle_sk.properties +12 -4
- package/src/sap/ui/fl/messagebundle_sl.properties +12 -4
- package/src/sap/ui/fl/messagebundle_sv.properties +12 -4
- package/src/sap/ui/fl/messagebundle_th.properties +12 -4
- package/src/sap/ui/fl/messagebundle_tr.properties +12 -4
- package/src/sap/ui/fl/messagebundle_uk.properties +14 -6
- package/src/sap/ui/fl/messagebundle_vi.properties +12 -4
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +12 -4
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +12 -4
- package/src/sap/ui/fl/registry/Settings.js +57 -23
- package/src/sap/ui/fl/support/Flexibility.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/themes/base/VariantManagement.less +4 -0
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +10 -3
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/getContainerUserInfo.js +32 -28
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +326 -37
- package/src/sap/ui/fl/variants/VariantModel.js +191 -75
- package/src/sap/ui/fl/write/_internal/Storage.js +6 -4
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +61 -54
- 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 +20 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +35 -4
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +7 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.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 +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +5 -17
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.fragment.xml +1 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +47 -18
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +60 -22
- 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.fragment.xml +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +15 -22
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +20 -0
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +10 -10
- 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 +1 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +22 -7
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +20 -16
- package/ui5.yaml +4 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/annotationsEditor/AnnotationsEditor.js +0 -49
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateEditor/DateEditor.js +0 -43
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateTimeEditor/DateTimeEditor.js +0 -38
|
@@ -12,7 +12,8 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig",
|
|
13
13
|
"sap/base/util/ObjectPath",
|
|
14
14
|
"sap/base/util/deepClone",
|
|
15
|
-
"sap/ui/model/resource/ResourceModel"
|
|
15
|
+
"sap/ui/model/resource/ResourceModel",
|
|
16
|
+
"sap/ui/model/json/JSONModel"
|
|
16
17
|
], function(
|
|
17
18
|
ManagedObject,
|
|
18
19
|
Fragment,
|
|
@@ -20,7 +21,8 @@ sap.ui.define([
|
|
|
20
21
|
getEditorConfig,
|
|
21
22
|
ObjectPath,
|
|
22
23
|
deepClone,
|
|
23
|
-
ResourceModel
|
|
24
|
+
ResourceModel,
|
|
25
|
+
JSONModel
|
|
24
26
|
) {
|
|
25
27
|
"use strict";
|
|
26
28
|
|
|
@@ -34,38 +36,51 @@ sap.ui.define([
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
function prepareJsonOutput(oOriginalJson) {
|
|
37
|
-
if (!oOriginalJson) {
|
|
39
|
+
if (!oOriginalJson || !oOriginalJson.element) {
|
|
38
40
|
return {};
|
|
39
41
|
}
|
|
40
42
|
var oJson = deepClone(oOriginalJson);
|
|
41
43
|
|
|
44
|
+
// Set label
|
|
45
|
+
if (!ObjectPath.get(["element", "@Common.Label"], oJson)) {
|
|
46
|
+
var sName = ObjectPath.get(["element", "name"], oJson);
|
|
47
|
+
ObjectPath.set(["element", "@Common.Label"], sName, oJson);
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
// Format enum input validation
|
|
43
|
-
var vRange = ObjectPath.get(["@assert.range"], oJson);
|
|
51
|
+
var vRange = ObjectPath.get(["element", "@assert.range"], oJson);
|
|
44
52
|
if (
|
|
45
|
-
|
|
53
|
+
ObjectPath.get(["element", "type"], oJson) === "cds.String"
|
|
46
54
|
&& Array.isArray(vRange)
|
|
47
55
|
) {
|
|
48
|
-
ObjectPath.set(["enum"], vRange.reduce(function (enumMap, enumOption) {
|
|
56
|
+
ObjectPath.set(["element", "enum"], vRange.reduce(function (enumMap, enumOption) {
|
|
49
57
|
enumMap[enumOption] = {};
|
|
50
58
|
return enumMap;
|
|
51
59
|
}, {}), oJson);
|
|
52
|
-
ObjectPath.set(["@assert.range"], true, oJson);
|
|
60
|
+
ObjectPath.set(["element", "@assert.range"], true, oJson);
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
// Flatten additional annotations
|
|
56
|
-
if (oJson.annotations) {
|
|
57
|
-
oJson = Object.assign({}, oJson, oJson.annotations);
|
|
58
|
-
delete oJson.annotations;
|
|
64
|
+
if (oJson.element.annotations) {
|
|
65
|
+
oJson.element = Object.assign({}, oJson.element, oJson.element.annotations);
|
|
66
|
+
delete oJson.element.annotations;
|
|
59
67
|
}
|
|
60
68
|
|
|
61
|
-
|
|
69
|
+
// Format CSN extension
|
|
70
|
+
var oCsnOutput = {
|
|
71
|
+
extend: oJson.extend,
|
|
72
|
+
elements: {}
|
|
73
|
+
};
|
|
74
|
+
oCsnOutput.elements[oJson.element.name] = oJson.element;
|
|
75
|
+
|
|
76
|
+
return oCsnOutput;
|
|
62
77
|
}
|
|
63
78
|
|
|
64
79
|
/**
|
|
65
80
|
* @extends sap.ui.base.ManagedObject
|
|
66
81
|
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog
|
|
67
82
|
* @author SAP SE
|
|
68
|
-
* @version 1.
|
|
83
|
+
* @version 1.96.1
|
|
69
84
|
* @since 1.93
|
|
70
85
|
* @experimental Since 1.93
|
|
71
86
|
* @private
|
|
@@ -85,9 +100,11 @@ sap.ui.define([
|
|
|
85
100
|
|
|
86
101
|
CustomFieldCAPDialog.prototype.open = function(mEntitySetInformation, sRtaStyleClassName) {
|
|
87
102
|
var oInitialJson = {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
103
|
+
element: {
|
|
104
|
+
name: "NewField",
|
|
105
|
+
type: "cds.String"
|
|
106
|
+
},
|
|
107
|
+
extend: mEntitySetInformation.boundEntitySet.$Type
|
|
91
108
|
};
|
|
92
109
|
|
|
93
110
|
var oDialog = this.getProperty("_dialog");
|
|
@@ -99,6 +116,11 @@ sap.ui.define([
|
|
|
99
116
|
name: "sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog",
|
|
100
117
|
controller: this
|
|
101
118
|
}).then(function(oAddCustomFieldCAPDialog) {
|
|
119
|
+
this._oDialogModel = new JSONModel({
|
|
120
|
+
isValid: true
|
|
121
|
+
});
|
|
122
|
+
this._oDialogModel.setDefaultBindingMode("OneWay");
|
|
123
|
+
oAddCustomFieldCAPDialog.setModel(this._oDialogModel, "dialog");
|
|
102
124
|
oAddCustomFieldCAPDialog.setModel(new ResourceModel({
|
|
103
125
|
bundle: oTextBundle
|
|
104
126
|
}), "i18n");
|
|
@@ -109,7 +131,13 @@ sap.ui.define([
|
|
|
109
131
|
entityTypes: mEntitySetInformation.entityTypes
|
|
110
132
|
});
|
|
111
133
|
this._oEditor.attachJsonChange(function(oEvent) {
|
|
112
|
-
this._oJson =
|
|
134
|
+
this._oJson = oEvent.getParameter("json");
|
|
135
|
+
}.bind(this));
|
|
136
|
+
this._oEditor.attachValidationErrorChange(function(oEvent) {
|
|
137
|
+
var bHasError = oEvent.getParameter("hasError");
|
|
138
|
+
this._oDialogModel.setData({
|
|
139
|
+
isValid: !bHasError
|
|
140
|
+
});
|
|
113
141
|
}.bind(this));
|
|
114
142
|
oAddCustomFieldCAPDialog.open();
|
|
115
143
|
}.bind(this));
|
|
@@ -127,13 +155,14 @@ sap.ui.define([
|
|
|
127
155
|
};
|
|
128
156
|
|
|
129
157
|
CustomFieldCAPDialog.prototype.onSave = function() {
|
|
158
|
+
var oCsnOutput = prepareJsonOutput(this._oJson);
|
|
130
159
|
var oPayload = {
|
|
131
|
-
|
|
160
|
+
extensions: [JSON.stringify(oCsnOutput)]
|
|
132
161
|
};
|
|
133
162
|
|
|
134
163
|
var oAddFieldPromise = new Promise(function(resolve, reject) {
|
|
135
164
|
var oXhr = new XMLHttpRequest();
|
|
136
|
-
oXhr.open("POST", "
|
|
165
|
+
oXhr.open("POST", "/-/cds/extensibility/addExtension");
|
|
137
166
|
oXhr.setRequestHeader("Content-Type", "application/json");
|
|
138
167
|
oXhr.onload = function() {
|
|
139
168
|
if (oXhr.status >= 200 && oXhr.status < 400) {
|
|
@@ -12,30 +12,49 @@ sap.ui.define([
|
|
|
12
12
|
|
|
13
13
|
return function(oCustomConfig) {
|
|
14
14
|
return {
|
|
15
|
-
context: "/",
|
|
15
|
+
context: "/element",
|
|
16
16
|
properties: {
|
|
17
17
|
entityType: {
|
|
18
18
|
tags: ["general"],
|
|
19
19
|
label: "Entity Type",
|
|
20
|
-
path: "
|
|
20
|
+
path: "/extend",
|
|
21
21
|
type: "select",
|
|
22
22
|
items: (oCustomConfig.entityTypes || []).map(function(sEntityType) {
|
|
23
23
|
return {
|
|
24
24
|
key: sEntityType
|
|
25
25
|
};
|
|
26
|
-
})
|
|
26
|
+
}),
|
|
27
|
+
allowCustomValues: false,
|
|
28
|
+
validators: {
|
|
29
|
+
isRequired: {
|
|
30
|
+
type: "isRequired"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
27
33
|
},
|
|
28
34
|
name: {
|
|
29
35
|
tags: ["general"],
|
|
30
36
|
label: "Name",
|
|
31
37
|
path: "name",
|
|
32
|
-
type: "string"
|
|
38
|
+
type: "string",
|
|
39
|
+
validators: {
|
|
40
|
+
isRequired: {
|
|
41
|
+
type: "isRequired"
|
|
42
|
+
},
|
|
43
|
+
namePattern: {
|
|
44
|
+
type: "pattern",
|
|
45
|
+
errorMessage: "CAP_ERR_WHITESPACE",
|
|
46
|
+
config: {
|
|
47
|
+
pattern: "^\\S+$"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
33
51
|
},
|
|
34
52
|
label: {
|
|
35
53
|
tags: ["general"],
|
|
36
54
|
label: "Label",
|
|
37
55
|
path: "@Common.Label",
|
|
38
|
-
type: "string"
|
|
56
|
+
type: "string",
|
|
57
|
+
placeholder: "{/element/name}"
|
|
39
58
|
},
|
|
40
59
|
type: {
|
|
41
60
|
tags: ["general"],
|
|
@@ -71,7 +90,13 @@ sap.ui.define([
|
|
|
71
90
|
key: "cds.Boolean",
|
|
72
91
|
title: "Boolean"
|
|
73
92
|
}
|
|
74
|
-
]
|
|
93
|
+
],
|
|
94
|
+
allowCustomValues: false,
|
|
95
|
+
validators: {
|
|
96
|
+
isRequired: {
|
|
97
|
+
type: "isRequired"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
75
100
|
},
|
|
76
101
|
numberPrecision: {
|
|
77
102
|
tags: ["general"],
|
|
@@ -79,7 +104,7 @@ sap.ui.define([
|
|
|
79
104
|
path: "precision",
|
|
80
105
|
type: "number",
|
|
81
106
|
defaultValue: "",
|
|
82
|
-
visible: "{= ${/type} === 'cds.Decimal' }"
|
|
107
|
+
visible: "{= ${/element/type} === 'cds.Decimal' }"
|
|
83
108
|
},
|
|
84
109
|
numberScale: {
|
|
85
110
|
tags: ["general"],
|
|
@@ -87,7 +112,7 @@ sap.ui.define([
|
|
|
87
112
|
path: "scale",
|
|
88
113
|
type: "number",
|
|
89
114
|
defaultValue: "",
|
|
90
|
-
visible: "{= ${/type} === 'cds.Decimal' }"
|
|
115
|
+
visible: "{= ${/element/type} === 'cds.Decimal' }"
|
|
91
116
|
},
|
|
92
117
|
stringLength: {
|
|
93
118
|
tags: ["general"],
|
|
@@ -95,14 +120,14 @@ sap.ui.define([
|
|
|
95
120
|
path: "length",
|
|
96
121
|
type: "number",
|
|
97
122
|
defaultValue: "",
|
|
98
|
-
visible: "{= ${/type} === 'cds.String' }"
|
|
123
|
+
visible: "{= ${/element/type} === 'cds.String' }"
|
|
99
124
|
},
|
|
100
125
|
defaultValue: {
|
|
101
126
|
tags: ["general"],
|
|
102
127
|
label: "Default",
|
|
103
128
|
path: "default/val",
|
|
104
129
|
defaultValue: "",
|
|
105
|
-
type: "{/type}" //"{path: '/type', formatter: '._getEditorForType'}"
|
|
130
|
+
type: "{/element/type}" //"{path: '/element/type', formatter: '._getEditorForType'}"
|
|
106
131
|
},
|
|
107
132
|
readonly: {
|
|
108
133
|
tags: ["validation"],
|
|
@@ -122,33 +147,35 @@ sap.ui.define([
|
|
|
122
147
|
path: "@assert.format",
|
|
123
148
|
type: "string",
|
|
124
149
|
defaultValue: "",
|
|
125
|
-
visible: "{= ${/type} === 'cds.String' }"
|
|
150
|
+
visible: "{= ${/element/type} === 'cds.String' }"
|
|
126
151
|
},
|
|
127
152
|
stringRange: {
|
|
128
153
|
tags: ["validation"],
|
|
129
154
|
label: "Allowed Values",
|
|
130
155
|
path: "@assert.range",
|
|
131
156
|
type: "list",
|
|
132
|
-
visible: "{= ${/type} === 'cds.String' }",
|
|
133
|
-
active: "{= ${/type} === 'cds.String' }"
|
|
157
|
+
visible: "{= ${/element/type} === 'cds.String' }",
|
|
158
|
+
active: "{= ${/element/type} === 'cds.String' }"
|
|
134
159
|
},
|
|
135
160
|
arrayRange: {
|
|
136
161
|
tags: ["validation"],
|
|
137
162
|
label: "Range",
|
|
138
163
|
path: "@assert.range",
|
|
139
164
|
type: "range",
|
|
140
|
-
rangeType: "{/type}",
|
|
165
|
+
rangeType: "{/element/type}",
|
|
141
166
|
// TODO: Once expression bindings are supported, check for ordinal types differently
|
|
142
|
-
visible: "{= ${/type} === 'cds.Integer' || ${/type} === 'cds.Decimal' || ${/type} === 'cds.DateTime' || ${/type} === 'cds.Date' || ${/type} === 'cds.Time'}",
|
|
143
|
-
active: "{= ${/type} === 'cds.Integer' || ${/type} === 'cds.Decimal' || ${/type} === 'cds.DateTime' || ${/type} === 'cds.Date' || ${/type} === 'cds.Time'}"
|
|
167
|
+
visible: "{= ${/element/type} === 'cds.Integer' || ${/element/type} === 'cds.Decimal' || ${/element/type} === 'cds.DateTime' || ${/element/type} === 'cds.Date' || ${/element/type} === 'cds.Time'}",
|
|
168
|
+
active: "{= ${/element/type} === 'cds.Integer' || ${/element/type} === 'cds.Decimal' || ${/element/type} === 'cds.DateTime' || ${/element/type} === 'cds.Date' || ${/element/type} === 'cds.Time'}"
|
|
144
169
|
},
|
|
145
170
|
annotations: {
|
|
146
171
|
tags: ["advanced"],
|
|
147
172
|
label: "Additional Annotations",
|
|
148
|
-
allowedTypes: ["
|
|
173
|
+
allowedTypes: ["json"],
|
|
149
174
|
path: "annotations",
|
|
150
|
-
type: "
|
|
151
|
-
allowTypeChange: false
|
|
175
|
+
type: "map",
|
|
176
|
+
allowTypeChange: false,
|
|
177
|
+
addItemLabelI18n: "CAP_ADD_FIELD_EDITOR.ANNOTATION",
|
|
178
|
+
defaultType: "json"
|
|
152
179
|
}
|
|
153
180
|
},
|
|
154
181
|
layout: {
|
|
@@ -190,7 +217,6 @@ sap.ui.define([
|
|
|
190
217
|
integer: "sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor",
|
|
191
218
|
number: "sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor",
|
|
192
219
|
map: "sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor",
|
|
193
|
-
annotations: "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/annotationsEditor/AnnotationsEditor",
|
|
194
220
|
list: "sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor",
|
|
195
221
|
bool: "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor",
|
|
196
222
|
range: "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor",
|
|
@@ -199,10 +225,22 @@ sap.ui.define([
|
|
|
199
225
|
"cds.String": "sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor",
|
|
200
226
|
"cds.Integer": "sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor",
|
|
201
227
|
"cds.Decimal": "sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor",
|
|
202
|
-
"cds.Date": "sap/ui/
|
|
228
|
+
"cds.Date": "sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor",
|
|
203
229
|
"cds.Time": "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor",
|
|
204
|
-
"cds.DateTime": "sap/ui/
|
|
230
|
+
"cds.DateTime": "sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor",
|
|
205
231
|
"cds.Boolean": "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor"
|
|
232
|
+
},
|
|
233
|
+
i18n: "sap/ui/fl/messagebundle.properties",
|
|
234
|
+
validators: {
|
|
235
|
+
isRequired: "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired"
|
|
236
|
+
},
|
|
237
|
+
propertyEditorConfigs: {
|
|
238
|
+
"cds.Date": {
|
|
239
|
+
pattern: "YYYY-MM-dd"
|
|
240
|
+
},
|
|
241
|
+
"cds.DateTime": {
|
|
242
|
+
pattern: "YYYY-MM-dd'T'HH:mm:ss'Z'"
|
|
243
|
+
}
|
|
206
244
|
}
|
|
207
245
|
};
|
|
208
246
|
};
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor
|
|
23
23
|
* @author SAP SE
|
|
24
24
|
* @since 1.93
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.96.1
|
|
26
26
|
*
|
|
27
27
|
* @private
|
|
28
28
|
* @experimental 1.93
|
|
@@ -36,34 +36,27 @@ sap.ui.define([
|
|
|
36
36
|
renderer: BasePropertyEditor.getMetadata().getRenderer().render
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
+
TimeEditor.configMetadata = Object.assign({}, DateEditor.configMetadata, {
|
|
40
|
+
pattern: {
|
|
41
|
+
defaultValue: "HH:mm:ss"
|
|
42
|
+
},
|
|
43
|
+
// By default, ignore timezones due to winter/summer time etc. as 1st Jan 1970 is set as date
|
|
44
|
+
utc: {
|
|
45
|
+
defaultValue: false
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
39
49
|
TimeEditor.prototype.getDefaultValidators = function () {
|
|
40
50
|
return Object.assign(
|
|
41
51
|
{},
|
|
42
|
-
|
|
52
|
+
DateEditor.prototype.getDefaultValidators.call(this)
|
|
43
53
|
);
|
|
44
54
|
};
|
|
45
55
|
|
|
46
|
-
TimeEditor.prototype.
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
TimeEditor.prototype._parse = function (sValue) {
|
|
51
|
-
if (sValue === "") {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// For now use a hardcoded format, move to default config later
|
|
56
|
-
var oTimeFormatterInstance = DateFormat.getTimeInstance({
|
|
57
|
-
pattern: "HH:mm:ss"
|
|
56
|
+
TimeEditor.prototype.getFormatterInstance = function (mOptions) {
|
|
57
|
+
return DateFormat.getTimeInstance(mOptions || {
|
|
58
|
+
pattern: "HH:mm:ss.SSSS"
|
|
58
59
|
});
|
|
59
|
-
var oParsedDate = oTimeFormatterInstance.parse(sValue);
|
|
60
|
-
return this._isValidDate(oParsedDate)
|
|
61
|
-
? oTimeFormatterInstance.format(oParsedDate)
|
|
62
|
-
: sValue;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
TimeEditor.prototype.getFormatterInstance = function () {
|
|
66
|
-
return DateFormat.getTimeInstance();
|
|
67
60
|
};
|
|
68
61
|
|
|
69
62
|
return TimeEditor;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([], function () {
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
async: false,
|
|
11
|
+
errorMessage: "CAP_ERR_REQUIRED",
|
|
12
|
+
validate: function (vValue) {
|
|
13
|
+
return (
|
|
14
|
+
vValue === false
|
|
15
|
+
|| vValue === 0
|
|
16
|
+
|| !!vValue
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
});
|
|
@@ -11,10 +11,10 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/fl/Layer",
|
|
12
12
|
"sap/ui/fl/Change",
|
|
13
13
|
"sap/ui/fl/apply/_internal/flexObjects/UpdatableChange",
|
|
14
|
-
"sap/ui/fl/ChangePersistenceFactory",
|
|
15
14
|
"sap/ui/fl/apply/_internal/flexObjects/CompVariant",
|
|
16
15
|
"sap/ui/fl/apply/_internal/flexObjects/RevertData",
|
|
17
16
|
"sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData",
|
|
17
|
+
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
18
18
|
"sap/ui/fl/Utils",
|
|
19
19
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
20
20
|
"sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger",
|
|
@@ -27,10 +27,10 @@ sap.ui.define([
|
|
|
27
27
|
Layer,
|
|
28
28
|
Change,
|
|
29
29
|
UpdatableChange,
|
|
30
|
-
ChangePersistenceFactory,
|
|
31
30
|
CompVariant,
|
|
32
31
|
RevertData,
|
|
33
32
|
CompVariantRevertData,
|
|
33
|
+
States,
|
|
34
34
|
Utils,
|
|
35
35
|
FlexState,
|
|
36
36
|
CompVariantMerger,
|
|
@@ -85,7 +85,7 @@ sap.ui.define([
|
|
|
85
85
|
if (result && result.response) {
|
|
86
86
|
oFlexObject.setResponse(result.response);
|
|
87
87
|
} else {
|
|
88
|
-
oFlexObject.setState(
|
|
88
|
+
oFlexObject.setState(States.PERSISTED);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
return oStoredResponse;
|
|
@@ -132,7 +132,7 @@ sap.ui.define([
|
|
|
132
132
|
|
|
133
133
|
function needsPersistencyCall(oFlexObject) {
|
|
134
134
|
return oFlexObject &&
|
|
135
|
-
[
|
|
135
|
+
[States.NEW, States.DIRTY, States.DELETED].includes(oFlexObject.getState());
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
function getAllCompVariantObjects(mCompVariantsMapByPersistencyKey) {
|
|
@@ -220,7 +220,7 @@ sap.ui.define([
|
|
|
220
220
|
*
|
|
221
221
|
* @namespace sap.ui.fl.write._internal.flexState.compVariants.CompVariantState
|
|
222
222
|
* @since 1.83
|
|
223
|
-
* @version 1.
|
|
223
|
+
* @version 1.96.1
|
|
224
224
|
* @private
|
|
225
225
|
* @ui5-restricted sap.ui.fl
|
|
226
226
|
*/
|
|
@@ -730,7 +730,7 @@ sap.ui.define([
|
|
|
730
730
|
if (result && result.response && result.response[0]) {
|
|
731
731
|
oFlexObject.setResponse(result.response[0]);
|
|
732
732
|
} else {
|
|
733
|
-
oFlexObject.setState(
|
|
733
|
+
oFlexObject.setState(States.PERSISTED);
|
|
734
734
|
}
|
|
735
735
|
|
|
736
736
|
return oStoredResponse;
|
|
@@ -750,14 +750,14 @@ sap.ui.define([
|
|
|
750
750
|
var aPromises = getAllCompVariantObjects(mCompVariantsMapByPersistencyKey)
|
|
751
751
|
.filter(needsPersistencyCall)
|
|
752
752
|
.map(function (oFlexObject) {
|
|
753
|
-
switch (oFlexObject.
|
|
754
|
-
case
|
|
753
|
+
switch (oFlexObject.getState()) {
|
|
754
|
+
case States.NEW:
|
|
755
755
|
ifVariantClearRevertData(oFlexObject);
|
|
756
756
|
return writeObjectAndAddToState(oFlexObject, oStoredResponse);
|
|
757
|
-
case
|
|
757
|
+
case States.DIRTY:
|
|
758
758
|
ifVariantClearRevertData(oFlexObject);
|
|
759
759
|
return updateObjectAndStorage(oFlexObject, oStoredResponse);
|
|
760
|
-
case
|
|
760
|
+
case States.DELETED:
|
|
761
761
|
ifVariantClearRevertData(oFlexObject);
|
|
762
762
|
return deleteObjectAndRemoveFromStorage(oFlexObject, mCompVariantsMapByPersistencyKey, oStoredResponse);
|
|
763
763
|
default:
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @alias sap.ui.fl.write._internal.transport.TransportSelection
|
|
28
28
|
* @constructor
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.96.1
|
|
31
31
|
* @since 1.74.0
|
|
32
32
|
* Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
|
|
33
33
|
* of the SmartVariant control.
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* Entity that handles ABAP transport related information.
|
|
29
29
|
* @alias sap.ui.fl.write._internal.transport.Transports
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.96.1
|
|
32
32
|
* @since 1.74.0
|
|
33
33
|
* @private
|
|
34
34
|
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
@@ -125,8 +125,7 @@ sap.ui.define([
|
|
|
125
125
|
* @ui5-restricted
|
|
126
126
|
*/
|
|
127
127
|
apply: function(mPropertyBag) {
|
|
128
|
-
|
|
129
|
-
if (!mPropertyBag.element instanceof Element) {
|
|
128
|
+
if (!(mPropertyBag.element instanceof Element)) {
|
|
130
129
|
return Promise.reject("Please provide an Element");
|
|
131
130
|
}
|
|
132
131
|
|
|
@@ -7,11 +7,15 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess",
|
|
9
9
|
"sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess",
|
|
10
|
-
"sap/base/util/UriParameters"
|
|
10
|
+
"sap/base/util/UriParameters",
|
|
11
|
+
"sap/ui/base/ManagedObject",
|
|
12
|
+
"sap/ui/fl/Utils"
|
|
11
13
|
], function(
|
|
12
14
|
ABAPAccess,
|
|
13
15
|
CAPAccess,
|
|
14
|
-
UriParameters
|
|
16
|
+
UriParameters,
|
|
17
|
+
ManagedObject,
|
|
18
|
+
FlUtils
|
|
15
19
|
) {
|
|
16
20
|
"use strict";
|
|
17
21
|
|
|
@@ -20,7 +24,7 @@ sap.ui.define([
|
|
|
20
24
|
*
|
|
21
25
|
* @namespace sap.ui.fl.write.api.FieldExtensibility
|
|
22
26
|
* @since 1.87
|
|
23
|
-
* @version 1.
|
|
27
|
+
* @version 1.96.1
|
|
24
28
|
* @private
|
|
25
29
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
26
30
|
*/
|
|
@@ -28,11 +32,19 @@ sap.ui.define([
|
|
|
28
32
|
var FieldExtensibility = {};
|
|
29
33
|
|
|
30
34
|
var _oCurrentScenario;
|
|
31
|
-
|
|
32
|
-
function getImplementationForCurrentScenario() {
|
|
35
|
+
|
|
36
|
+
function getImplementationForCurrentScenario(oControl) {
|
|
33
37
|
if (!_oCurrentScenario) {
|
|
38
|
+
if (!(oControl instanceof ManagedObject)) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
var oAppComponent = FlUtils.getAppComponentForControl(oControl);
|
|
42
|
+
var oManifestConfig = (oAppComponent && oAppComponent.getManifestEntry("/sap.ui5/config")) || {};
|
|
34
43
|
var oUriParams = UriParameters.fromQuery(window.location.search);
|
|
35
|
-
if (
|
|
44
|
+
if (
|
|
45
|
+
oManifestConfig.experimentalCAPScenario
|
|
46
|
+
|| oUriParams.get("sap-ui-fl-xx-capScenario") === "true"
|
|
47
|
+
) {
|
|
36
48
|
_oCurrentScenario = CAPAccess;
|
|
37
49
|
} else {
|
|
38
50
|
_oCurrentScenario = ABAPAccess;
|
|
@@ -44,7 +56,10 @@ sap.ui.define([
|
|
|
44
56
|
function callFunctionInImplementation() {
|
|
45
57
|
var aArgs = Array.from(arguments);
|
|
46
58
|
var sFunctionName = aArgs.shift();
|
|
47
|
-
var oImplementation = getImplementationForCurrentScenario();
|
|
59
|
+
var oImplementation = getImplementationForCurrentScenario.apply(null, aArgs);
|
|
60
|
+
if (!oImplementation) {
|
|
61
|
+
return Promise.reject("Could not determine field extensibility scenario");
|
|
62
|
+
}
|
|
48
63
|
return Promise.resolve(oImplementation[sFunctionName].apply(null, aArgs));
|
|
49
64
|
}
|
|
50
65
|
|