@openui5/sap.ui.fl 1.128.0 → 1.129.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +1 -1
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +13 -421
- 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 +27 -51
- 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/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 +5 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +5 -4
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewDataSource.js +152 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +12 -18
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +67 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.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 +11 -9
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +5 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +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/SetCloudDevAdaptationStatus.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +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 +18 -5
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +2 -4
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +19 -10
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +16 -12
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +17 -20
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +6 -5
- package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +17 -61
- 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 +10 -6
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.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 +16 -15
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +10 -12
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -6
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/AnnotationChangeHandlerAPI.js +63 -0
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +4 -4
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +2 -1
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +26 -5
- 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 +33 -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 +14 -13
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/designtime/util/editIFrame.js +2 -1
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +10 -8
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +3 -3
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +23 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +54 -22
- 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/registry/Settings.js +1 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +29 -58
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +12 -66
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +7 -4
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +30 -19
- package/src/sap/ui/fl/support/api/SupportAPI.js +8 -4
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +106 -12
- package/src/sap/ui/fl/util/IFrame.js +3 -3
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +15 -4
- package/src/sap/ui/fl/util/resolveBinding.js +9 -9
- package/src/sap/ui/fl/variants/VariantModel.js +49 -32
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -2
- package/src/sap/ui/fl/write/_internal/SaveAs.js +12 -3
- package/src/sap/ui/fl/write/_internal/Storage.js +6 -6
- 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 +3 -3
- 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 +43 -2
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +3 -3
- 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 +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 +122 -77
- 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 +18 -18
- 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 +12 -11
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +6 -8
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectManager.js +181 -5
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +86 -0
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +43 -43
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +22 -19
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +56 -30
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +28 -51
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +11 -7
- package/src/sap/ui/fl/write/api/VersionsAPI.js +6 -4
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @class
|
|
18
18
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariant
|
|
19
19
|
* @since 1.87
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.129.0
|
|
21
21
|
* @public
|
|
22
22
|
* @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
|
|
23
23
|
*/
|
|
@@ -115,7 +115,7 @@ sap.ui.define([
|
|
|
115
115
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
|
|
116
116
|
* @since 1.87.0
|
|
117
117
|
* @author SAP SE
|
|
118
|
-
* @version 1.
|
|
118
|
+
* @version 1.129.0
|
|
119
119
|
* @private
|
|
120
120
|
*/
|
|
121
121
|
var ABAPExtensibilityVariantFactory = {};
|
package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js
CHANGED
|
@@ -15,7 +15,8 @@ sap.ui.define([
|
|
|
15
15
|
) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const sBusinessContextServiceUri = "/sap/opu/odata/SAP/APS_CUSTOM_FIELD_MAINTENANCE_SRV/";
|
|
19
|
+
const sBusinessObjectServiceUri = "/sap/opu/odata/sap/ui_sclg_implementation/";
|
|
19
20
|
const sNamespace = "sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant";
|
|
20
21
|
|
|
21
22
|
const oKeyOfAction = {
|
|
@@ -48,7 +49,7 @@ sap.ui.define([
|
|
|
48
49
|
*
|
|
49
50
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.SingleTenantABAPExtensibilityVariant
|
|
50
51
|
* @since 1.87
|
|
51
|
-
* @version 1.
|
|
52
|
+
* @version 1.129.0
|
|
52
53
|
* @public
|
|
53
54
|
*/
|
|
54
55
|
const SingleTenantABAPExtensibilityVariant = ABAPExtensibilityVariant.extend(sNamespace, {
|
|
@@ -62,13 +63,24 @@ sap.ui.define([
|
|
|
62
63
|
return null;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (!this._containsData(aBusinessContexts)) {
|
|
66
|
+
if (!this._containsExtensionData(oExtensionData)) {
|
|
68
67
|
return null;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
|
|
70
|
+
const aExtensionData = [];
|
|
71
|
+
|
|
72
|
+
for (const oBusinessContext of oExtensionData.businessContexts) {
|
|
73
|
+
const oExtensionData = {
|
|
74
|
+
description: oBusinessContext.BusinessContextDescription,
|
|
75
|
+
businessContext: oBusinessContext.BusinessContext
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
aExtensionData.push(oExtensionData);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
extensionData: aExtensionData
|
|
83
|
+
};
|
|
72
84
|
},
|
|
73
85
|
|
|
74
86
|
/**
|
|
@@ -89,24 +101,29 @@ sap.ui.define([
|
|
|
89
101
|
return null;
|
|
90
102
|
}
|
|
91
103
|
|
|
92
|
-
|
|
93
|
-
const oNavigationSupported = oExtensionData.navigationSupported;
|
|
94
|
-
|
|
95
|
-
if (!this._containsData(aBusinessContexts)) {
|
|
104
|
+
if (!this._containsExtensionData(oExtensionData)) {
|
|
96
105
|
return null;
|
|
97
106
|
}
|
|
98
107
|
|
|
108
|
+
const oNavigationSupported = oExtensionData.navigationSupported;
|
|
109
|
+
|
|
99
110
|
if (!oNavigationSupported[sResolvedActionKey]) {
|
|
100
111
|
return null;
|
|
101
112
|
}
|
|
102
113
|
|
|
114
|
+
const aBusinessContexts = oExtensionData.businessContexts;
|
|
103
115
|
const aMappedBusinessContexts = aBusinessContexts.map(function(oBusinessContext) {
|
|
104
116
|
return oBusinessContext.BusinessContext;
|
|
105
117
|
});
|
|
118
|
+
const aBusinessObjects = oExtensionData.businessObjects;
|
|
119
|
+
const aMappedBusinessObjects = aBusinessObjects.map(function(oBusinessObject) {
|
|
120
|
+
return oBusinessObject.SAPObjectNodeType;
|
|
121
|
+
});
|
|
106
122
|
return Utils.getNavigationUriForIntent({
|
|
107
123
|
target: oNavigationIntents[sResolvedActionKey],
|
|
108
124
|
params: {
|
|
109
125
|
businessContexts: aMappedBusinessContexts,
|
|
126
|
+
businessObjects: aMappedBusinessObjects,
|
|
110
127
|
serviceVersion: this._mServiceInfo.serviceVersion,
|
|
111
128
|
serviceName: this._mServiceInfo.serviceName,
|
|
112
129
|
entityType: this._mBindingInfo.entityTypeName
|
|
@@ -123,9 +140,7 @@ sap.ui.define([
|
|
|
123
140
|
return null;
|
|
124
141
|
}
|
|
125
142
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (!this._containsData(aBusinessContexts)) {
|
|
143
|
+
if (!this._containsExtensionData(oExtensionData)) {
|
|
129
144
|
return null;
|
|
130
145
|
}
|
|
131
146
|
|
|
@@ -155,26 +170,17 @@ sap.ui.define([
|
|
|
155
170
|
return false;
|
|
156
171
|
}
|
|
157
172
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return this._containsData(aBusinessContexts);
|
|
173
|
+
return this._containsExtensionData(oExtensionData);
|
|
161
174
|
},
|
|
162
175
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
return {
|
|
170
|
-
description: oBusinessContext.BusinessContextDescription,
|
|
171
|
-
businessContext: oBusinessContext.BusinessContext
|
|
172
|
-
};
|
|
173
|
-
});
|
|
176
|
+
_containsExtensionData({
|
|
177
|
+
businessContexts: aBusinessContexts,
|
|
178
|
+
businessObjects: aBusinessObjects
|
|
179
|
+
}) {
|
|
180
|
+
const bContainsBusinessContexts = Array.isArray(aBusinessContexts) && aBusinessContexts.length > 0;
|
|
181
|
+
const bContainsBusinessObjects = Array.isArray(aBusinessObjects) && aBusinessObjects.length > 0;
|
|
174
182
|
|
|
175
|
-
return
|
|
176
|
-
extensionData: aExtensionData
|
|
177
|
-
};
|
|
183
|
+
return bContainsBusinessContexts || bContainsBusinessObjects;
|
|
178
184
|
},
|
|
179
185
|
|
|
180
186
|
async _determineExtensionData() {
|
|
@@ -190,67 +196,95 @@ sap.ui.define([
|
|
|
190
196
|
return null;
|
|
191
197
|
}
|
|
192
198
|
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
199
|
+
const aBusinessContexts = await this._getBusinessContexts();
|
|
200
|
+
if (aBusinessContexts === null) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
196
203
|
|
|
197
|
-
|
|
198
|
-
|
|
204
|
+
const aBusinessObjects = await this._getBusinessObjects(aBusinessContexts);
|
|
205
|
+
if (aBusinessObjects === null) {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
199
208
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
const {
|
|
210
|
+
supportsStructuralEnhancements: bSupportsStructuralEnhancements,
|
|
211
|
+
supportsLogicEnhancements: bSupportsLogicEnhancements
|
|
212
|
+
} = this._determineSupportedExtensibilityTypes(aBusinessContexts, aBusinessObjects);
|
|
204
213
|
|
|
205
|
-
|
|
206
|
-
|
|
214
|
+
bNavigationSupportedForCustomField &&= bSupportsStructuralEnhancements;
|
|
215
|
+
bNavigationSupportedForCustomLogic &&= bSupportsLogicEnhancements;
|
|
207
216
|
|
|
208
|
-
|
|
209
|
-
|
|
217
|
+
if (!(bNavigationSupportedForCustomField || bNavigationSupportedForCustomLogic)) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return {
|
|
222
|
+
businessContexts: aBusinessContexts,
|
|
223
|
+
businessObjects: aBusinessObjects,
|
|
224
|
+
navigationSupported: {
|
|
225
|
+
[oKeyOfAction.CustomField]: bNavigationSupportedForCustomField,
|
|
226
|
+
[oKeyOfAction.CustomLogic]: bNavigationSupportedForCustomLogic
|
|
210
227
|
}
|
|
228
|
+
};
|
|
229
|
+
},
|
|
211
230
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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
|
|
231
|
+
async _getBusinessContexts() {
|
|
232
|
+
const sServiceUri = this._getBusinessContextDataServiceUrl();
|
|
233
|
+
const oServiceParameters = this._getBusinessContextDataServiceParameters();
|
|
234
|
+
const oResponse = await Utils.executeRequest(sServiceUri, oServiceParameters);
|
|
235
|
+
|
|
236
|
+
if (oResponse.statusCode === 404 && this._mServiceInfo.serviceType === UriParser.mServiceType.v4) {
|
|
237
|
+
// Guess: the backend system is too old to support v4 based services.
|
|
221
238
|
return null;
|
|
222
239
|
}
|
|
223
240
|
|
|
224
|
-
|
|
225
|
-
|
|
241
|
+
if (oResponse.errorOccurred !== false) {
|
|
242
|
+
throw oResponse;
|
|
243
|
+
}
|
|
226
244
|
|
|
227
|
-
|
|
228
|
-
let bSupportsLogicEnhancements = false;
|
|
229
|
-
let bSupportsStructuralEnhancements = false;
|
|
245
|
+
const aBusinessContexts = oResponse.result.results || [];
|
|
230
246
|
|
|
231
247
|
for (const oBusinessContext of aBusinessContexts) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
248
|
+
oBusinessContext.SupportsLogicEnhancements ??= true;
|
|
249
|
+
oBusinessContext.SupportsStructuralEnhancements ??= true;
|
|
250
|
+
}
|
|
236
251
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
252
|
+
return aBusinessContexts;
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
async _getBusinessObjects(aBusinessContexts) {
|
|
256
|
+
const sServiceUri = this._getBusinessObjectDataServiceUrl();
|
|
257
|
+
const oServiceParameters = this._getBusinessObjectDataServiceParameters(aBusinessContexts);
|
|
258
|
+
const oResponse = await Utils.executeRequest(sServiceUri, oServiceParameters);
|
|
259
|
+
|
|
260
|
+
if (oResponse.errorOccurred !== false) {
|
|
261
|
+
// Guess: the backend system is too old to support this extension data type.
|
|
262
|
+
return [];
|
|
241
263
|
}
|
|
242
264
|
|
|
265
|
+
return oResponse.result.results || [];
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
_determineSupportedExtensibilityTypes(aBusinessContexts, aBusinessObjects) {
|
|
269
|
+
const bSupportsLogicEnhancements = aBusinessContexts.some(
|
|
270
|
+
(oBusinessContext) => oBusinessContext.SupportsLogicEnhancements
|
|
271
|
+
) || aBusinessObjects.some(
|
|
272
|
+
(oBusinessObject) => oBusinessObject.SupportsLogicEnhancements
|
|
273
|
+
);
|
|
274
|
+
|
|
275
|
+
const bSupportsStructuralEnhancements = aBusinessContexts.some(
|
|
276
|
+
(oBusinessContext) => oBusinessContext.SupportsStructuralEnhancements
|
|
277
|
+
) || aBusinessObjects.some(
|
|
278
|
+
(oBusinessObject) => oBusinessObject.SupportsStructuralEnhancements
|
|
279
|
+
);
|
|
280
|
+
|
|
243
281
|
return {
|
|
244
282
|
supportsLogicEnhancements: bSupportsLogicEnhancements,
|
|
245
283
|
supportsStructuralEnhancements: bSupportsStructuralEnhancements
|
|
246
284
|
};
|
|
247
285
|
},
|
|
248
286
|
|
|
249
|
-
|
|
250
|
-
return oResponse.results || [];
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
_getExtensionDataServiceParameters() {
|
|
287
|
+
_getBusinessContextDataServiceParameters() {
|
|
254
288
|
const oParameters = {
|
|
255
289
|
EntitySetName: "", // required by backend
|
|
256
290
|
EntityTypeName: this._mBindingInfo.entityTypeName
|
|
@@ -273,14 +307,26 @@ sap.ui.define([
|
|
|
273
307
|
return oParameters;
|
|
274
308
|
},
|
|
275
309
|
|
|
276
|
-
|
|
310
|
+
_getBusinessContextDataServiceUrl() {
|
|
277
311
|
if (this._mServiceInfo.serviceType === UriParser.mServiceType.v4) {
|
|
278
|
-
|
|
279
|
-
return `${sExtensionDataServiceUri}GetBusinessContextsByResourcePath`;
|
|
312
|
+
return `${sBusinessContextServiceUri}GetBusinessContextsByResourcePath`;
|
|
280
313
|
}
|
|
281
314
|
|
|
282
|
-
|
|
283
|
-
|
|
315
|
+
return `${sBusinessContextServiceUri}GetBusinessContextsByEntityType`;
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
_getBusinessObjectDataServiceParameters(aBusinessContexts) {
|
|
319
|
+
const aBusinessContextNames = aBusinessContexts.map((oBusinessContext) => {
|
|
320
|
+
return oBusinessContext.BusinessContext;
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
return {
|
|
324
|
+
BusinessContexts: JSON.stringify(aBusinessContextNames)
|
|
325
|
+
};
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
_getBusinessObjectDataServiceUrl() {
|
|
329
|
+
return `${sBusinessObjectServiceUri}getSONTsFromBusinessContexts`;
|
|
284
330
|
},
|
|
285
331
|
|
|
286
332
|
async _getMenuButtonText(sTextKeyForExplicitNavigation) {
|
|
@@ -381,10 +427,9 @@ sap.ui.define([
|
|
|
381
427
|
return null;
|
|
382
428
|
}
|
|
383
429
|
|
|
384
|
-
const aBusinessContexts = oExtensionData.businessContexts;
|
|
385
430
|
const oNavigationSupported = oExtensionData.navigationSupported;
|
|
386
431
|
|
|
387
|
-
if (!this.
|
|
432
|
+
if (!this._containsExtensionData(oExtensionData)) {
|
|
388
433
|
return null;
|
|
389
434
|
}
|
|
390
435
|
|
|
@@ -28,10 +28,10 @@ sap.ui.define([
|
|
|
28
28
|
) {
|
|
29
29
|
"use strict";
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
const oTextBundle = Lib.getResourceBundleFor("sap.ui.fl");
|
|
32
32
|
|
|
33
33
|
function setupEditor(oDialog, oInitialJson, oCustomConfig) {
|
|
34
|
-
|
|
34
|
+
const oEditor = oDialog.getContent()[0];
|
|
35
35
|
oEditor.setJson(deepClone(oInitialJson));
|
|
36
36
|
oEditor.setConfig(getEditorConfig(oCustomConfig));
|
|
37
37
|
return oEditor;
|
|
@@ -41,16 +41,16 @@ sap.ui.define([
|
|
|
41
41
|
if (!oOriginalJson || !oOriginalJson.element) {
|
|
42
42
|
return {};
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
const oJson = deepClone(oOriginalJson);
|
|
45
45
|
|
|
46
46
|
// Set label
|
|
47
47
|
if (!ObjectPath.get(["element", "@Common.Label"], oJson)) {
|
|
48
|
-
|
|
48
|
+
const sName = ObjectPath.get(["element", "name"], oJson);
|
|
49
49
|
ObjectPath.set(["element", "@Common.Label"], sName, oJson);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Format enum input validation
|
|
53
|
-
|
|
53
|
+
const vRange = ObjectPath.get(["element", "@assert.range"], oJson);
|
|
54
54
|
if (
|
|
55
55
|
ObjectPath.get(["element", "type"], oJson) === "cds.String"
|
|
56
56
|
&& Array.isArray(vRange)
|
|
@@ -64,12 +64,12 @@ sap.ui.define([
|
|
|
64
64
|
|
|
65
65
|
// Flatten additional annotations
|
|
66
66
|
if (oJson.element.annotations) {
|
|
67
|
-
oJson.element =
|
|
67
|
+
oJson.element = { ...oJson.element, ...oJson.element.annotations };
|
|
68
68
|
delete oJson.element.annotations;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// Format CSN extension
|
|
72
|
-
|
|
72
|
+
const oCsnOutput = {
|
|
73
73
|
extend: oJson.extend,
|
|
74
74
|
elements: {}
|
|
75
75
|
};
|
|
@@ -82,17 +82,17 @@ 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.129.0
|
|
86
86
|
* @since 1.93
|
|
87
87
|
* @private
|
|
88
88
|
* @ui5-restricted
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
const CustomFieldCAPDialog = ManagedObject.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog", {
|
|
91
91
|
metadata: {
|
|
92
92
|
library: "sap.ui.fl",
|
|
93
93
|
properties: {
|
|
94
94
|
_dialog: {
|
|
95
|
-
type: "
|
|
95
|
+
type: "any",
|
|
96
96
|
visibility: "hidden"
|
|
97
97
|
}
|
|
98
98
|
}
|
|
@@ -100,7 +100,7 @@ sap.ui.define([
|
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
CustomFieldCAPDialog.prototype.open = function(mEntitySetInformation, sRtaStyleClassName) {
|
|
103
|
-
|
|
103
|
+
const oInitialJson = {
|
|
104
104
|
element: {
|
|
105
105
|
name: "NewField",
|
|
106
106
|
type: "cds.String"
|
|
@@ -108,7 +108,7 @@ sap.ui.define([
|
|
|
108
108
|
extend: mEntitySetInformation.boundEntitySet.$Type
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
const oDialog = this.getProperty("_dialog");
|
|
112
112
|
if (oDialog) {
|
|
113
113
|
this._oEditor.setJson(deepClone(oInitialJson));
|
|
114
114
|
oDialog.open();
|
|
@@ -135,7 +135,7 @@ sap.ui.define([
|
|
|
135
135
|
this._oJson = oEvent.getParameter("json");
|
|
136
136
|
}.bind(this));
|
|
137
137
|
this._oEditor.attachValidationErrorChange(function(oEvent) {
|
|
138
|
-
|
|
138
|
+
const bHasError = oEvent.getParameter("hasError");
|
|
139
139
|
this._oDialogModel.setData({
|
|
140
140
|
isValid: !bHasError
|
|
141
141
|
});
|
|
@@ -146,7 +146,7 @@ sap.ui.define([
|
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
CustomFieldCAPDialog.prototype.exit = function() {
|
|
149
|
-
|
|
149
|
+
const oDialog = this.getProperty("_dialog");
|
|
150
150
|
if (oDialog) {
|
|
151
151
|
oDialog.destroy();
|
|
152
152
|
}
|
|
@@ -156,13 +156,13 @@ sap.ui.define([
|
|
|
156
156
|
};
|
|
157
157
|
|
|
158
158
|
CustomFieldCAPDialog.prototype.onSave = function() {
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
const oCsnOutput = prepareJsonOutput(this._oJson);
|
|
160
|
+
const oPayload = {
|
|
161
161
|
extensions: [JSON.stringify(oCsnOutput)]
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
const oAddFieldPromise = new Promise(function(resolve, reject) {
|
|
165
|
+
const oXhr = new XMLHttpRequest();
|
|
166
166
|
oXhr.open("POST", "/-/cds/extensibility/addExtension");
|
|
167
167
|
oXhr.setRequestHeader("Content-Type", "application/json");
|
|
168
168
|
oXhr.onload = function() {
|
|
@@ -20,12 +20,12 @@ sap.ui.define([
|
|
|
20
20
|
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor
|
|
21
21
|
* @author SAP SE
|
|
22
22
|
* @since 1.93
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.129.0
|
|
24
24
|
*
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.fl
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
const RangeEditor = BasePropertyEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor", {
|
|
29
29
|
xmlFragment: "sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor",
|
|
30
30
|
metadata: {
|
|
31
31
|
library: "sap.ui.fl"
|
|
@@ -33,11 +33,12 @@ sap.ui.define([
|
|
|
33
33
|
renderer: BasePropertyEditor.getMetadata().getRenderer().render
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
RangeEditor.configMetadata =
|
|
36
|
+
RangeEditor.configMetadata = {
|
|
37
|
+
...BasePropertyEditor.configMetadata,
|
|
37
38
|
rangeType: {
|
|
38
39
|
defaultValue: "string"
|
|
39
40
|
}
|
|
40
|
-
}
|
|
41
|
+
};
|
|
41
42
|
|
|
42
43
|
RangeEditor.prototype.init = function(...aArgs) {
|
|
43
44
|
BasePropertyEditor.prototype.init.apply(this, aArgs);
|
|
@@ -59,23 +60,23 @@ sap.ui.define([
|
|
|
59
60
|
RangeEditor.prototype.setValue = function(...aArgs) {
|
|
60
61
|
const [aValues] = aArgs;
|
|
61
62
|
BasePropertyEditor.prototype.setValue.apply(this, aArgs);
|
|
62
|
-
|
|
63
|
+
const oConfig = {
|
|
63
64
|
type: this.getConfig().rangeType
|
|
64
65
|
};
|
|
65
|
-
|
|
66
|
+
const aRangeValues = Array.isArray(aValues) ? aValues : [];
|
|
66
67
|
this._oContentModel.setData([{
|
|
67
68
|
value: aRangeValues[0],
|
|
68
|
-
config:
|
|
69
|
+
config: { index: 0, ...oConfig }
|
|
69
70
|
}, {
|
|
70
71
|
value: aRangeValues[1],
|
|
71
|
-
config:
|
|
72
|
+
config: { index: 1, ...oConfig }
|
|
72
73
|
}]);
|
|
73
74
|
};
|
|
74
75
|
|
|
75
76
|
RangeEditor.prototype._onChange = function(oEvent) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
const vValue = oEvent.getParameter("value");
|
|
78
|
+
const iIndex = oEvent.getSource().getConfig().index;
|
|
79
|
+
const aNewValue = (this.getValue() || []).slice();
|
|
79
80
|
aNewValue[iIndex] = vValue;
|
|
80
81
|
this.setValue(aNewValue);
|
|
81
82
|
};
|
|
@@ -22,12 +22,12 @@ 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.129.0
|
|
26
26
|
*
|
|
27
27
|
* @private
|
|
28
28
|
* @ui5-restricted sap.ui.fl
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
const TimeEditor = DateEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor", {
|
|
31
31
|
xmlFragment: "sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor",
|
|
32
32
|
metadata: {
|
|
33
33
|
library: "sap.ui.fl"
|
|
@@ -35,7 +35,8 @@ sap.ui.define([
|
|
|
35
35
|
renderer: BasePropertyEditor.getMetadata().getRenderer().render
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
TimeEditor.configMetadata =
|
|
38
|
+
TimeEditor.configMetadata = {
|
|
39
|
+
...DateEditor.configMetadata,
|
|
39
40
|
pattern: {
|
|
40
41
|
defaultValue: "HH:mm:ss"
|
|
41
42
|
},
|
|
@@ -43,13 +44,10 @@ sap.ui.define([
|
|
|
43
44
|
utc: {
|
|
44
45
|
defaultValue: false
|
|
45
46
|
}
|
|
46
|
-
}
|
|
47
|
+
};
|
|
47
48
|
|
|
48
49
|
TimeEditor.prototype.getDefaultValidators = function() {
|
|
49
|
-
return
|
|
50
|
-
{},
|
|
51
|
-
DateEditor.prototype.getDefaultValidators.call(this)
|
|
52
|
-
);
|
|
50
|
+
return { ...DateEditor.prototype.getDefaultValidators.call(this) };
|
|
53
51
|
};
|
|
54
52
|
|
|
55
53
|
TimeEditor.prototype.getFormatterInstance = function(mOptions) {
|