@openui5/sap.ui.fl 1.92.0 → 1.93.3
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/{.eslintrc → .eslintrc.json} +0 -0
- package/.reuse/dep5 +5 -0
- package/THIRDPARTY.txt +10 -1
- 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 +41 -27
- package/src/sap/ui/fl/ChangePersistence.js +63 -22
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/ControlPersonalizationAPI.js +1 -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 +1 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- 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 +50 -2
- package/src/sap/ui/fl/Variant.js +20 -20
- package/src/sap/ui/fl/XmlPreprocessorImpl.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +85 -40
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +196 -38
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +91 -85
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +19 -8
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/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/flexState/FlexState.js +13 -1
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +2 -0
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +23 -9
- package/src/sap/ui/fl/changeHandler/AddXML.js +2 -3
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +40 -29
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +43 -30
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +65 -26
- package/src/sap/ui/fl/changeHandler/BaseRename.js +26 -18
- package/src/sap/ui/fl/changeHandler/HideControl.js +21 -18
- package/src/sap/ui/fl/changeHandler/MoveControls.js +250 -172
- package/src/sap/ui/fl/changeHandler/MoveElements.js +90 -61
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +12 -12
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +27 -23
- package/src/sap/ui/fl/changeHandler/StashControl.js +51 -23
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +13 -14
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +23 -16
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +45 -21
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +6 -2
- package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +8 -4
- package/src/sap/ui/fl/changeHandler/common/revertAddedControls.js +17 -7
- 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 +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +1 -0
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +3 -0
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +5 -0
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +2 -2
- 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/messagebundle.properties +15 -0
- package/src/sap/ui/fl/messagebundle_ar.properties +9 -1
- package/src/sap/ui/fl/messagebundle_bg.properties +9 -1
- package/src/sap/ui/fl/messagebundle_ca.properties +9 -1
- package/src/sap/ui/fl/messagebundle_cs.properties +9 -1
- package/src/sap/ui/fl/messagebundle_cy.properties +9 -1
- package/src/sap/ui/fl/messagebundle_da.properties +9 -1
- package/src/sap/ui/fl/messagebundle_de.properties +9 -1
- package/src/sap/ui/fl/messagebundle_el.properties +9 -1
- package/src/sap/ui/fl/messagebundle_en.properties +8 -0
- package/src/sap/ui/fl/messagebundle_en_GB.properties +8 -0
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +10 -0
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +8 -0
- package/src/sap/ui/fl/messagebundle_es.properties +9 -1
- package/src/sap/ui/fl/messagebundle_es_MX.properties +9 -1
- package/src/sap/ui/fl/messagebundle_et.properties +9 -1
- package/src/sap/ui/fl/messagebundle_fi.properties +9 -1
- package/src/sap/ui/fl/messagebundle_fr.properties +8 -0
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +8 -0
- package/src/sap/ui/fl/messagebundle_hi.properties +9 -1
- package/src/sap/ui/fl/messagebundle_hr.properties +9 -1
- package/src/sap/ui/fl/messagebundle_hu.properties +9 -1
- package/src/sap/ui/fl/messagebundle_id.properties +9 -1
- package/src/sap/ui/fl/messagebundle_it.properties +9 -1
- package/src/sap/ui/fl/messagebundle_iw.properties +9 -1
- package/src/sap/ui/fl/messagebundle_ja.properties +9 -1
- package/src/sap/ui/fl/messagebundle_kk.properties +9 -1
- package/src/sap/ui/fl/messagebundle_ko.properties +9 -1
- package/src/sap/ui/fl/messagebundle_lt.properties +9 -1
- package/src/sap/ui/fl/messagebundle_lv.properties +9 -1
- package/src/sap/ui/fl/messagebundle_ms.properties +9 -1
- package/src/sap/ui/fl/messagebundle_nl.properties +9 -1
- package/src/sap/ui/fl/messagebundle_no.properties +9 -1
- package/src/sap/ui/fl/messagebundle_pl.properties +9 -1
- package/src/sap/ui/fl/messagebundle_pt.properties +9 -1
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +9 -1
- package/src/sap/ui/fl/messagebundle_ro.properties +8 -0
- package/src/sap/ui/fl/messagebundle_ru.properties +9 -1
- package/src/sap/ui/fl/messagebundle_sh.properties +9 -1
- package/src/sap/ui/fl/messagebundle_sk.properties +9 -1
- package/src/sap/ui/fl/messagebundle_sl.properties +9 -1
- package/src/sap/ui/fl/messagebundle_sv.properties +9 -1
- package/src/sap/ui/fl/messagebundle_th.properties +9 -1
- package/src/sap/ui/fl/messagebundle_tr.properties +9 -1
- package/src/sap/ui/fl/messagebundle_uk.properties +9 -1
- package/src/sap/ui/fl/messagebundle_vi.properties +9 -1
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +9 -1
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +9 -1
- package/src/sap/ui/fl/registry/Settings.js +27 -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 +7 -7
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +2 -2
- 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 +11 -38
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.flexibility.js +2 -1
- package/src/sap/ui/fl/util/IFrame.js +29 -2
- package/src/sap/ui/fl/util/IFrameRenderer.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/VariantManagement.js +86 -29
- package/src/sap/ui/fl/variants/VariantModel.js +41 -18
- package/src/sap/ui/fl/write/_internal/Storage.js +2 -2
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -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 +11 -10
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +2 -24
- package/src/sap/ui/fl/write/_internal/condenser/Utils.js +8 -5
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +10 -8
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +14 -11
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +31 -20
- 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/LocalStorageConnector.js +3 -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/delegates/ODataV4ReadDelegate.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 +7 -5
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +129 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.fragment.xml +33 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +163 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +209 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/annotationsEditor/AnnotationsEditor.js +49 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.fragment.xml +6 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +41 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateEditor/DateEditor.js +43 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateTimeEditor/DateTimeEditor.js +38 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.fragment.xml +22 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +84 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.fragment.xml +10 -0
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +70 -0
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +16 -10
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +11 -4
- 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 -0
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +1 -0
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +24 -9
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +9 -8
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +32 -26
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
|
@@ -17,19 +17,22 @@ sap.ui.define([
|
|
|
17
17
|
*
|
|
18
18
|
* @param {Map} mUIReconstructions - Map of UI reconstructions
|
|
19
19
|
* @param {object} oCondenserInfo - Condenser specific information
|
|
20
|
+
* @returns {Promise} resolves when a destroy change is added to UI Reconstruction Map
|
|
20
21
|
*/
|
|
21
22
|
addToReconstructionMap: function(mUIReconstructions, oCondenserInfo) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
return CondenserUtils.getContainerElementIds(oCondenserInfo.targetContainer, oCondenserInfo.targetAggregation)
|
|
24
|
+
.then(function (aTargetContainerElementIds) {
|
|
25
|
+
var aContainerElementIds = CondenserUtils.getInitialUIContainerElementIds(mUIReconstructions, oCondenserInfo.targetContainer, oCondenserInfo.targetAggregation, aTargetContainerElementIds);
|
|
26
|
+
if (aContainerElementIds.length - 1 < oCondenserInfo.sourceIndex) {
|
|
27
|
+
while (aContainerElementIds.length - 1 < oCondenserInfo.sourceIndex) {
|
|
28
|
+
var iIndex = aContainerElementIds.length;
|
|
29
|
+
aContainerElementIds.splice(aContainerElementIds.length, 0, CondenserUtils.PLACEHOLDER + iIndex);
|
|
30
|
+
}
|
|
31
|
+
aContainerElementIds[oCondenserInfo.sourceIndex] = oCondenserInfo.affectedControl;
|
|
32
|
+
} else {
|
|
33
|
+
aContainerElementIds.splice(oCondenserInfo.sourceIndex, 0, oCondenserInfo.affectedControl);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
33
36
|
},
|
|
34
37
|
|
|
35
38
|
/**
|
|
@@ -17,27 +17,33 @@ sap.ui.define([
|
|
|
17
17
|
*
|
|
18
18
|
* @param {Map} mUIReconstructions - Map of UI reconstructions
|
|
19
19
|
* @param {object} oCondenserInfo - Condenser specific information
|
|
20
|
+
* @returns {Promise} resolves when a create change is added to UI Reconstruction Map
|
|
20
21
|
*/
|
|
21
22
|
addToReconstructionMap: function(mUIReconstructions, oCondenserInfo) {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
return Promise.all([
|
|
24
|
+
CondenserUtils.getContainerElementIds(oCondenserInfo.sourceContainer, oCondenserInfo.sourceAggregation),
|
|
25
|
+
CondenserUtils.getContainerElementIds(oCondenserInfo.targetContainer, oCondenserInfo.targetAggregation)
|
|
26
|
+
]).then(function (aSourceTargetElementIds) {
|
|
27
|
+
var aSourceContainerElementIds = aSourceTargetElementIds[0];
|
|
28
|
+
var aTargetContainerElementIds = aSourceTargetElementIds[1];
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
var aContainerElementIds;
|
|
31
|
+
var iTargetIndex;
|
|
32
|
+
if (
|
|
33
|
+
oCondenserInfo.targetContainer === oCondenserInfo.sourceContainer
|
|
34
|
+
&& oCondenserInfo.targetAggregation === oCondenserInfo.sourceAggregation
|
|
35
|
+
) {
|
|
36
|
+
aContainerElementIds = CondenserUtils.getInitialUIContainerElementIds(mUIReconstructions, oCondenserInfo.targetContainer, oCondenserInfo.targetAggregation, aTargetContainerElementIds);
|
|
37
|
+
iTargetIndex = aContainerElementIds.indexOf(oCondenserInfo.affectedControl);
|
|
38
|
+
CondenserUtils.shiftElement(aContainerElementIds, iTargetIndex, oCondenserInfo.sourceIndex);
|
|
39
|
+
} else {
|
|
40
|
+
aContainerElementIds = CondenserUtils.getInitialUIContainerElementIds(mUIReconstructions, oCondenserInfo.targetContainer, oCondenserInfo.targetAggregation, aTargetContainerElementIds);
|
|
41
|
+
iTargetIndex = aContainerElementIds.indexOf(oCondenserInfo.affectedControl);
|
|
42
|
+
aContainerElementIds.splice(iTargetIndex, 1);
|
|
43
|
+
aContainerElementIds = CondenserUtils.getInitialUIContainerElementIds(mUIReconstructions, oCondenserInfo.sourceContainer, oCondenserInfo.sourceAggregation, aSourceContainerElementIds);
|
|
44
|
+
aContainerElementIds.splice(oCondenserInfo.sourceIndex, 0, oCondenserInfo.affectedControl);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
41
47
|
},
|
|
42
48
|
|
|
43
49
|
/**
|
|
@@ -49,8 +55,13 @@ sap.ui.define([
|
|
|
49
55
|
*/
|
|
50
56
|
simulate: function(aContainerElements, oCondenserInfo, aInitialUIElementIds) {
|
|
51
57
|
var sAffectedControlId = oCondenserInfo.affectedControl;
|
|
52
|
-
var
|
|
53
|
-
|
|
58
|
+
var iInitialSourceIndex = aInitialUIElementIds.indexOf(sAffectedControlId);
|
|
59
|
+
// the move itself should not extend the array, just replace the placeholder
|
|
60
|
+
CondenserUtils.extendElementsArray(aContainerElements, iInitialSourceIndex, undefined, sAffectedControlId);
|
|
61
|
+
|
|
62
|
+
var iCurrentSourceIndex = aContainerElements.indexOf(sAffectedControlId);
|
|
63
|
+
var iTargetIndex = oCondenserInfo.getTargetIndex(oCondenserInfo.change);
|
|
64
|
+
aContainerElements.splice(iTargetIndex, 0, aContainerElements.splice(iCurrentSourceIndex, 1)[0]);
|
|
54
65
|
}
|
|
55
66
|
};
|
|
56
67
|
});
|
|
@@ -30,7 +30,9 @@ sap.ui.define([
|
|
|
30
30
|
return ObjectStorageConnector.loadFeatures.apply(this, arguments).then(function(oFeatures) {
|
|
31
31
|
return merge({
|
|
32
32
|
isPublicLayerAvailable: true,
|
|
33
|
-
|
|
33
|
+
isPublicFlVariantEnabled: true,
|
|
34
|
+
isVariantAdaptationEnabled: true,
|
|
35
|
+
isCondensingEnabled: false
|
|
34
36
|
}, oFeatures);
|
|
35
37
|
});
|
|
36
38
|
};
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/base/ManagedObjectObserver",
|
|
8
|
-
"sap/ui/core/util/reflection/JsControlTreeModifier"
|
|
8
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
|
+
"sap/ui/fl/Utils"
|
|
9
10
|
], function(
|
|
10
11
|
ManagedObjectObserver,
|
|
11
|
-
JsControlTreeModifier
|
|
12
|
+
JsControlTreeModifier,
|
|
13
|
+
FlUtils
|
|
12
14
|
) {
|
|
13
15
|
"use strict";
|
|
14
16
|
|
|
@@ -18,7 +20,7 @@ sap.ui.define([
|
|
|
18
20
|
* @alias sap.ui.fl.write._internal.extensionPoint.Registry
|
|
19
21
|
*
|
|
20
22
|
* @author SAP SE
|
|
21
|
-
* @version 1.
|
|
23
|
+
* @version 1.93.3
|
|
22
24
|
*
|
|
23
25
|
* @private
|
|
24
26
|
* @ui5-restricted sap.ui.fl
|
|
@@ -41,7 +43,7 @@ sap.ui.define([
|
|
|
41
43
|
mExtensionPointsByParent[sParentId].forEach(function(oExtensionPoint) {
|
|
42
44
|
var sAggregationName = oExtensionPoint.aggregationName;
|
|
43
45
|
if (sAggregationName === oEvent.name) {
|
|
44
|
-
var vControlIds =
|
|
46
|
+
var vControlIds = FlUtils.getAggregation(oEvent.object, sAggregationName);
|
|
45
47
|
var aControlIds = [].concat(vControlIds || []).map(function(oControl) {
|
|
46
48
|
return oControl.getId();
|
|
47
49
|
});
|
|
@@ -91,7 +93,7 @@ sap.ui.define([
|
|
|
91
93
|
|
|
92
94
|
function addExtensionPoint(oParent, sAggregationName, mExtensionPointInfo) {
|
|
93
95
|
var sViewId = mExtensionPointInfo.view.getId();
|
|
94
|
-
var vAggregation =
|
|
96
|
+
var vAggregation = FlUtils.getAggregation(oParent, sAggregationName);
|
|
95
97
|
var aControlIds = [].concat(vAggregation || []).map(function(oControl) {
|
|
96
98
|
return oControl.getId();
|
|
97
99
|
});
|
|
@@ -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.93.3
|
|
21
21
|
* @public
|
|
22
22
|
* @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
|
|
23
23
|
*/
|
|
@@ -117,7 +117,7 @@ sap.ui.define([
|
|
|
117
117
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
|
|
118
118
|
* @experimental Since 1.87.0
|
|
119
119
|
* @author SAP SE
|
|
120
|
-
* @version 1.
|
|
120
|
+
* @version 1.93.3
|
|
121
121
|
*/
|
|
122
122
|
var ABAPExtensibilityVariantFactory = {};
|
|
123
123
|
|
|
@@ -198,7 +198,7 @@ sap.ui.define([
|
|
|
198
198
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.Utils
|
|
199
199
|
* @experimental Since 1.87.0
|
|
200
200
|
* @author SAP SE
|
|
201
|
-
* @version 1.
|
|
201
|
+
* @version 1.93.3
|
|
202
202
|
*/
|
|
203
203
|
var Utils = {};
|
|
204
204
|
|
|
@@ -207,7 +207,7 @@ sap.ui.define([
|
|
|
207
207
|
*
|
|
208
208
|
* @public
|
|
209
209
|
* @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
|
|
210
|
-
* @returns {
|
|
210
|
+
* @returns {boolean} true, if prerequisites are met
|
|
211
211
|
*/
|
|
212
212
|
Utils.checkControlPrerequisites = function(oControl) {
|
|
213
213
|
if (oControl) {
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation",
|
|
9
|
+
"sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog"
|
|
10
|
+
], function(
|
|
11
|
+
ServiceValidation,
|
|
12
|
+
CustomFieldCAPDialog
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
var oCurrentControl = null;
|
|
17
|
+
var oCAPDialog = null;
|
|
18
|
+
var oTextBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.fl");
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @namespace sap.ui.fl.write._internal.fieldExtensibility.CAPAccess
|
|
22
|
+
* @experimental Since 1.93
|
|
23
|
+
* @private
|
|
24
|
+
* @author SAP SE
|
|
25
|
+
* @version 1.93.3
|
|
26
|
+
*/
|
|
27
|
+
var CAPAccess = {};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
CAPAccess.getTexts = function() {
|
|
33
|
+
return {
|
|
34
|
+
headerText: oTextBundle.getText("BUSINESS_CONTEXT_TITLE"),
|
|
35
|
+
tooltip: oTextBundle.getText("BTN_ADD_FIELD")
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
CAPAccess.isExtensibilityEnabled = function() {
|
|
43
|
+
// For now, always enable CAP extensibility as it is controlled
|
|
44
|
+
// via the parameter in FieldExtensibility
|
|
45
|
+
return true;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
CAPAccess.getExtensionData = function() {
|
|
52
|
+
// For now collect all info here
|
|
53
|
+
// Should reuse existing utils, e.g. getBoundEntitySet in the future
|
|
54
|
+
var oModel = oCurrentControl.getModel();
|
|
55
|
+
var sPath = oCurrentControl.getBindingContext().getPath();
|
|
56
|
+
|
|
57
|
+
if (oModel.isA("sap.ui.model.odata.v2.ODataModel")) {
|
|
58
|
+
// v2 Models not supported yet
|
|
59
|
+
return Promise.reject();
|
|
60
|
+
} else if (oModel.isA("sap.ui.model.odata.v4.ODataModel")) {
|
|
61
|
+
var oMetaModel = oModel.getMetaModel();
|
|
62
|
+
var sMetaPath = oMetaModel.getMetaPath(sPath);
|
|
63
|
+
|
|
64
|
+
return oMetaModel.requestObject(sMetaPath).then(function(oEntitySet) {
|
|
65
|
+
var mScope = oMetaModel.fetchEntityContainer().getResult();
|
|
66
|
+
var mEntityContainer = mScope[mScope.$EntityContainer];
|
|
67
|
+
return {
|
|
68
|
+
boundEntitySet: oEntitySet,
|
|
69
|
+
entityTypes: Object.values(mEntityContainer).map(function(oEntitySet) {
|
|
70
|
+
return oEntitySet.$Type;
|
|
71
|
+
}).filter(Boolean)
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return Promise.reject();
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @inheritDoc
|
|
80
|
+
*/
|
|
81
|
+
CAPAccess.onControlSelected = function(oControl) {
|
|
82
|
+
oCurrentControl = oControl;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @inheritDoc
|
|
87
|
+
*/
|
|
88
|
+
CAPAccess.onTriggerCreateExtensionData = function(aBusinessContextInfos, sRtaStyleClassName) {
|
|
89
|
+
if (!oCAPDialog) {
|
|
90
|
+
oCAPDialog = new CustomFieldCAPDialog();
|
|
91
|
+
}
|
|
92
|
+
oCAPDialog.open(aBusinessContextInfos, sRtaStyleClassName);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Checks if a given service is outdated
|
|
97
|
+
*
|
|
98
|
+
* @public
|
|
99
|
+
* @param {string|map} vServiceInfo - service uri or service info map containing <code>serviceName</code>, <code>serviceVersion</code> and <code>serviceType</code>
|
|
100
|
+
* @return {boolean} returns true if the service is outdated
|
|
101
|
+
*/
|
|
102
|
+
CAPAccess.isServiceOutdated = function(vServiceInfo) {
|
|
103
|
+
return ServiceValidation.isServiceOutdated(vServiceInfo);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Sets a given service valid.
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
* @param {string|map} vServiceInfo - service uri or service info map containing <code>serviceName</code>, <code>serviceVersion</code> and <code>serviceType</code>
|
|
111
|
+
* @return {void}
|
|
112
|
+
*/
|
|
113
|
+
CAPAccess.setServiceValid = function(vServiceInfo) {
|
|
114
|
+
ServiceValidation.setServiceValid(vServiceInfo);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Invalidates a given service. Once a service has been validated or invalidation period is over the service becomes valid again
|
|
119
|
+
*
|
|
120
|
+
* @public
|
|
121
|
+
* @param {string|map} vServiceInfo - service uri or service info map containing <code>serviceName</code>, <code>serviceVersion</code> and <code>serviceType</code>
|
|
122
|
+
* @return {void}
|
|
123
|
+
*/
|
|
124
|
+
CAPAccess.setServiceInvalid = function(vServiceInfo) {
|
|
125
|
+
ServiceValidation.setServiceInvalid(vServiceInfo);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
return CAPAccess;
|
|
129
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns="sap.m"
|
|
3
|
+
xmlns:core="sap.ui.core"
|
|
4
|
+
xmlns:editor="sap.ui.integration.designtime.baseEditor"
|
|
5
|
+
>
|
|
6
|
+
<Dialog
|
|
7
|
+
class="sapUiContentPadding"
|
|
8
|
+
title="{i18n>CAP_ADD_FIELD_TITLE}"
|
|
9
|
+
verticalScrolling="true"
|
|
10
|
+
resizable="false"
|
|
11
|
+
draggable="true"
|
|
12
|
+
contentWidth="42rem"
|
|
13
|
+
contentHeight="80vh"
|
|
14
|
+
>
|
|
15
|
+
<content>
|
|
16
|
+
<editor:BaseEditor layout="form" />
|
|
17
|
+
</content>
|
|
18
|
+
<beginButton>
|
|
19
|
+
<Button
|
|
20
|
+
type="Emphasized"
|
|
21
|
+
text="{i18n>CAP_ADD_FIELD_CREATE}"
|
|
22
|
+
press="onSave"
|
|
23
|
+
/>
|
|
24
|
+
</beginButton>
|
|
25
|
+
<endButton>
|
|
26
|
+
<Button
|
|
27
|
+
type="Transparent"
|
|
28
|
+
text="{i18n>CAP_ADD_FIELD_CANCEL}"
|
|
29
|
+
press="onCancel"
|
|
30
|
+
/>
|
|
31
|
+
</endButton>
|
|
32
|
+
</Dialog>
|
|
33
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* OpenUI5
|
|
4
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
6
|
+
*/
|
|
7
|
+
/* global XMLHttpRequest */
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/ui/base/ManagedObject",
|
|
10
|
+
"sap/ui/core/Fragment",
|
|
11
|
+
"sap/m/MessageToast",
|
|
12
|
+
"sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig",
|
|
13
|
+
"sap/base/util/ObjectPath",
|
|
14
|
+
"sap/base/util/deepClone",
|
|
15
|
+
"sap/ui/model/resource/ResourceModel"
|
|
16
|
+
], function(
|
|
17
|
+
ManagedObject,
|
|
18
|
+
Fragment,
|
|
19
|
+
MessageToast,
|
|
20
|
+
getEditorConfig,
|
|
21
|
+
ObjectPath,
|
|
22
|
+
deepClone,
|
|
23
|
+
ResourceModel
|
|
24
|
+
) {
|
|
25
|
+
"use strict";
|
|
26
|
+
|
|
27
|
+
var oTextBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.fl");
|
|
28
|
+
|
|
29
|
+
function setupEditor(oDialog, oInitialJson, oCustomConfig) {
|
|
30
|
+
var oEditor = oDialog.getContent()[0];
|
|
31
|
+
oEditor.setJson(deepClone(oInitialJson));
|
|
32
|
+
oEditor.setConfig(getEditorConfig(oCustomConfig));
|
|
33
|
+
return oEditor;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function prepareJsonOutput(oOriginalJson) {
|
|
37
|
+
if (!oOriginalJson) {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
var oJson = deepClone(oOriginalJson);
|
|
41
|
+
|
|
42
|
+
// Format enum input validation
|
|
43
|
+
var vRange = ObjectPath.get(["@assert.range"], oJson);
|
|
44
|
+
if (
|
|
45
|
+
oJson.type === "cds.String"
|
|
46
|
+
&& Array.isArray(vRange)
|
|
47
|
+
) {
|
|
48
|
+
ObjectPath.set(["enum"], vRange.reduce(function (enumMap, enumOption) {
|
|
49
|
+
enumMap[enumOption] = {};
|
|
50
|
+
return enumMap;
|
|
51
|
+
}, {}), oJson);
|
|
52
|
+
ObjectPath.set(["@assert.range"], true, oJson);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Flatten additional annotations
|
|
56
|
+
if (oJson.annotations) {
|
|
57
|
+
oJson = Object.assign({}, oJson, oJson.annotations);
|
|
58
|
+
delete oJson.annotations;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return oJson;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @extends sap.ui.base.ManagedObject
|
|
66
|
+
* @alias sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog
|
|
67
|
+
* @author SAP SE
|
|
68
|
+
* @version 1.93.3
|
|
69
|
+
* @since 1.93
|
|
70
|
+
* @experimental Since 1.93
|
|
71
|
+
* @private
|
|
72
|
+
* @ui5-restricted
|
|
73
|
+
*/
|
|
74
|
+
var CustomFieldCAPDialog = ManagedObject.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog", {
|
|
75
|
+
metadata: {
|
|
76
|
+
library: "sap.ui.fl",
|
|
77
|
+
properties: {
|
|
78
|
+
_dialog: {
|
|
79
|
+
type: "sap.m.Dialog",
|
|
80
|
+
visibility: "hidden"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
CustomFieldCAPDialog.prototype.open = function(mEntitySetInformation, sRtaStyleClassName) {
|
|
87
|
+
var oInitialJson = {
|
|
88
|
+
name: "NewField",
|
|
89
|
+
type: "cds.String",
|
|
90
|
+
entityType: mEntitySetInformation.boundEntitySet.$Type
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
var oDialog = this.getProperty("_dialog");
|
|
94
|
+
if (oDialog) {
|
|
95
|
+
this._oEditor.setJson(deepClone(oInitialJson));
|
|
96
|
+
oDialog.open();
|
|
97
|
+
} else {
|
|
98
|
+
Fragment.load({
|
|
99
|
+
name: "sap.ui.fl.write._internal.fieldExtensibility.cap.dialog.CustomFieldCAPDialog",
|
|
100
|
+
controller: this
|
|
101
|
+
}).then(function(oAddCustomFieldCAPDialog) {
|
|
102
|
+
oAddCustomFieldCAPDialog.setModel(new ResourceModel({
|
|
103
|
+
bundle: oTextBundle
|
|
104
|
+
}), "i18n");
|
|
105
|
+
oAddCustomFieldCAPDialog.addStyleClass(sRtaStyleClassName);
|
|
106
|
+
this.setProperty("_dialog", oAddCustomFieldCAPDialog);
|
|
107
|
+
this._oJson = deepClone(oInitialJson);
|
|
108
|
+
this._oEditor = setupEditor(oAddCustomFieldCAPDialog, this._oJson, {
|
|
109
|
+
entityTypes: mEntitySetInformation.entityTypes
|
|
110
|
+
});
|
|
111
|
+
this._oEditor.attachJsonChange(function(oEvent) {
|
|
112
|
+
this._oJson = prepareJsonOutput(oEvent.getParameter("json"));
|
|
113
|
+
}.bind(this));
|
|
114
|
+
oAddCustomFieldCAPDialog.open();
|
|
115
|
+
}.bind(this));
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
CustomFieldCAPDialog.prototype.exit = function() {
|
|
120
|
+
var oDialog = this.getProperty("_dialog");
|
|
121
|
+
if (oDialog) {
|
|
122
|
+
oDialog.destroy();
|
|
123
|
+
}
|
|
124
|
+
if (this.oEditor) {
|
|
125
|
+
this.oEditor.destroy();
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
CustomFieldCAPDialog.prototype.onSave = function() {
|
|
130
|
+
var oPayload = {
|
|
131
|
+
definition: JSON.stringify(this._oJson)
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
var oAddFieldPromise = new Promise(function(resolve, reject) {
|
|
135
|
+
var oXhr = new XMLHttpRequest();
|
|
136
|
+
oXhr.open("POST", "http://localhost:4004/extensibility/addField");
|
|
137
|
+
oXhr.setRequestHeader("Content-Type", "application/json");
|
|
138
|
+
oXhr.onload = function() {
|
|
139
|
+
if (oXhr.status >= 200 && oXhr.status < 400) {
|
|
140
|
+
resolve(oXhr.response);
|
|
141
|
+
} else {
|
|
142
|
+
reject({
|
|
143
|
+
status: oXhr.status,
|
|
144
|
+
message: oXhr.statusText
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
oXhr.send(JSON.stringify(oPayload));
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
oAddFieldPromise.then(function() {
|
|
152
|
+
MessageToast.show(oTextBundle.getText("CAP_ADD_FIELD_SUCCESS"));
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
this.getProperty("_dialog").close();
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
CustomFieldCAPDialog.prototype.onCancel = function() {
|
|
159
|
+
this.getProperty("_dialog").close();
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
return CustomFieldCAPDialog;
|
|
163
|
+
});
|