@openui5/sap.ui.fl 1.115.1 → 1.117.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 +30 -33
- package/src/sap/ui/fl/ChangePersistence.js +139 -84
- 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 +82 -210
- package/src/sap/ui/fl/FlexControllerFactory.js +12 -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 +45 -88
- 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 +130 -94
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +10 -4
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +7 -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 +18 -16
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +11 -9
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +9 -7
- 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 +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +4 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +4 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +2 -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 +7 -7
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +13 -11
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +4 -4
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +4 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +5 -5
- 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 +16 -8
- 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 +206 -64
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +27 -17
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +16 -10
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +23 -7
- 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 +20 -23
- 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 +6 -6
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +15 -5
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +10 -4
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +6 -8
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +6 -6
- package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +3 -5
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +22 -22
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +43 -36
- 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 +20 -21
- 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 +3 -3
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +22 -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 +9 -9
- 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 -47
- package/src/sap/ui/fl/variants/VariantModel.js +236 -146
- 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 +163 -161
- package/src/sap/ui/fl/write/_internal/Storage.js +51 -53
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -4
- package/src/sap/ui/fl/write/_internal/Versions.js +105 -97
- 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 +40 -10
- 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 +33 -35
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +81 -59
- 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 +12 -15
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +222 -185
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +546 -110
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +122 -68
- package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +19 -4
- 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 +32 -33
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +119 -73
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +8 -8
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +18 -21
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +14 -13
- package/src/sap/ui/fl/write/api/TranslationAPI.js +13 -17
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +5 -7
- 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
- package/ui5.yaml +1 -2
- package/src/sap/ui/fl/apply/_internal/ChangesController.js +0 -49
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/base/strings/formatMessage",
|
|
9
8
|
"sap/base/util/ObjectPath",
|
|
10
9
|
"sap/base/util/isPlainObject",
|
|
11
10
|
"sap/base/util/uid",
|
|
@@ -20,7 +19,6 @@ sap.ui.define([
|
|
|
20
19
|
"sap/ui/core/mvc/View",
|
|
21
20
|
"sap/ui/core/Configuration"
|
|
22
21
|
], function(
|
|
23
|
-
formatMessage,
|
|
24
22
|
ObjectPath,
|
|
25
23
|
isPlainObject,
|
|
26
24
|
uid,
|
|
@@ -37,7 +35,6 @@ sap.ui.define([
|
|
|
37
35
|
) {
|
|
38
36
|
"use strict";
|
|
39
37
|
|
|
40
|
-
|
|
41
38
|
/**
|
|
42
39
|
* Returns the type of "sap.app" from the manifest object passed.
|
|
43
40
|
* @param {sap.ui.core.Manifest} oManifest - Manifest object
|
|
@@ -67,26 +64,12 @@ sap.ui.define([
|
|
|
67
64
|
* @namespace
|
|
68
65
|
* @alias sap.ui.fl.Utils
|
|
69
66
|
* @author SAP SE
|
|
70
|
-
* @version 1.
|
|
67
|
+
* @version 1.117.0
|
|
71
68
|
*
|
|
72
69
|
* @private
|
|
73
70
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
74
71
|
*/
|
|
75
72
|
var Utils = {
|
|
76
|
-
/**
|
|
77
|
-
* Formats the log message by replacing placeholders with values and logging the message.
|
|
78
|
-
*
|
|
79
|
-
* @param {string} sLogType - Logging type to be used. Possible values: info | warning | debug | error
|
|
80
|
-
* @param {array.<string>} aMessageComponents - Individual parts of the message text
|
|
81
|
-
* @param {array.<any>} aValuesToInsert - The values to be used instead of the placeholders in the message
|
|
82
|
-
* @param {string} [sCallStack] - Passes the callstack to the logging function
|
|
83
|
-
*/
|
|
84
|
-
formatAndLogMessage: function(sLogType, aMessageComponents, aValuesToInsert, sCallStack) {
|
|
85
|
-
var sLogMessage = aMessageComponents.join(' ');
|
|
86
|
-
sLogMessage = formatMessage(sLogMessage, aValuesToInsert);
|
|
87
|
-
Log[sLogType](sLogMessage, sCallStack || "");
|
|
88
|
-
},
|
|
89
|
-
|
|
90
73
|
isVariantByStartupParameter: function(oControl) {
|
|
91
74
|
// determine UI5 component out of given control
|
|
92
75
|
if (oControl) {
|
|
@@ -125,21 +108,6 @@ sap.ui.define([
|
|
|
125
108
|
}
|
|
126
109
|
},
|
|
127
110
|
|
|
128
|
-
/**
|
|
129
|
-
* Returns the siteId of a component when you already have the component data.
|
|
130
|
-
*
|
|
131
|
-
* @param {object} oComponentData - Component data
|
|
132
|
-
* @returns {string} siteId - that represent the found siteId
|
|
133
|
-
* @function
|
|
134
|
-
* @name sap.ui.fl.Utils.getSiteIdByComponentData
|
|
135
|
-
*
|
|
136
|
-
* @private
|
|
137
|
-
* @ui5-restricted sap.ui.fl.apply._internal.flexState.Loader
|
|
138
|
-
*/
|
|
139
|
-
getSiteIdByComponentData: function(oComponentData) {
|
|
140
|
-
return getStartUpParameter(oComponentData, "hcpApplicationId");
|
|
141
|
-
},
|
|
142
|
-
|
|
143
111
|
/**
|
|
144
112
|
* Indicates if the property value represents a binding
|
|
145
113
|
*
|
|
@@ -170,23 +138,6 @@ sap.ui.define([
|
|
|
170
138
|
);
|
|
171
139
|
},
|
|
172
140
|
|
|
173
|
-
/**
|
|
174
|
-
* Determines if the passed change is related to control variants.
|
|
175
|
-
* @see sap.ui.fl.variants.VariantManagement
|
|
176
|
-
* @param {sap.ui.fl.apply._internal.flexObjects.FlexObject} oChange Change object
|
|
177
|
-
* @returns {boolean} If the passed change is a variant management change
|
|
178
|
-
* @name sap.ui.fl.Utils.isChangeRelatedToVariants
|
|
179
|
-
*
|
|
180
|
-
* @private
|
|
181
|
-
* @ui5-restricted sap.ui.fl.ChangePersistence
|
|
182
|
-
*/
|
|
183
|
-
isChangeRelatedToVariants: function(oChange) {
|
|
184
|
-
return oChange.getFileType() === "ctrl_variant_change"
|
|
185
|
-
|| oChange.getFileType() === "ctrl_variant_management_change"
|
|
186
|
-
|| oChange.getFileType() === "ctrl_variant"
|
|
187
|
-
|| oChange.getVariantReference();
|
|
188
|
-
},
|
|
189
|
-
|
|
190
141
|
/**
|
|
191
142
|
* Returns the Component that belongs to given control. If the control has no component, it walks up the control tree in order to find a
|
|
192
143
|
* control having one.
|
|
@@ -197,7 +148,7 @@ sap.ui.define([
|
|
|
197
148
|
* @ui5-restricted sap.ui.fl
|
|
198
149
|
*/
|
|
199
150
|
getComponentForControl: function(oControl) {
|
|
200
|
-
function getComponentIdForControl
|
|
151
|
+
function getComponentIdForControl(oControl) {
|
|
201
152
|
var sComponentId = Component.getOwnerIdFor(oControl);
|
|
202
153
|
if (!sComponentId) {
|
|
203
154
|
if (oControl && typeof oControl.getParent === "function") {
|
|
@@ -224,7 +175,7 @@ sap.ui.define([
|
|
|
224
175
|
* If the control has no component, it walks up the control tree in order to find a control having one.
|
|
225
176
|
*
|
|
226
177
|
* @param {sap.ui.base.ManagedObject} oControl - Managed object instance
|
|
227
|
-
* @returns {sap.ui.core.Component}
|
|
178
|
+
* @returns {sap.ui.core.Component} Component instance if found or undefined
|
|
228
179
|
* @private
|
|
229
180
|
* @ui5-restricted sap.ui.fl
|
|
230
181
|
*/
|
|
@@ -257,6 +208,20 @@ sap.ui.define([
|
|
|
257
208
|
return oComponent;
|
|
258
209
|
},
|
|
259
210
|
|
|
211
|
+
/**
|
|
212
|
+
* Returns the component that belongs to the passed selector whose type is "application".
|
|
213
|
+
* If the control has no component, it walks up the control tree in order to find a control having one.
|
|
214
|
+
* This does not work if called with a {@link sap.ui.fl.ComponentSelector}
|
|
215
|
+
*
|
|
216
|
+
* @param {sap.ui.fl.Selector} oSelector - Selector object
|
|
217
|
+
* @returns {sap.ui.core.Component} Component instance if found or undefined
|
|
218
|
+
* @private
|
|
219
|
+
* @ui5-restricted sap.ui.fl
|
|
220
|
+
*/
|
|
221
|
+
getAppComponentForSelector: function(oSelector) {
|
|
222
|
+
return oSelector.appComponent || Utils.getAppComponentForControl(oSelector);
|
|
223
|
+
},
|
|
224
|
+
|
|
260
225
|
/**
|
|
261
226
|
* Returns the parent view of the control. If there are nested views, only the one closest to the control will be returned. If no view can be
|
|
262
227
|
* found, undefiend will be returned.
|
|
@@ -316,33 +281,16 @@ sap.ui.define([
|
|
|
316
281
|
*/
|
|
317
282
|
getCurrentLanguage: function() {
|
|
318
283
|
var sLanguage = Configuration.getLanguage();
|
|
319
|
-
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Converts the browser language into a 2-character ISO 639-1 language. If the browser language is in format RFC4646, the first part will be
|
|
325
|
-
* used: For example en-us will be converted to EN. If the browser language already is in ISO 639-1, it will be returned after an upper case
|
|
326
|
-
* conversion: For example de will be converted to DE.
|
|
327
|
-
*
|
|
328
|
-
* @function
|
|
329
|
-
* @name sap.ui.fl.Utils.convertBrowserLanguageToISO639_1
|
|
330
|
-
* @param {string} sBrowserLanguage - Language in RFC4646
|
|
331
|
-
* @returns {string} Language in ISO 639-1. Empty string if conversion was not successful
|
|
332
|
-
*
|
|
333
|
-
* @private
|
|
334
|
-
*/
|
|
335
|
-
convertBrowserLanguageToISO639_1: function(sBrowserLanguage) {
|
|
336
|
-
if (!sBrowserLanguage || typeof sBrowserLanguage !== "string") {
|
|
284
|
+
if (!sLanguage || typeof sLanguage !== "string") {
|
|
337
285
|
return "";
|
|
338
286
|
}
|
|
339
287
|
|
|
340
|
-
var nIndex =
|
|
341
|
-
if ((nIndex < 0) && (
|
|
342
|
-
return
|
|
288
|
+
var nIndex = sLanguage.indexOf("-");
|
|
289
|
+
if ((nIndex < 0) && (sLanguage.length <= 2)) {
|
|
290
|
+
return sLanguage.toUpperCase();
|
|
343
291
|
}
|
|
344
292
|
if (nIndex > 0 && nIndex <= 2) {
|
|
345
|
-
return
|
|
293
|
+
return sLanguage.substring(0, nIndex).toUpperCase();
|
|
346
294
|
}
|
|
347
295
|
|
|
348
296
|
return "";
|
|
@@ -418,7 +366,7 @@ sap.ui.define([
|
|
|
418
366
|
createDefaultFileName: function(sNameAddition) {
|
|
419
367
|
var sFileName = uid().replace(/-/g, "_");
|
|
420
368
|
if (sNameAddition) {
|
|
421
|
-
sFileName +=
|
|
369
|
+
sFileName += "_" + sNameAddition;
|
|
422
370
|
}
|
|
423
371
|
return sFileName;
|
|
424
372
|
},
|
|
@@ -428,8 +376,8 @@ sap.ui.define([
|
|
|
428
376
|
if (sFileType === "ctrl_variant") {
|
|
429
377
|
sSubfolder = "variants";
|
|
430
378
|
}
|
|
431
|
-
var sReferenceName = oPropertyBag.reference.replace(
|
|
432
|
-
var sNamespace =
|
|
379
|
+
var sReferenceName = oPropertyBag.reference.replace(".Component", "");
|
|
380
|
+
var sNamespace = "apps/" + sReferenceName + "/" + sSubfolder + "/";
|
|
433
381
|
return sNamespace;
|
|
434
382
|
},
|
|
435
383
|
|
|
@@ -506,13 +454,21 @@ sap.ui.define([
|
|
|
506
454
|
|
|
507
455
|
/** Returns <code>true</code> if the passed component is an embedded component.
|
|
508
456
|
* @param {sap.ui.core.Component} oComponent - Component instance
|
|
509
|
-
* @returns {boolean} <code>true</code> if the passed component is of type "component"
|
|
457
|
+
* @returns {boolean} <code>true</code> if the passed component is of type "component" and has a parent app component
|
|
510
458
|
*
|
|
511
459
|
* @private
|
|
512
460
|
* @ui5-restricted sap.ui.fl
|
|
513
461
|
*/
|
|
514
462
|
isEmbeddedComponent: function(oComponent) {
|
|
515
|
-
|
|
463
|
+
var oAppComponent = Utils.getAppComponentForControl(oComponent);
|
|
464
|
+
return !!(
|
|
465
|
+
oComponent instanceof Component
|
|
466
|
+
&& getComponentType(oComponent.getManifestObject()) === "component"
|
|
467
|
+
// Some embedded components might not have an app component
|
|
468
|
+
// e.g. sap.ushell.plugins.rta, sap.ushell.plugins.rta-personalize
|
|
469
|
+
&& oAppComponent
|
|
470
|
+
&& Utils.isApplicationComponent(oAppComponent)
|
|
471
|
+
);
|
|
516
472
|
},
|
|
517
473
|
|
|
518
474
|
/**
|
|
@@ -570,7 +526,7 @@ sap.ui.define([
|
|
|
570
526
|
if (bAsync) {
|
|
571
527
|
return Promise.resolve();
|
|
572
528
|
}
|
|
573
|
-
return new Utils.FakePromise();
|
|
529
|
+
return (Utils.FakePromise ? new Utils.FakePromise() : Promise.resolve());
|
|
574
530
|
}
|
|
575
531
|
var fnPromise = aPromiseQueue.shift();
|
|
576
532
|
if (typeof fnPromise === "function") {
|
|
@@ -614,6 +570,7 @@ sap.ui.define([
|
|
|
614
570
|
* @param {any} vError - value on reject FakePromise
|
|
615
571
|
* @param {string} sInitialPromiseIdentifier - value identifies previous promise in chain. If the identifier is passed to the function and don't match with the FakePromiseIdentifier then native Promise execution is used for further processing
|
|
616
572
|
* @returns {sap.ui.fl.Utils.FakePromise|Promise} Returns instantiated FakePromise only if no Promise is passed by value parameter
|
|
573
|
+
* @deprecated As of Version 1.114
|
|
617
574
|
* @private
|
|
618
575
|
* @ui5-restricted
|
|
619
576
|
*/
|
|
@@ -724,7 +681,7 @@ sap.ui.define([
|
|
|
724
681
|
sParameters = "?" + aFilterUrl.join("&");
|
|
725
682
|
}
|
|
726
683
|
} else {
|
|
727
|
-
sParameters += (sParameters.length > 0 ?
|
|
684
|
+
sParameters += (sParameters.length > 0 ? "&" : "?") + sParameterName + "=" + sParameterValue;
|
|
728
685
|
}
|
|
729
686
|
return sParameters;
|
|
730
687
|
},
|
|
@@ -748,7 +705,7 @@ sap.ui.define([
|
|
|
748
705
|
* @param {sap.ushell.services.URLParsing} oURLParsingService - The Unified Shell's internal URL parsing service
|
|
749
706
|
* @returns {string} The value of the given parameter or undefined
|
|
750
707
|
*/
|
|
751
|
-
getParameter: function
|
|
708
|
+
getParameter: function(sParameterName, oURLParsingService) {
|
|
752
709
|
if (oURLParsingService) {
|
|
753
710
|
var mParsedHash = Utils.getParsedURLHash(oURLParsingService);
|
|
754
711
|
return mParsedHash.params &&
|
|
@@ -783,7 +740,7 @@ sap.ui.define([
|
|
|
783
740
|
* @param {string} sAggregationName - Aggregation name
|
|
784
741
|
* @returns {sap.ui.base.ManagedObject[]|Element[]} Aggregation content
|
|
785
742
|
*/
|
|
786
|
-
getAggregation: function
|
|
743
|
+
getAggregation: function(oParent, sAggregationName) {
|
|
787
744
|
var oAggregation = Utils.findAggregation(oParent, sAggregationName);
|
|
788
745
|
if (oAggregation) {
|
|
789
746
|
return oParent[oAggregation._sGetter]();
|
|
@@ -797,7 +754,7 @@ sap.ui.define([
|
|
|
797
754
|
* @param {string} sPropertyName - Property name
|
|
798
755
|
* @returns {any} Value of the property
|
|
799
756
|
*/
|
|
800
|
-
getProperty: function
|
|
757
|
+
getProperty: function(oControl, sPropertyName) {
|
|
801
758
|
var oMetadata = oControl.getMetadata().getPropertyLikeSetting(sPropertyName);
|
|
802
759
|
if (oMetadata) {
|
|
803
760
|
var sPropertyGetter = oMetadata._sGetter;
|
|
@@ -827,12 +784,12 @@ sap.ui.define([
|
|
|
827
784
|
* @param {array} aServiceNames - List of service names
|
|
828
785
|
* @returns {Promise<object>} Resolves to an object with the requested ushell services
|
|
829
786
|
*/
|
|
830
|
-
getUShellServices: function
|
|
831
|
-
var aServicePromises = aServiceNames.map(function
|
|
787
|
+
getUShellServices: function(aServiceNames) {
|
|
788
|
+
var aServicePromises = aServiceNames.map(function(sServiceName) {
|
|
832
789
|
return this.getUShellService(sServiceName);
|
|
833
790
|
}.bind(this));
|
|
834
|
-
return Promise.all(aServicePromises).then(function
|
|
835
|
-
return aServiceNames.reduce(function
|
|
791
|
+
return Promise.all(aServicePromises).then(function(aServices) {
|
|
792
|
+
return aServiceNames.reduce(function(mServices, sService, iIndex) {
|
|
836
793
|
mServices[sService] = aServices && aServices[iIndex];
|
|
837
794
|
return mServices;
|
|
838
795
|
}, {});
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
*
|
|
26
26
|
* @private
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.117.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
|
|