@openui5/sap.ui.fl 1.115.1 → 1.116.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/.eslintrc.json +33 -2
- package/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +1 -7
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +29 -29
- package/src/sap/ui/fl/ChangePersistence.js +69 -71
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnector.js +7 -7
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +7 -7
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +5 -5
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +157 -130
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/Layer.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +11 -11
- package/src/sap/ui/fl/Utils.js +16 -17
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +41 -38
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +114 -94
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +19 -19
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory.js +4 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ApplyUtil.js +1 -2
- 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 +15 -15
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +8 -8
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +6 -6
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -2
- 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 +3 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +4 -6
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +10 -10
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +2 -4
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector.js +4 -5
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +29 -29
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +1 -2
- package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +6 -4
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +44 -44
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +15 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -14
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +3 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +6 -5
- package/src/sap/ui/fl/apply/_internal/flexObjects/RevertData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +12 -4
- package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +23 -5
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +183 -64
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +27 -17
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +50 -50
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +27 -13
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +55 -37
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +12 -12
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +5 -5
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +6 -6
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -2
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +4 -4
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +5 -5
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +10 -4
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +5 -5
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +6 -6
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +21 -21
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +34 -34
- package/src/sap/ui/fl/changeHandler/Base.js +7 -7
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +107 -107
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +45 -45
- package/src/sap/ui/fl/changeHandler/BaseRename.js +26 -26
- package/src/sap/ui/fl/changeHandler/BaseTreeModifier.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +15 -16
- package/src/sap/ui/fl/changeHandler/MoveControls.js +190 -191
- package/src/sap/ui/fl/changeHandler/MoveElements.js +36 -36
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +7 -7
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +7 -7
- package/src/sap/ui/fl/changeHandler/StashControl.js +35 -35
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +7 -7
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +21 -21
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +39 -39
- package/src/sap/ui/fl/changeHandler/common/ChangeCategories.js +1 -1
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +5 -5
- package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +5 -5
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +12 -12
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +7 -9
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +12 -12
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +60 -60
- package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +2 -5
- package/src/sap/ui/fl/initial/_internal/Storage.js +18 -19
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +4 -4
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +20 -21
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +6 -6
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +4 -4
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +18 -18
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +4 -4
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +2 -2
- package/src/sap/ui/fl/interfaces/Delegate.js +7 -9
- package/src/sap/ui/fl/library.js +44 -45
- package/src/sap/ui/fl/library.support.js +59 -59
- package/src/sap/ui/fl/messagebundle.properties +4 -119
- package/src/sap/ui/fl/messagebundle_ar.properties +2 -79
- package/src/sap/ui/fl/messagebundle_bg.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ca.properties +2 -79
- package/src/sap/ui/fl/messagebundle_cs.properties +2 -79
- package/src/sap/ui/fl/messagebundle_cy.properties +2 -79
- package/src/sap/ui/fl/messagebundle_da.properties +2 -79
- package/src/sap/ui/fl/messagebundle_de.properties +2 -79
- package/src/sap/ui/fl/messagebundle_el.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +2 -79
- package/src/sap/ui/fl/messagebundle_es.properties +2 -79
- package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -79
- package/src/sap/ui/fl/messagebundle_et.properties +2 -79
- package/src/sap/ui/fl/messagebundle_fi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_fr.properties +2 -79
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -79
- package/src/sap/ui/fl/messagebundle_hi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_hr.properties +2 -79
- package/src/sap/ui/fl/messagebundle_hu.properties +2 -79
- package/src/sap/ui/fl/messagebundle_id.properties +2 -79
- package/src/sap/ui/fl/messagebundle_it.properties +2 -79
- package/src/sap/ui/fl/messagebundle_iw.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ja.properties +2 -79
- package/src/sap/ui/fl/messagebundle_kk.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ko.properties +2 -79
- package/src/sap/ui/fl/messagebundle_lt.properties +2 -79
- package/src/sap/ui/fl/messagebundle_lv.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ms.properties +2 -79
- package/src/sap/ui/fl/messagebundle_nl.properties +2 -79
- package/src/sap/ui/fl/messagebundle_no.properties +2 -79
- package/src/sap/ui/fl/messagebundle_pl.properties +2 -79
- package/src/sap/ui/fl/messagebundle_pt.properties +2 -79
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ro.properties +2 -79
- package/src/sap/ui/fl/messagebundle_ru.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sh.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sk.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sl.properties +2 -79
- package/src/sap/ui/fl/messagebundle_sv.properties +2 -79
- package/src/sap/ui/fl/messagebundle_th.properties +2 -79
- package/src/sap/ui/fl/messagebundle_tr.properties +2 -79
- package/src/sap/ui/fl/messagebundle_uk.properties +3 -80
- package/src/sap/ui/fl/messagebundle_vi.properties +2 -79
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -79
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -79
- package/src/sap/ui/fl/registry/Settings.js +41 -43
- package/src/sap/ui/fl/requireAsync.js +7 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +8 -8
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +22 -22
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +3 -3
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/Component.js +3 -5
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +27 -27
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +20 -20
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +17 -17
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +4 -4
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +34 -34
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +10 -10
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +5 -5
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +2 -2
- package/src/sap/ui/fl/util/IFrame.js +18 -18
- package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +7 -7
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +2 -2
- package/src/sap/ui/fl/util/getContainerUserInfo.js +25 -25
- package/src/sap/ui/fl/util/resolveBinding.js +3 -3
- package/src/sap/ui/fl/variants/VariantManagement.js +8 -32
- package/src/sap/ui/fl/variants/VariantModel.js +182 -124
- package/src/sap/ui/fl/variants/context/Component.js +1 -2
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -5
- package/src/sap/ui/fl/write/_internal/SaveAs.js +143 -143
- package/src/sap/ui/fl/write/_internal/Storage.js +46 -49
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -4
- package/src/sap/ui/fl/write/_internal/Versions.js +104 -94
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +9 -9
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +7 -7
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +3 -5
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +15 -10
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +10 -10
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +23 -24
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +60 -61
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +4 -4
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +6 -6
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +14 -14
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +3 -3
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +15 -7
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +2 -2
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +3 -3
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +3 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +4 -4
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +2 -2
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +26 -26
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +78 -57
- package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +12 -13
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +12 -12
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +7 -7
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +7 -7
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +9 -9
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +546 -110
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +109 -67
- package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +3 -3
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +19 -20
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +19 -19
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +59 -54
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +8 -8
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +6 -6
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +14 -13
- package/src/sap/ui/fl/write/api/TranslationAPI.js +13 -13
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/VersionsAPI.js +14 -14
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +1 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +7 -7
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +17 -17
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
*
|
|
26
26
|
* @private
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.116.0
|
|
29
29
|
*
|
|
30
30
|
* @experimental Since 1.80 This class is experimental and provides only limited functionality. Also the API might be
|
|
31
31
|
* changed in future.
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
function getDefaultDelegateInfo(oControl, sModelType) {
|
|
58
58
|
sModelType = getModelTypeForControl(oControl, sModelType);
|
|
59
59
|
var aDelegateInfo = DelegateMediator._mDefaultDelegateItems[sModelType];
|
|
60
|
-
return (aDelegateInfo || []).map(function
|
|
60
|
+
return (aDelegateInfo || []).map(function(mDelegateInfo) {
|
|
61
61
|
mDelegateInfo.payload = {};
|
|
62
62
|
return mDelegateInfo;
|
|
63
63
|
});
|
|
@@ -65,27 +65,27 @@ sap.ui.define([
|
|
|
65
65
|
|
|
66
66
|
function loadDelegates(oModifier, oControl, aDelegates) {
|
|
67
67
|
if (!aDelegates.length) {
|
|
68
|
-
//it is a valid case to ask for a delegate and there is none
|
|
69
|
-
//a broken delegate is logged below
|
|
68
|
+
// it is a valid case to ask for a delegate and there is none
|
|
69
|
+
// a broken delegate is logged below
|
|
70
70
|
return Promise.resolve([]);
|
|
71
71
|
}
|
|
72
72
|
var aPromises = [];
|
|
73
|
-
aDelegates.forEach(function
|
|
74
|
-
aPromises.push(function
|
|
73
|
+
aDelegates.forEach(function(mDelegateInfo) {
|
|
74
|
+
aPromises.push(function(aLoadedDelegates) {
|
|
75
75
|
return requireAsync(mDelegateInfo.name)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
.then(function(oDelegate) {
|
|
77
|
+
mDelegateInfo.instance = oDelegate || {};
|
|
78
|
+
aLoadedDelegates.push(mDelegateInfo);
|
|
79
|
+
return aLoadedDelegates;
|
|
80
|
+
})
|
|
81
|
+
.catch(function(oError) {
|
|
82
|
+
Log.error("Failed to load the delegate for the control " + oModifier.getId(oControl) +
|
|
83
83
|
"\n" + oError.message);
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
return aLoadedDelegates;
|
|
85
|
+
});
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
|
-
return aPromises.reduce(function
|
|
88
|
+
return aPromises.reduce(function(oPreviousPromise, oCurrentPromise) {
|
|
89
89
|
return oPreviousPromise.then(oCurrentPromise);
|
|
90
90
|
}, Promise.resolve([]));
|
|
91
91
|
}
|
|
@@ -122,6 +122,9 @@ sap.ui.define([
|
|
|
122
122
|
// is available maximum once for instancespecific delegate
|
|
123
123
|
mTargetDelegateInfo.payload = mDelegateInfo.payload;
|
|
124
124
|
}
|
|
125
|
+
if (mDelegateInfo.delegateType) {
|
|
126
|
+
mTargetDelegateInfo.delegateType = mDelegateInfo.delegateType;
|
|
127
|
+
}
|
|
125
128
|
return mTargetDelegateInfo;
|
|
126
129
|
}
|
|
127
130
|
|
|
@@ -173,7 +176,7 @@ sap.ui.define([
|
|
|
173
176
|
}
|
|
174
177
|
|
|
175
178
|
function validateInputParameters(oControl, oModifier) {
|
|
176
|
-
return new Promise(function
|
|
179
|
+
return new Promise(function(resolve, reject) {
|
|
177
180
|
if (!oControl) {
|
|
178
181
|
reject(new Error("The control parameter is missing"));
|
|
179
182
|
}
|
|
@@ -194,14 +197,14 @@ sap.ui.define([
|
|
|
194
197
|
}
|
|
195
198
|
|
|
196
199
|
function isValidType(mPropertyBag) {
|
|
197
|
-
return Object.values(DelegateMediator.types).some(function
|
|
200
|
+
return Object.values(DelegateMediator.types).some(function(sDelegateMediatorType) {
|
|
198
201
|
return sDelegateMediatorType === mPropertyBag.delegateType;
|
|
199
202
|
});
|
|
200
203
|
}
|
|
201
204
|
|
|
202
205
|
function isCompetingDelegateAlreadyRegistered(mPropertyBag) {
|
|
203
206
|
var aDefaultDelegates = DelegateMediator._mDefaultDelegateItems[mPropertyBag.modelType] || [];
|
|
204
|
-
var aDefaultDelegateTypes = aDefaultDelegates.map(function
|
|
207
|
+
var aDefaultDelegateTypes = aDefaultDelegates.map(function(mDefaultDelegateInfo) {
|
|
205
208
|
return mDefaultDelegateInfo.delegateType;
|
|
206
209
|
});
|
|
207
210
|
return aDefaultDelegateTypes.indexOf(DelegateMediator.types.COMPLETE) > -1
|
|
@@ -209,7 +212,7 @@ sap.ui.define([
|
|
|
209
212
|
|| (mPropertyBag.delegateType === DelegateMediator.types.COMPLETE && aDefaultDelegateTypes.length);
|
|
210
213
|
}
|
|
211
214
|
|
|
212
|
-
DelegateMediator.getKnownDefaultDelegateLibraries = function
|
|
215
|
+
DelegateMediator.getKnownDefaultDelegateLibraries = function() {
|
|
213
216
|
return ["sap.ui.comp"]; // OdataV2Delegate is defined in sap.ui.comp
|
|
214
217
|
};
|
|
215
218
|
|
|
@@ -222,10 +225,10 @@ sap.ui.define([
|
|
|
222
225
|
* @param {string} [sModelType] - Model type, if none is provided the default model of oControl is taken instead
|
|
223
226
|
* @returns {string[]} Required libraries
|
|
224
227
|
*/
|
|
225
|
-
DelegateMediator.getRequiredLibrariesForDefaultDelegate = function
|
|
228
|
+
DelegateMediator.getRequiredLibrariesForDefaultDelegate = function(aDelegateNames, oControl, sModelType) {
|
|
226
229
|
sModelType = getModelTypeForControl(oControl, sModelType);
|
|
227
230
|
var aDelegateInfo = DelegateMediator._mDefaultDelegateItems[sModelType] || [];
|
|
228
|
-
return aDelegateInfo.reduce(function
|
|
231
|
+
return aDelegateInfo.reduce(function(aRequiredLibNames, mDelegateInfo) {
|
|
229
232
|
var bIsDefaultDelegate = aDelegateNames.indexOf(mDelegateInfo.name) > -1;
|
|
230
233
|
return aRequiredLibNames.concat(Object.keys((bIsDefaultDelegate && mDelegateInfo.requiredLibraries) || {}));
|
|
231
234
|
}, []);
|
|
@@ -237,7 +240,7 @@ sap.ui.define([
|
|
|
237
240
|
* @param {string} sModelType - Delegate model type
|
|
238
241
|
* @returns {boolean} <code>true</code> if a delegate is already registered for the model type
|
|
239
242
|
*/
|
|
240
|
-
DelegateMediator.isDelegateRegistered = function
|
|
243
|
+
DelegateMediator.isDelegateRegistered = function(sModelType) {
|
|
241
244
|
return !!DelegateMediator._mDefaultDelegateItems[sModelType];
|
|
242
245
|
};
|
|
243
246
|
|
|
@@ -250,7 +253,7 @@ sap.ui.define([
|
|
|
250
253
|
* @param {object} mPropertyBag.delegateType - Defines the type of the default delegate. Please look at <code>DelegageMediator.types</code> for possible entries
|
|
251
254
|
* @param {object} [mPropertyBag.requiredLibraries] - map of required libraries
|
|
252
255
|
*/
|
|
253
|
-
DelegateMediator.registerDefaultDelegate = function
|
|
256
|
+
DelegateMediator.registerDefaultDelegate = function(mPropertyBag) {
|
|
254
257
|
if (!(mPropertyBag.modelType && mPropertyBag.delegate)) {
|
|
255
258
|
throw new Error("'modelType' and 'delegate' properties are required for registration!");
|
|
256
259
|
}
|
|
@@ -282,23 +285,23 @@ sap.ui.define([
|
|
|
282
285
|
* @param {boolean} [bSupportsDefault] - Include default delegate if no instance specific delegate is available
|
|
283
286
|
* @returns {Promise.<sap.ui.core.util.reflection.FlexDelegateInfo>} Delegate information including the lazy loaded instance of the delegate
|
|
284
287
|
*/
|
|
285
|
-
DelegateMediator.getDelegateForControl = function
|
|
288
|
+
DelegateMediator.getDelegateForControl = function(oControl, oModifier, sModelType, bSupportsDefault) {
|
|
286
289
|
return validateInputParameters(oControl, oModifier)
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
290
|
+
.then(function() {
|
|
291
|
+
return oModifier.getFlexDelegate(oControl);
|
|
292
|
+
})
|
|
293
|
+
.then(function(mInstanceSpecificDelegate) {
|
|
294
|
+
var aDelegateInfo = (bSupportsDefault && getDefaultDelegateInfo(oControl, sModelType)) || [];
|
|
295
|
+
if (mInstanceSpecificDelegate) {
|
|
296
|
+
// instance specific delegate always takes over
|
|
297
|
+
aDelegateInfo.push(mInstanceSpecificDelegate);
|
|
298
|
+
}
|
|
299
|
+
return loadDelegates(oModifier, oControl, aDelegateInfo);
|
|
300
|
+
})
|
|
301
|
+
.then(mergeDelegates.bind(this));
|
|
299
302
|
};
|
|
300
303
|
|
|
301
|
-
DelegateMediator.clear = function
|
|
304
|
+
DelegateMediator.clear = function() {
|
|
302
305
|
DelegateMediator._mDefaultDelegateItems = {};
|
|
303
306
|
};
|
|
304
307
|
|
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
) {
|
|
24
24
|
"use strict";
|
|
25
25
|
|
|
26
|
-
var oLastPromise = new FlUtils.FakePromise();
|
|
26
|
+
var oLastPromise = (FlUtils.FakePromise ? new FlUtils.FakePromise() : Promise.resolve());
|
|
27
27
|
|
|
28
28
|
function checkControlAndDependentSelectorControls(oChange, mPropertyBag) {
|
|
29
29
|
var oSelector = oChange.getSelector && oChange.getSelector();
|
|
@@ -38,22 +38,26 @@ sap.ui.define([
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
return mPropertyBag.modifier.bySelectorTypeIndependent(oSelector, mPropertyBag.appComponent, mPropertyBag.view)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
.then(function(oControl) {
|
|
42
|
+
if (!oControl) {
|
|
43
|
+
throw Error("A flexibility change tries to change a nonexistent control.");
|
|
44
|
+
}
|
|
45
|
+
checkFailedSelectors(oSelector);
|
|
46
|
+
|
|
47
|
+
var aDependentControlSelectorList = oChange.getDependentControlSelectorList();
|
|
48
|
+
aDependentControlSelectorList.forEach(function(oDependentControlSelector) {
|
|
49
|
+
var oDependentControl = mPropertyBag.modifier.bySelector(
|
|
50
|
+
oDependentControlSelector,
|
|
51
|
+
mPropertyBag.appComponent,
|
|
52
|
+
mPropertyBag.view
|
|
53
|
+
);
|
|
54
|
+
if (!oDependentControl) {
|
|
55
|
+
throw new Error("A dependent selector control of the flexibility change is not available.");
|
|
44
56
|
}
|
|
45
|
-
checkFailedSelectors(
|
|
46
|
-
|
|
47
|
-
var aDependentControlSelectorList = oChange.getDependentControlSelectorList();
|
|
48
|
-
aDependentControlSelectorList.forEach(function(oDependentControlSelector) {
|
|
49
|
-
var oDependentControl = mPropertyBag.modifier.bySelector(oDependentControlSelector, mPropertyBag.appComponent, mPropertyBag.view);
|
|
50
|
-
if (!oDependentControl) {
|
|
51
|
-
throw new Error("A dependent selector control of the flexibility change is not available.");
|
|
52
|
-
}
|
|
53
|
-
checkFailedSelectors(oDependentControlSelector);
|
|
54
|
-
});
|
|
55
|
-
return oControl;
|
|
57
|
+
checkFailedSelectors(oDependentControlSelector);
|
|
56
58
|
});
|
|
59
|
+
return oControl;
|
|
60
|
+
});
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
function isXmlModifier(mPropertyBag) {
|
|
@@ -107,28 +111,28 @@ sap.ui.define([
|
|
|
107
111
|
|
|
108
112
|
function handleAfterApply(oChange, mControl, oInitializedControl, mPropertyBag) {
|
|
109
113
|
return Promise.resolve()
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
114
|
+
.then(function() {
|
|
115
|
+
// changeHandler can return a different control, e.g. case where a visible UI control replaces the stashed control placeholder
|
|
116
|
+
if (oInitializedControl instanceof Element) {
|
|
117
|
+
// the newly rendered control could have custom data set from the XML modifier
|
|
118
|
+
mControl.control = oInitializedControl;
|
|
119
|
+
}
|
|
120
|
+
if (mControl.control) {
|
|
121
|
+
return mPropertyBag.modifier.updateAggregation(mControl.originalControl, oChange.getContent().boundAggregation);
|
|
122
|
+
}
|
|
123
|
+
return undefined;
|
|
124
|
+
})
|
|
125
|
+
.then(function() {
|
|
126
|
+
// only save the revert data in the custom data when the change is being processed in XML,
|
|
127
|
+
// as it's only relevant for viewCache at the moment
|
|
128
|
+
return FlexCustomData.addAppliedCustomData(mControl.control, oChange, mPropertyBag, isXmlModifier(mPropertyBag));
|
|
129
|
+
})
|
|
130
|
+
.then(function() {
|
|
131
|
+
// if a change was reverted previously remove the flag as it is not reverted anymore
|
|
132
|
+
var oResult = {success: true};
|
|
133
|
+
oChange.markSuccessful(oResult);
|
|
134
|
+
return oResult;
|
|
135
|
+
});
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
function handleAfterApplyError(oError, oChange, mControl, mPropertyBag) {
|
|
@@ -141,27 +145,42 @@ sap.ui.define([
|
|
|
141
145
|
var sCustomDataIdentifier = FlexCustomData.getCustomDataIdentifier(false, bErrorOccurred, bXmlModifier);
|
|
142
146
|
switch (sCustomDataIdentifier) {
|
|
143
147
|
case FlexCustomData.notApplicableChangesCustomDataKey:
|
|
144
|
-
FlUtils.formatAndLogMessage(
|
|
148
|
+
FlUtils.formatAndLogMessage(
|
|
149
|
+
"info",
|
|
150
|
+
[sLogMessage, oError.message],
|
|
151
|
+
[sChangeId]
|
|
152
|
+
);
|
|
145
153
|
break;
|
|
146
154
|
case FlexCustomData.failedChangesCustomDataKeyXml:
|
|
147
|
-
FlUtils.formatAndLogMessage(
|
|
155
|
+
FlUtils.formatAndLogMessage(
|
|
156
|
+
"warning",
|
|
157
|
+
[sLogMessage, "Merge error detected while processing the XML tree."],
|
|
158
|
+
[sChangeId],
|
|
159
|
+
oError.stack
|
|
160
|
+
);
|
|
148
161
|
break;
|
|
149
162
|
case FlexCustomData.failedChangesCustomDataKeyJs:
|
|
150
|
-
FlUtils.formatAndLogMessage(
|
|
163
|
+
FlUtils.formatAndLogMessage(
|
|
164
|
+
"error",
|
|
165
|
+
[sLogMessage, "Merge error detected while processing the JS control tree."],
|
|
166
|
+
[sChangeId],
|
|
167
|
+
oError.stack
|
|
168
|
+
);
|
|
151
169
|
break;
|
|
152
|
-
|
|
170
|
+
default:
|
|
171
|
+
// no default
|
|
153
172
|
}
|
|
154
173
|
return FlexCustomData.addFailedCustomData(mControl.control, oChange, mPropertyBag, sCustomDataIdentifier)
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
174
|
+
.then(function() {
|
|
175
|
+
// if the change failed during XML processing, the status has to be reset
|
|
176
|
+
// the change will be applied again in JS
|
|
177
|
+
if (bXmlModifier) {
|
|
178
|
+
oChange.setInitialApplyState();
|
|
179
|
+
} else {
|
|
180
|
+
oChange.markFailed(oResult);
|
|
181
|
+
}
|
|
182
|
+
return oResult;
|
|
183
|
+
});
|
|
165
184
|
}
|
|
166
185
|
|
|
167
186
|
function logApplyChangeError(oError, oChange) {
|
|
@@ -210,7 +229,7 @@ sap.ui.define([
|
|
|
210
229
|
}
|
|
211
230
|
|
|
212
231
|
function registerOnAfterXMLChangeProcessingHandler(aOnAfterXMLChangeProcessingHandlers, oChangeHandler, oControl) {
|
|
213
|
-
var iChangeHandlerIndex = aOnAfterXMLChangeProcessingHandlers.findIndex(function
|
|
232
|
+
var iChangeHandlerIndex = aOnAfterXMLChangeProcessingHandlers.findIndex(function(mHandler) {
|
|
214
233
|
return mHandler.handler === oChangeHandler;
|
|
215
234
|
});
|
|
216
235
|
if (iChangeHandlerIndex < 0) {
|
|
@@ -232,7 +251,7 @@ sap.ui.define([
|
|
|
232
251
|
* @param {Promise} oPromise - Promise which is resolved when precondition fulfilled
|
|
233
252
|
*/
|
|
234
253
|
addPreConditionForInitialChangeApplying: function(oPromise) {
|
|
235
|
-
oLastPromise = oLastPromise.then(function
|
|
254
|
+
oLastPromise = oLastPromise.then(function() {
|
|
236
255
|
return oPromise;
|
|
237
256
|
});
|
|
238
257
|
},
|
|
@@ -268,7 +287,7 @@ sap.ui.define([
|
|
|
268
287
|
return oResult;
|
|
269
288
|
});
|
|
270
289
|
} else if (!oChange.isApplyProcessFinished()) {
|
|
271
|
-
return new FlUtils.FakePromise().then(function() {
|
|
290
|
+
return (FlUtils.FakePromise ? new FlUtils.FakePromise() : Promise.resolve()).then(function() {
|
|
272
291
|
oChange.startApplying();
|
|
273
292
|
return oChangeHandler.applyChange(oChange, mControl.control, mPropertyBag);
|
|
274
293
|
})
|
|
@@ -315,7 +334,7 @@ sap.ui.define([
|
|
|
315
334
|
view: FlUtils.getViewForControl(oControl)
|
|
316
335
|
};
|
|
317
336
|
|
|
318
|
-
aChangesForControl.forEach(function
|
|
337
|
+
aChangesForControl.forEach(function(oChange) {
|
|
319
338
|
checkAndAdjustChangeStatus(oControl, oChange, mChangesMap, oFlexController, mPropertyBag);
|
|
320
339
|
if (!oChange.isApplyProcessFinished() && !oChange._ignoreOnce) {
|
|
321
340
|
oChange.setQueuedForApply();
|
|
@@ -334,8 +353,9 @@ sap.ui.define([
|
|
|
334
353
|
bControlWithDependencies = true;
|
|
335
354
|
}
|
|
336
355
|
|
|
337
|
-
aChangesForControl.forEach(function
|
|
338
|
-
// in the ExtensionPoint scenario changes can get cloned,
|
|
356
|
+
aChangesForControl.forEach(function(oChange) {
|
|
357
|
+
// in the ExtensionPoint scenario changes can get cloned,
|
|
358
|
+
// in case of a template change the original selector has to be adjusted
|
|
339
359
|
if (oChange.originalSelectorToBeAdjusted) {
|
|
340
360
|
adjustOriginalSelector(oChange, oControl, oAppComponent);
|
|
341
361
|
delete oChange.originalSelectorToBeAdjusted;
|
|
@@ -357,7 +377,7 @@ sap.ui.define([
|
|
|
357
377
|
});
|
|
358
378
|
|
|
359
379
|
if (aChangesForControl.length || bControlWithDependencies) {
|
|
360
|
-
return FlUtils.execPromiseQueueSequentially(aPromiseStack).then(function
|
|
380
|
+
return FlUtils.execPromiseQueueSequentially(aPromiseStack).then(function() {
|
|
361
381
|
return DependencyHandler.processDependentQueue(mChangesMap, oAppComponent, sControlId);
|
|
362
382
|
});
|
|
363
383
|
}
|
|
@@ -391,50 +411,50 @@ sap.ui.define([
|
|
|
391
411
|
return aChanges.reduce(function(oPreviousPromise, oChange) {
|
|
392
412
|
var oControl;
|
|
393
413
|
return oPreviousPromise
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
413
|
-
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag);
|
|
414
|
+
.then(checkControlAndDependentSelectorControls.bind(null, oChange, mPropertyBag))
|
|
415
|
+
.then(function(oReturnedControl) {
|
|
416
|
+
oControl = oReturnedControl;
|
|
417
|
+
var mControl = Utils.getControlIfTemplateAffected(oChange, oControl, mPropertyBag);
|
|
418
|
+
return Utils.getChangeHandler(oChange, mControl, mPropertyBag);
|
|
419
|
+
})
|
|
420
|
+
.then(function(oChangeHandler) {
|
|
421
|
+
mPropertyBag.changeHandler = oChangeHandler;
|
|
422
|
+
oChange.setQueuedForApply();
|
|
423
|
+
checkAndAdjustChangeStatus(oControl, oChange, undefined, undefined, mPropertyBag);
|
|
424
|
+
|
|
425
|
+
if (!oChange.isApplyProcessFinished()) {
|
|
426
|
+
if (typeof mPropertyBag.changeHandler.onAfterXMLChangeProcessing === "function") {
|
|
427
|
+
registerOnAfterXMLChangeProcessingHandler(
|
|
428
|
+
aOnAfterXMLChangeProcessingHandlers,
|
|
429
|
+
mPropertyBag.changeHandler,
|
|
430
|
+
oControl
|
|
431
|
+
);
|
|
414
432
|
}
|
|
415
|
-
return
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
433
|
+
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag);
|
|
434
|
+
}
|
|
435
|
+
return {success: true};
|
|
436
|
+
})
|
|
437
|
+
.then(function(oReturn) {
|
|
438
|
+
if (!oReturn.success) {
|
|
439
|
+
throw Error(oReturn.error);
|
|
440
|
+
}
|
|
441
|
+
})
|
|
442
|
+
.catch(function(oError) {
|
|
443
|
+
oChange.getDependentSelectorList().forEach(function(oDependentControlSelector) {
|
|
444
|
+
if (FlUtils.indexOfObject(mPropertyBag.failedSelectors, oDependentControlSelector) === -1) {
|
|
445
|
+
mPropertyBag.failedSelectors.push(oDependentControlSelector);
|
|
420
446
|
}
|
|
421
|
-
})
|
|
422
|
-
.catch(function(oError) {
|
|
423
|
-
oChange.getDependentSelectorList().forEach(function(oDependentControlSelector) {
|
|
424
|
-
if (FlUtils.indexOfObject(mPropertyBag.failedSelectors, oDependentControlSelector) === -1) {
|
|
425
|
-
mPropertyBag.failedSelectors.push(oDependentControlSelector);
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
logApplyChangeError(oError, oChange);
|
|
429
447
|
});
|
|
430
|
-
|
|
448
|
+
logApplyChangeError(oError, oChange);
|
|
449
|
+
});
|
|
450
|
+
}, (FlUtils.FakePromise ? new FlUtils.FakePromise() : Promise.resolve()))
|
|
431
451
|
.then(function() {
|
|
432
452
|
delete mPropertyBag.failedSelectors;
|
|
433
453
|
|
|
434
454
|
// Once all changes for a control are processed, call the
|
|
435
455
|
// onAfterXMLChangeProcessing hooks of all involved change handlers
|
|
436
|
-
aOnAfterXMLChangeProcessingHandlers.forEach(function
|
|
437
|
-
mHandler.controls.forEach(function
|
|
456
|
+
aOnAfterXMLChangeProcessingHandlers.forEach(function(mHandler) {
|
|
457
|
+
mHandler.controls.forEach(function(oControl) {
|
|
438
458
|
try {
|
|
439
459
|
mHandler.handler.onAfterXMLChangeProcessing(oControl, mPropertyBag);
|
|
440
460
|
} catch (oError) {
|
|
@@ -77,7 +77,7 @@ sap.ui.define([
|
|
|
77
77
|
}
|
|
78
78
|
return undefined;
|
|
79
79
|
})
|
|
80
|
-
.then(function
|
|
80
|
+
.then(function() {
|
|
81
81
|
oChange.markRevertFinished();
|
|
82
82
|
return mControl.control;
|
|
83
83
|
})
|
|
@@ -109,7 +109,7 @@ sap.ui.define([
|
|
|
109
109
|
var oControl = mPropertyBag.modifier.bySelector(oSelector, mPropertyBag.appComponent);
|
|
110
110
|
if (!oControl) {
|
|
111
111
|
Log.warning("A flexibility change tries to revert changes on a nonexistent control with id " + oSelector.id);
|
|
112
|
-
return new FlUtils.FakePromise();
|
|
112
|
+
return (FlUtils.FakePromise ? new FlUtils.FakePromise() : Promise.resolve());
|
|
113
113
|
}
|
|
114
114
|
var mRevertProperties = {
|
|
115
115
|
modifier: mPropertyBag.modifier,
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @namespace sap.ui.fl.apply._internal.changes.Utils
|
|
24
24
|
* @since 1.70
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.116.0
|
|
26
26
|
* @private
|
|
27
27
|
* @ui5-restricted sap.ui.fl.apply._internal, sap.ui.fl.write._internal
|
|
28
28
|
*/
|
|
@@ -49,7 +49,7 @@ sap.ui.define([
|
|
|
49
49
|
* @returns {object} Contains the information about the control
|
|
50
50
|
* @private
|
|
51
51
|
*/
|
|
52
|
-
getControlIfTemplateAffected: function
|
|
52
|
+
getControlIfTemplateAffected: function(oChange, oControl, mPropertyBag) {
|
|
53
53
|
var oModifier = mPropertyBag.modifier;
|
|
54
54
|
var mControl = {
|
|
55
55
|
originalControl: oControl
|
|
@@ -40,28 +40,28 @@ sap.ui.define([
|
|
|
40
40
|
* @param {function} mStrategy.processTexts - Text postprocessing strategy
|
|
41
41
|
* @returns {Promise<object>} - Processed manifest with descriptor changes
|
|
42
42
|
*/
|
|
43
|
-
applyChanges: function
|
|
43
|
+
applyChanges: function(oUpdatedManifest, aAppDescriptorChanges, mStrategy) {
|
|
44
44
|
return mStrategy.registry()
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
} catch (oError) {
|
|
60
|
-
mStrategy.handleError(oError);
|
|
45
|
+
.then(function(Registry) {
|
|
46
|
+
var aChangeHandlerPromises = aAppDescriptorChanges.map(function(oChange) {
|
|
47
|
+
return Registry[oChange.getChangeType()] && Registry[oChange.getChangeType()]();
|
|
48
|
+
});
|
|
49
|
+
return Promise.all(aChangeHandlerPromises);
|
|
50
|
+
})
|
|
51
|
+
.then(function(aChangeHandlers) {
|
|
52
|
+
aChangeHandlers.forEach(function(oChangeHandler, iIndex) {
|
|
53
|
+
try {
|
|
54
|
+
var oChange = aAppDescriptorChanges[iIndex];
|
|
55
|
+
oUpdatedManifest = oChangeHandler.applyChange(oUpdatedManifest, oChange);
|
|
56
|
+
if (!oChangeHandler.skipPostprocessing && !isEmptyObject(oChange.getTexts())) {
|
|
57
|
+
oUpdatedManifest = mStrategy.processTexts(oUpdatedManifest, oChange.getTexts());
|
|
61
58
|
}
|
|
62
|
-
})
|
|
63
|
-
|
|
59
|
+
} catch (oError) {
|
|
60
|
+
mStrategy.handleError(oError);
|
|
61
|
+
}
|
|
64
62
|
});
|
|
63
|
+
return oUpdatedManifest;
|
|
64
|
+
});
|
|
65
65
|
},
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/ui/fl/requireAsync",
|
|
10
10
|
"sap/base/Log"
|
|
11
|
-
], function
|
|
11
|
+
], function(
|
|
12
12
|
requireAsync,
|
|
13
13
|
Log
|
|
14
14
|
) {
|
|
@@ -18,11 +18,11 @@ sap.ui.define([
|
|
|
18
18
|
registry: function() {
|
|
19
19
|
return requireAsync("sap/ui/fl/apply/_internal/changes/descriptor/Registration");
|
|
20
20
|
},
|
|
21
|
-
handleError: function
|
|
21
|
+
handleError: function(oError) {
|
|
22
22
|
Log.error(oError);
|
|
23
23
|
},
|
|
24
|
-
processTexts: function
|
|
25
|
-
//TODO: optimize performance by creating map not using JSON.stringify/parse
|
|
24
|
+
processTexts: function(oManifest, oChangeTexts) {
|
|
25
|
+
// TODO: optimize performance by creating map not using JSON.stringify/parse
|
|
26
26
|
var sManifest = JSON.stringify(oManifest);
|
|
27
27
|
Object.keys(oChangeTexts).forEach(function(sTextKey) {
|
|
28
28
|
if (oChangeTexts[sTextKey].value[""]) {
|
|
@@ -35,7 +35,6 @@ sap.ui.define([
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
|
|
39
38
|
var ApplyStrategyFactory = {
|
|
40
39
|
/**
|
|
41
40
|
* Strategy to apply descriptor changes during runtime.
|
|
@@ -12,7 +12,6 @@ sap.ui.define([
|
|
|
12
12
|
) {
|
|
13
13
|
"use strict";
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
var ApplyUtil = {
|
|
17
16
|
|
|
18
17
|
/**
|
|
@@ -24,7 +23,7 @@ sap.ui.define([
|
|
|
24
23
|
* @private
|
|
25
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
26
25
|
*/
|
|
27
|
-
formatBundleName: function
|
|
26
|
+
formatBundleName: function(sId, sBundleUrl) {
|
|
28
27
|
if (sBundleUrl.startsWith("/")) {
|
|
29
28
|
throw Error("Absolute paths are not supported");
|
|
30
29
|
}
|