@openui5/sap.ui.fl 1.103.0 → 1.105.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/.reuse/dep5 +18 -1
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +36 -3
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +3 -3
- package/src/sap/ui/fl/Change.js +29 -4
- package/src/sap/ui/fl/ChangePersistence.js +26 -14
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnector.js +6 -0
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +9 -3
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +9 -3
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +9 -3
- package/src/sap/ui/fl/FlexController.js +3 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/Layer.js +5 -2
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +77 -46
- package/src/sap/ui/fl/apply/_internal/ChangesController.js +2 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +3 -3
- 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 +3 -3
- 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/SetAbstract.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/ObjectStorageConnector.js +2 -2
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +3 -3
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +2 -2
- package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +8 -43
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +73 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +11 -20
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +81 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +111 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +51 -17
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +114 -34
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +4 -15
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +22 -6
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +27 -35
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/prepareVariantsMap.js +76 -111
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +4 -4
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.js +2 -2
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +7 -7
- package/src/sap/ui/fl/changeHandler/AddXML.js +14 -16
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +9 -6
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +30 -35
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +14 -15
- package/src/sap/ui/fl/changeHandler/BaseRename.js +9 -15
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +12 -8
- package/src/sap/ui/fl/changeHandler/MoveElements.js +3 -2
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +13 -12
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +18 -21
- package/src/sap/ui/fl/changeHandler/StashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +3 -5
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +3 -5
- package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +13 -22
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/designtime/variants/VariantManagement.designtime.js +5 -2
- package/src/sap/ui/fl/initial/_internal/Storage.js +18 -5
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +27 -3
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +4 -4
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +8 -0
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +9 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -2
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +3 -3
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +2 -3
- package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +2 -3
- package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +5 -5
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +3 -3
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +9 -6
- package/src/sap/ui/fl/interfaces/Delegate.js +34 -18
- package/src/sap/ui/fl/library.js +351 -27
- package/src/sap/ui/fl/messagebundle_ar.properties +2 -0
- package/src/sap/ui/fl/messagebundle_bg.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ca.properties +2 -0
- package/src/sap/ui/fl/messagebundle_cs.properties +2 -0
- package/src/sap/ui/fl/messagebundle_cy.properties +2 -0
- package/src/sap/ui/fl/messagebundle_da.properties +2 -0
- package/src/sap/ui/fl/messagebundle_de.properties +2 -0
- package/src/sap/ui/fl/messagebundle_el.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +37 -2
- package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +2 -0
- package/src/sap/ui/fl/messagebundle_es.properties +2 -0
- package/src/sap/ui/fl/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/fl/messagebundle_et.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_hu.properties +2 -0
- package/src/sap/ui/fl/messagebundle_id.properties +2 -0
- package/src/sap/ui/fl/messagebundle_it.properties +2 -0
- package/src/sap/ui/fl/messagebundle_iw.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ja.properties +2 -0
- package/src/sap/ui/fl/messagebundle_kk.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ko.properties +2 -0
- package/src/sap/ui/fl/messagebundle_lt.properties +2 -0
- package/src/sap/ui/fl/messagebundle_lv.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ms.properties +2 -0
- package/src/sap/ui/fl/messagebundle_nl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_no.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pt.properties +2 -0
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ro.properties +2 -0
- package/src/sap/ui/fl/messagebundle_ru.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sh.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sk.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sl.properties +2 -0
- package/src/sap/ui/fl/messagebundle_sv.properties +2 -0
- package/src/sap/ui/fl/messagebundle_th.properties +2 -0
- package/src/sap/ui/fl/messagebundle_tr.properties +2 -0
- package/src/sap/ui/fl/messagebundle_uk.properties +2 -0
- package/src/sap/ui/fl/messagebundle_vi.properties +2 -0
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +2 -0
- package/src/sap/ui/fl/requireAsync.js +2 -2
- package/src/sap/ui/fl/support/{apps/uiFlexibilityDiagnostics/helper/Extractor.js → _internal/extractChangeDependencies.js} +55 -57
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +6 -6
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +14 -4
- package/src/sap/ui/fl/support/api/SupportAPI.js +3 -3
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +16 -5
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +18 -8
- 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/i18n/i18n.properties +4 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +11 -3
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetails.view.xml +1 -0
- package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetailsEdit.view.xml +1 -0
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +27 -2
- 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 +601 -2095
- package/src/sap/ui/fl/variants/VariantModel.js +90 -98
- package/src/sap/ui/fl/write/_internal/FlexInfoSession.js +46 -0
- package/src/sap/ui/fl/write/_internal/SaveAs.js +8 -9
- package/src/sap/ui/fl/write/_internal/Storage.js +4 -4
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +3 -3
- package/src/sap/ui/fl/write/_internal/Versions.js +13 -7
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +3 -3
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +3 -3
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/JsObjectConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +27 -18
- package/src/sap/ui/fl/write/_internal/connectors/LocalStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +11 -4
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/ObjectStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/SessionStorageConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +3 -3
- package/src/sap/ui/fl/write/_internal/delegates/ODataV4ReadDelegate.js +2 -2
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +4 -4
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +3 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +3 -3
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +4 -4
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +68 -18
- 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 +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +47 -10
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +12 -12
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +10 -3
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +24 -18
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +2 -2
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/ExtensionPointRegistryAPI.js +2 -2
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +9 -7
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +3 -3
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +2 -2
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +5 -46
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +148 -110
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/TranslationAPI.js +2 -2
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/VersionsAPI.js +5 -3
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +4 -3
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +4 -3
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +4 -4
- package/src/sap/ui/fl/Variant.js +0 -511
- package/src/sap/ui/fl/support/Flexibility.js +0 -384
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/Component.js +0 -18
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/controller/Root.controller.js +0 -227
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/index.html +0 -21
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/manifest.json +0 -44
- package/src/sap/ui/fl/support/apps/uiFlexibilityDiagnostics/view/Root.view.xml +0 -95
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +0 -35
- package/src/sap/ui/fl/support/diagnostics/Flexibility.view.xml +0 -41
- package/src/sap/ui/fl/support/flexibility.css +0 -32
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/base/util/
|
|
9
|
-
"sap/base/Log",
|
|
10
|
-
"sap/ui/fl/Change",
|
|
8
|
+
"sap/base/util/each",
|
|
11
9
|
"sap/base/util/includes",
|
|
12
|
-
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
13
10
|
"sap/base/util/isEmptyObject",
|
|
14
|
-
"sap/base/util/each",
|
|
15
|
-
"sap/base/util/values",
|
|
16
11
|
"sap/base/util/merge",
|
|
12
|
+
"sap/base/util/ObjectPath",
|
|
13
|
+
"sap/base/util/values",
|
|
14
|
+
"sap/base/Log",
|
|
15
|
+
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
16
|
+
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
17
|
+
"sap/ui/fl/Change",
|
|
17
18
|
"sap/ui/fl/LayerUtils"
|
|
18
19
|
], function(
|
|
19
|
-
|
|
20
|
-
Log,
|
|
21
|
-
Change,
|
|
20
|
+
each,
|
|
22
21
|
includes,
|
|
23
|
-
VariantsApplyUtil,
|
|
24
22
|
isEmptyObject,
|
|
25
|
-
each,
|
|
26
|
-
values,
|
|
27
23
|
merge,
|
|
24
|
+
ObjectPath,
|
|
25
|
+
values,
|
|
26
|
+
Log,
|
|
27
|
+
VariantsApplyUtil,
|
|
28
|
+
FlexObjectFactory,
|
|
29
|
+
Change,
|
|
28
30
|
LayerUtils
|
|
29
31
|
) {
|
|
30
32
|
"use strict";
|
|
@@ -36,7 +38,7 @@ sap.ui.define([
|
|
|
36
38
|
var oVariantsMapClone = merge({}, oVariantsMap);
|
|
37
39
|
aVariants.forEach(function(oVariant) {
|
|
38
40
|
oVariantsMapClone[oVariant.fileName] = {
|
|
39
|
-
|
|
41
|
+
instance: FlexObjectFactory.createFromFileContent(oVariant),
|
|
40
42
|
controlChanges: [],
|
|
41
43
|
variantChanges: {}
|
|
42
44
|
};
|
|
@@ -45,25 +47,30 @@ sap.ui.define([
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
// change
|
|
48
|
-
function addVariantDependentControlChanges(oVariantsMap, aVariantDependentChanges) {
|
|
50
|
+
function addVariantDependentControlChanges(oVariantsMap, aVariantDependentChanges, sReference) {
|
|
49
51
|
var oVariantsMapClone = merge({}, oVariantsMap);
|
|
50
52
|
aVariantDependentChanges.forEach(function(oChange) {
|
|
51
53
|
var oChangeInstance = new Change(oChange);
|
|
52
54
|
oChangeInstance.setState(Change.states.PERSISTED);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
var oVariantEntry = oVariantsMapClone[oChange.variantReference];
|
|
56
|
+
oVariantEntry = oVariantEntry || createStandardVariant(oChange.variantReference, sReference);
|
|
57
|
+
oVariantEntry.controlChanges.push(oChangeInstance);
|
|
58
|
+
oVariantsMapClone[oChange.variantReference] = oVariantEntry;
|
|
55
59
|
});
|
|
56
60
|
return oVariantsMapClone;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
// ctrl_variant_change
|
|
60
|
-
function addVariantChanges(oVariantsMap, aVariantChanges) {
|
|
64
|
+
function addVariantChanges(oVariantsMap, aVariantChanges, sReference) {
|
|
61
65
|
var oVariantsMapClone = merge({}, oVariantsMap);
|
|
66
|
+
// TODO: create change instances
|
|
62
67
|
aVariantChanges.forEach(function(oChange) {
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
var oVariantEntry = oVariantsMapClone[oChange.selector.id];
|
|
69
|
+
oVariantEntry = oVariantEntry || createStandardVariant(oChange.selector.id, sReference);
|
|
70
|
+
var aVariantChangesOfTheChangeType = oVariantEntry.variantChanges[oChange.changeType] || [];
|
|
65
71
|
aVariantChangesOfTheChangeType.push(oChange);
|
|
66
|
-
|
|
72
|
+
oVariantEntry.variantChanges[oChange.changeType] = aVariantChangesOfTheChangeType;
|
|
73
|
+
oVariantsMapClone[oChange.selector.id] = oVariantEntry;
|
|
67
74
|
});
|
|
68
75
|
return oVariantsMapClone;
|
|
69
76
|
}
|
|
@@ -71,12 +78,12 @@ sap.ui.define([
|
|
|
71
78
|
// filter invisible variants
|
|
72
79
|
function filterInvisibleVariants(oVariantsMap) {
|
|
73
80
|
var oVariantsMapClone = merge({}, oVariantsMap);
|
|
74
|
-
values(oVariantsMap).forEach(function(
|
|
75
|
-
var aSetVisibleChanges = ObjectPath.get("variantChanges.setVisible",
|
|
81
|
+
values(oVariantsMap).forEach(function(oVariantEntry) {
|
|
82
|
+
var aSetVisibleChanges = ObjectPath.get("variantChanges.setVisible", oVariantEntry);
|
|
76
83
|
if (aSetVisibleChanges && aSetVisibleChanges.length > 0) {
|
|
77
84
|
var oSetVisibleActiveChange = getActiveChange(aSetVisibleChanges);
|
|
78
85
|
if (!oSetVisibleActiveChange.getContent().visible && oSetVisibleActiveChange.getContent().createdByReset) {
|
|
79
|
-
delete oVariantsMapClone[
|
|
86
|
+
delete oVariantsMapClone[oVariantEntry.instance.getId()];
|
|
80
87
|
}
|
|
81
88
|
}
|
|
82
89
|
});
|
|
@@ -84,20 +91,20 @@ sap.ui.define([
|
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
// resolve references
|
|
87
|
-
function resolveReferences(oVariantsMap) {
|
|
94
|
+
function resolveReferences(oVariantsMap, sReference) {
|
|
88
95
|
var oVariantsMapClone = merge({}, oVariantsMap);
|
|
89
|
-
values(oVariantsMapClone).forEach(function(
|
|
90
|
-
var sVariantReference =
|
|
96
|
+
values(oVariantsMapClone).forEach(function(oVariantEntry) {
|
|
97
|
+
var sVariantReference = oVariantEntry.instance.getVariantReference();
|
|
91
98
|
var oReferencedVariant;
|
|
92
99
|
if (sVariantReference) {
|
|
93
|
-
oReferencedVariant = findOrCreateAndAddVariantById(oVariantsMapClone, sVariantReference,
|
|
100
|
+
oReferencedVariant = findOrCreateAndAddVariantById(oVariantsMapClone, sVariantReference, oVariantEntry.instance.getVariantManagementReference(), sReference);
|
|
94
101
|
}
|
|
95
|
-
|
|
102
|
+
oVariantEntry.controlChanges = getReferencedControlChanges(oReferencedVariant, oVariantEntry.instance.getLayer()).concat(oVariantEntry.controlChanges);
|
|
96
103
|
});
|
|
97
104
|
return oVariantsMapClone;
|
|
98
105
|
}
|
|
99
106
|
|
|
100
|
-
function
|
|
107
|
+
function getReferencedControlChanges(oReferencedVariant, sVariantLayer) {
|
|
101
108
|
if (!oReferencedVariant) {
|
|
102
109
|
return [];
|
|
103
110
|
}
|
|
@@ -106,11 +113,11 @@ sap.ui.define([
|
|
|
106
113
|
});
|
|
107
114
|
}
|
|
108
115
|
|
|
109
|
-
function findOrCreateAndAddVariantById(oVariantsMap, sVariantId, sVMReference) {
|
|
116
|
+
function findOrCreateAndAddVariantById(oVariantsMap, sVariantId, sVMReference, sReference) {
|
|
110
117
|
var oReferencedVariant = oVariantsMap[sVariantId];
|
|
111
118
|
|
|
112
119
|
if (!oReferencedVariant && sVariantId === sVMReference) {
|
|
113
|
-
oReferencedVariant = createStandardVariant(sVariantId);
|
|
120
|
+
oReferencedVariant = createStandardVariant(sVariantId, sReference);
|
|
114
121
|
oVariantsMap[sVariantId] = oReferencedVariant;
|
|
115
122
|
}
|
|
116
123
|
|
|
@@ -118,14 +125,14 @@ sap.ui.define([
|
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
// prepares initial map for variants
|
|
121
|
-
function getVariantsMap(oStorageResponse) {
|
|
128
|
+
function getVariantsMap(oStorageResponse, sReference) {
|
|
122
129
|
var oVariantsMap = {};
|
|
123
130
|
|
|
124
131
|
oVariantsMap = addVariants(oVariantsMap, oStorageResponse.variants);
|
|
125
|
-
oVariantsMap = addVariantDependentControlChanges(oVariantsMap, oStorageResponse.variantDependentControlChanges);
|
|
126
|
-
oVariantsMap = addVariantChanges(oVariantsMap, oStorageResponse.variantChanges);
|
|
132
|
+
oVariantsMap = addVariantDependentControlChanges(oVariantsMap, oStorageResponse.variantDependentControlChanges, sReference);
|
|
133
|
+
oVariantsMap = addVariantChanges(oVariantsMap, oStorageResponse.variantChanges, sReference);
|
|
127
134
|
oVariantsMap = filterInvisibleVariants(oVariantsMap);
|
|
128
|
-
oVariantsMap = resolveReferences(oVariantsMap);
|
|
135
|
+
oVariantsMap = resolveReferences(oVariantsMap, sReference);
|
|
129
136
|
|
|
130
137
|
return oVariantsMap;
|
|
131
138
|
}
|
|
@@ -142,23 +149,22 @@ sap.ui.define([
|
|
|
142
149
|
// add prepared variants to resultant variant section
|
|
143
150
|
function addVariantsToResult(oResult, oVariantsMap, aTechnicalParameters) {
|
|
144
151
|
var oResultClone = merge({}, oResult);
|
|
145
|
-
values(oVariantsMap).forEach(function(
|
|
146
|
-
var sVariantManagementId =
|
|
152
|
+
values(oVariantsMap).forEach(function(oVariantEntry) {
|
|
153
|
+
var sVariantManagementId = oVariantEntry.instance.getVariantManagementReference();
|
|
147
154
|
if (!oResultClone[sVariantManagementId]) {
|
|
148
155
|
oResultClone[sVariantManagementId] = createVariantManagementSection();
|
|
149
156
|
}
|
|
150
|
-
|
|
151
|
-
oVariant = applyChangesOnVariant(oVariant);
|
|
157
|
+
oVariantEntry = applyChangesOnVariant(oVariantEntry);
|
|
152
158
|
|
|
153
159
|
// invisible variant cannot be set as current variant
|
|
154
|
-
if (!oResultClone[sVariantManagementId].currentVariant &&
|
|
155
|
-
oResultClone[sVariantManagementId].currentVariant =
|
|
160
|
+
if (!oResultClone[sVariantManagementId].currentVariant && oVariantEntry.instance.getVisible() && includes(aTechnicalParameters, oVariantEntry.instance.getId())) {
|
|
161
|
+
oResultClone[sVariantManagementId].currentVariant = oVariantEntry.instance.getId();
|
|
156
162
|
}
|
|
157
163
|
|
|
158
164
|
oResultClone[sVariantManagementId].defaultVariant = sVariantManagementId;
|
|
159
165
|
|
|
160
|
-
var iSortedIndex = VariantsApplyUtil.getIndexToSortVariant(oResultClone[sVariantManagementId].variants,
|
|
161
|
-
oResultClone[sVariantManagementId].variants.splice(iSortedIndex, 0,
|
|
166
|
+
var iSortedIndex = VariantsApplyUtil.getIndexToSortVariant(oResultClone[sVariantManagementId].variants, oVariantEntry);
|
|
167
|
+
oResultClone[sVariantManagementId].variants.splice(iSortedIndex, 0, oVariantEntry);
|
|
162
168
|
});
|
|
163
169
|
|
|
164
170
|
return oResultClone;
|
|
@@ -184,17 +190,17 @@ sap.ui.define([
|
|
|
184
190
|
}
|
|
185
191
|
|
|
186
192
|
// add missing standard variants to resultant variant section
|
|
187
|
-
function addStandardVariants(oResult) {
|
|
193
|
+
function addStandardVariants(oResult, sReference) {
|
|
188
194
|
var oResultClone = merge({}, oResult);
|
|
189
195
|
each(oResultClone, function(sVariantManagementId, oVariantManagement) {
|
|
190
|
-
var iStandardVariantIndex = oVariantManagement.variants.findIndex(function(
|
|
191
|
-
return
|
|
196
|
+
var iStandardVariantIndex = oVariantManagement.variants.findIndex(function(oVariantEntry) {
|
|
197
|
+
return oVariantEntry.instance.getId() === sVariantManagementId;
|
|
192
198
|
});
|
|
193
199
|
|
|
194
200
|
var oStandardVariant;
|
|
195
201
|
|
|
196
202
|
if (iStandardVariantIndex === -1) {
|
|
197
|
-
oStandardVariant = createStandardVariant(sVariantManagementId);
|
|
203
|
+
oStandardVariant = createStandardVariant(sVariantManagementId, sReference);
|
|
198
204
|
} else {
|
|
199
205
|
oStandardVariant = oVariantManagement.variants[iStandardVariantIndex];
|
|
200
206
|
oVariantManagement.variants.splice(iStandardVariantIndex, 1);
|
|
@@ -207,32 +213,26 @@ sap.ui.define([
|
|
|
207
213
|
}
|
|
208
214
|
|
|
209
215
|
// prepares resultant variant section
|
|
210
|
-
function assembleResult(oVariantsMap, aVariantManagementChanges, aTechnicalParameters) {
|
|
216
|
+
function assembleResult(oVariantsMap, aVariantManagementChanges, aTechnicalParameters, sReference) {
|
|
211
217
|
var oResult = {};
|
|
212
218
|
|
|
213
219
|
oResult = addVariantsToResult(oResult, oVariantsMap, aTechnicalParameters);
|
|
214
220
|
oResult = addVariantManagementChangesToResult(oResult, aVariantManagementChanges);
|
|
215
|
-
oResult = addStandardVariants(oResult);
|
|
221
|
+
oResult = addStandardVariants(oResult, sReference);
|
|
216
222
|
|
|
217
223
|
return oResult;
|
|
218
224
|
}
|
|
219
225
|
|
|
220
|
-
function createStandardVariant(sVariantId) {
|
|
226
|
+
function createStandardVariant(sVariantId, sReference) {
|
|
221
227
|
var oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.fl");
|
|
222
228
|
return {
|
|
223
|
-
|
|
224
|
-
|
|
229
|
+
instance: FlexObjectFactory.createFlVariant({
|
|
230
|
+
id: sVariantId,
|
|
225
231
|
variantManagementReference: sVariantId,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
visible: true
|
|
231
|
-
},
|
|
232
|
-
support: {
|
|
233
|
-
user: VariantsApplyUtil.DEFAULT_AUTHOR
|
|
234
|
-
}
|
|
235
|
-
},
|
|
232
|
+
variantName: oResourceBundle.getText("STANDARD_VARIANT_TITLE"),
|
|
233
|
+
user: VariantsApplyUtil.DEFAULT_AUTHOR,
|
|
234
|
+
reference: sReference
|
|
235
|
+
}),
|
|
236
236
|
variantChanges: {},
|
|
237
237
|
controlChanges: []
|
|
238
238
|
};
|
|
@@ -255,47 +255,47 @@ sap.ui.define([
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
// set ctrl_variant_change via map properties
|
|
258
|
-
function applyChangesOnVariant(
|
|
259
|
-
var
|
|
260
|
-
var mVariantChanges =
|
|
258
|
+
function applyChangesOnVariant(oVariantEntry) {
|
|
259
|
+
var oVariantEntryClone = merge({}, oVariantEntry);
|
|
260
|
+
var mVariantChanges = oVariantEntryClone.variantChanges;
|
|
261
261
|
var oActiveChange;
|
|
262
262
|
each(mVariantChanges, function(sChangeType, aChanges) {
|
|
263
263
|
switch (sChangeType) {
|
|
264
264
|
case "setTitle":
|
|
265
265
|
oActiveChange = getActiveChange(aChanges);
|
|
266
266
|
if (oActiveChange) {
|
|
267
|
-
|
|
267
|
+
oVariantEntryClone.instance.setName(oActiveChange.getText("title"), true);
|
|
268
268
|
}
|
|
269
269
|
break;
|
|
270
270
|
case "setFavorite":
|
|
271
271
|
oActiveChange = getActiveChange(aChanges);
|
|
272
272
|
if (oActiveChange) {
|
|
273
|
-
|
|
273
|
+
oVariantEntryClone.instance.setFavorite(oActiveChange.getContent().favorite);
|
|
274
274
|
}
|
|
275
275
|
break;
|
|
276
276
|
case "setExecuteOnSelect":
|
|
277
277
|
oActiveChange = getActiveChange(aChanges);
|
|
278
278
|
if (oActiveChange) {
|
|
279
|
-
|
|
279
|
+
oVariantEntryClone.instance.setExecuteOnSelection(oActiveChange.getContent().executeOnSelect);
|
|
280
280
|
}
|
|
281
281
|
break;
|
|
282
282
|
case "setVisible":
|
|
283
283
|
oActiveChange = getActiveChange(aChanges);
|
|
284
284
|
if (oActiveChange) {
|
|
285
|
-
|
|
285
|
+
oVariantEntryClone.instance.setVisible(oActiveChange.getContent().visible);
|
|
286
286
|
}
|
|
287
287
|
break;
|
|
288
288
|
case "setContexts":
|
|
289
289
|
oActiveChange = getActiveChange(aChanges);
|
|
290
290
|
if (oActiveChange) {
|
|
291
|
-
|
|
291
|
+
oVariantEntryClone.instance.setContexts(oActiveChange.getContent().contexts);
|
|
292
292
|
}
|
|
293
293
|
break;
|
|
294
294
|
default:
|
|
295
|
-
Log.error("No valid changes on variant " +
|
|
295
|
+
Log.error("No valid changes on variant " + oVariantEntryClone.content.content.title + " available");
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
|
-
return
|
|
298
|
+
return oVariantEntryClone;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
function getActiveChange(aChanges) {
|
|
@@ -305,41 +305,6 @@ sap.ui.define([
|
|
|
305
305
|
return false;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
function getText(sTextKey) {
|
|
309
|
-
return sap.ui.getCore().getLibraryResourceBundle("sap.ui.fl").getText(sTextKey);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// set default map properties
|
|
313
|
-
function setDefaultProperties(oVariant) {
|
|
314
|
-
var oVariantClone = merge({}, oVariant);
|
|
315
|
-
if (oVariantClone.content.fileName === oVariantClone.content.variantManagementReference) {
|
|
316
|
-
// standard Variant should always contain the value: "SAP" in "author" / "Created by" field
|
|
317
|
-
// case when standard variant exists in the backend response
|
|
318
|
-
if (!ObjectPath.get("content.support.user", oVariantClone)) {
|
|
319
|
-
var oSupport = {
|
|
320
|
-
support: {
|
|
321
|
-
user: VariantsApplyUtil.DEFAULT_AUTHOR
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
merge(oVariantClone.content, oSupport);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
if (!oVariantClone.content.content.favorite) {
|
|
328
|
-
oVariantClone.content.content.favorite = true;
|
|
329
|
-
}
|
|
330
|
-
if (!oVariantClone.content.content.visible) {
|
|
331
|
-
oVariantClone.content.content.visible = true;
|
|
332
|
-
}
|
|
333
|
-
if (!oVariantClone.content.content.executeOnSelect) {
|
|
334
|
-
oVariantClone.content.content.executeOnSelect = false;
|
|
335
|
-
}
|
|
336
|
-
var aTitleKeyMatch = oVariantClone.content.content.title.match(/.i18n>(\w+)./);
|
|
337
|
-
if (aTitleKeyMatch) {
|
|
338
|
-
oVariantClone.content.content.title = getText(aTitleKeyMatch[1]);
|
|
339
|
-
}
|
|
340
|
-
return oVariantClone;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
308
|
/**
|
|
344
309
|
* Prepares the variants map from the flex response for the passed flex state
|
|
345
310
|
*
|
|
@@ -364,8 +329,8 @@ sap.ui.define([
|
|
|
364
329
|
|
|
365
330
|
var aTechnicalParameters = ObjectPath.get(["technicalParameters", VariantsApplyUtil.VARIANT_TECHNICAL_PARAMETER], mPropertyBag.componentData) || [];
|
|
366
331
|
|
|
367
|
-
var oVariantsMap = getVariantsMap(mPropertyBag.storageResponse.changes);
|
|
368
|
-
oVariantsMap = assembleResult(oVariantsMap, mPropertyBag.storageResponse.changes.variantManagementChanges, aTechnicalParameters);
|
|
332
|
+
var oVariantsMap = getVariantsMap(mPropertyBag.storageResponse.changes, mPropertyBag.reference);
|
|
333
|
+
oVariantsMap = assembleResult(oVariantsMap, mPropertyBag.storageResponse.changes.variantManagementChanges, aTechnicalParameters, mPropertyBag.reference);
|
|
369
334
|
return oVariantsMap;
|
|
370
335
|
};
|
|
371
336
|
});
|
|
@@ -14,7 +14,7 @@ sap.ui.define(["sap/ui/core/Core"], function(oCore) {
|
|
|
14
14
|
* @alias sap.ui.fl.apply._internal.preprocessors.EventHistory
|
|
15
15
|
* @experimental Since 1.47.0
|
|
16
16
|
* @author SAP SE
|
|
17
|
-
* @version 1.
|
|
17
|
+
* @version 1.105.0
|
|
18
18
|
*
|
|
19
19
|
* @private
|
|
20
20
|
* @ui5-restricted sap.ui.fl.apply._internal.preprocessors.RegistrationDelegator
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
3
|
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
@@ -26,10 +26,10 @@ sap.ui.define([
|
|
|
26
26
|
/**
|
|
27
27
|
* Provides an API for applications to work with control variants. See also {@link sap.ui.fl.variants.VariantManagement}.
|
|
28
28
|
*
|
|
29
|
-
* @
|
|
29
|
+
* @name sap.ui.fl.apply.api.ControlVariantApplyAPI
|
|
30
30
|
* @experimental Since 1.67
|
|
31
31
|
* @since 1.67
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.105.0
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
35
|
var ControlVariantApplyAPI = /** @lends sap.ui.fl.apply.api.ControlVariantApplyAPI */{
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
*
|
|
21
21
|
* @alias sap.ui.fl.changeHandler.AddIFrame
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.105.0
|
|
24
24
|
* @since 1.72
|
|
25
25
|
* @private
|
|
26
26
|
*/
|
|
@@ -38,9 +38,9 @@ sap.ui.define([
|
|
|
38
38
|
*/
|
|
39
39
|
AddIFrame.applyChange = function(oChange, oControl, mPropertyBag) {
|
|
40
40
|
var oModifier = mPropertyBag.modifier;
|
|
41
|
-
var
|
|
41
|
+
var oChangeContent = oChange.getContent();
|
|
42
42
|
var oView = mPropertyBag.view;
|
|
43
|
-
var sAggregationName =
|
|
43
|
+
var sAggregationName = oChangeContent.targetAggregation;
|
|
44
44
|
var iIndex;
|
|
45
45
|
var oIFrame;
|
|
46
46
|
return Promise.resolve()
|
|
@@ -53,7 +53,7 @@ sap.ui.define([
|
|
|
53
53
|
})
|
|
54
54
|
.then(function(iRetrievedIndex) {
|
|
55
55
|
iIndex = iRetrievedIndex;
|
|
56
|
-
return createIFrame(oChange, mPropertyBag,
|
|
56
|
+
return createIFrame(oChange, mPropertyBag, oChangeContent.selector);
|
|
57
57
|
})
|
|
58
58
|
.then(function(oCreatedIFrame) {
|
|
59
59
|
oIFrame = oCreatedIFrame;
|
|
@@ -93,7 +93,6 @@ sap.ui.define([
|
|
|
93
93
|
* @ui5-restricted sap.ui.fl
|
|
94
94
|
*/
|
|
95
95
|
AddIFrame.completeChangeContent = function (oChange, oSpecificChangeInfo, mPropertyBag) {
|
|
96
|
-
var oChangeJson = oChange.getDefinition();
|
|
97
96
|
var oModifier = mPropertyBag.modifier;
|
|
98
97
|
var oAppComponent = mPropertyBag.appComponent;
|
|
99
98
|
// Required settings
|
|
@@ -102,8 +101,9 @@ sap.ui.define([
|
|
|
102
101
|
throw new Error("Attribute missing from the change specific content '" + sRequiredProperty + "'");
|
|
103
102
|
}
|
|
104
103
|
});
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
var oContent = Object.assign({}, oSpecificChangeInfo.content);
|
|
105
|
+
oContent.selector = oModifier.getSelector(oContent.baseId, oAppComponent);
|
|
106
|
+
oChange.setContent(oContent);
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
AddIFrame.getChangeVisualizationInfo = function(oChange) {
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
*
|
|
17
17
|
* @alias sap.ui.fl.changeHandler.AddXML
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.105.0
|
|
20
20
|
* @since 1.54
|
|
21
21
|
* @private
|
|
22
22
|
* @experimental Since 1.54. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -32,14 +32,15 @@ sap.ui.define([
|
|
|
32
32
|
* @param {object} mPropertyBag.modifier Modifier for the controls
|
|
33
33
|
* @param {object} mPropertyBag.view Root view
|
|
34
34
|
* @returns {boolean} <true> if the change got applied successfully
|
|
35
|
-
* @
|
|
35
|
+
* @private
|
|
36
|
+
* @ui5-restricted sap.ui.fl.apply.changes.Applyer
|
|
36
37
|
* @name sap.ui.fl.changeHandler.AddXML#applyChange
|
|
37
38
|
*/
|
|
38
39
|
AddXML.applyChange = function(oChange, oControl, mPropertyBag) {
|
|
39
|
-
var
|
|
40
|
+
var oContent = oChange.getContent();
|
|
40
41
|
var mChangeInfo = {
|
|
41
|
-
aggregationName:
|
|
42
|
-
index:
|
|
42
|
+
aggregationName: oContent.targetAggregation,
|
|
43
|
+
index: oContent.index
|
|
43
44
|
};
|
|
44
45
|
|
|
45
46
|
return BaseAddXml.applyChange(oChange, oControl, mPropertyBag, mChangeInfo);
|
|
@@ -56,7 +57,8 @@ sap.ui.define([
|
|
|
56
57
|
* @param {object} mPropertyBag.appComponent App component
|
|
57
58
|
* @param {object} mPropertyBag.view Root view
|
|
58
59
|
* @return {boolean} <true> if change has been reverted successfully
|
|
59
|
-
* @
|
|
60
|
+
* @private
|
|
61
|
+
* @ui5-restricted sap.ui.fl.apply.changes.Reverter
|
|
60
62
|
* @name sap.ui.fl.changeHandler.AddXML#revertChange
|
|
61
63
|
*/
|
|
62
64
|
AddXML.revertChange = BaseAddXml.revertChange;
|
|
@@ -66,29 +68,25 @@ sap.ui.define([
|
|
|
66
68
|
*
|
|
67
69
|
* @param {object} oChange Change object to be completed
|
|
68
70
|
* @param {object} oSpecificChangeInfo Additional information needed to complete the change
|
|
69
|
-
* @
|
|
71
|
+
* @private
|
|
72
|
+
* @ui5-restricted sap.ui.fl.write._internal
|
|
70
73
|
* @name sap.ui.fl.changeHandler.AddXML#completeChangeContent
|
|
71
74
|
*/
|
|
72
75
|
AddXML.completeChangeContent = function(oChange, oSpecificChangeInfo) {
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
if (!oChangeDefinition.content) {
|
|
76
|
-
oChangeDefinition.content = {};
|
|
77
|
-
}
|
|
78
|
-
|
|
76
|
+
var oContent = {};
|
|
79
77
|
if (oSpecificChangeInfo.targetAggregation) {
|
|
80
|
-
|
|
78
|
+
oContent.targetAggregation = oSpecificChangeInfo.targetAggregation;
|
|
81
79
|
} else {
|
|
82
80
|
BaseAddXml._throwMissingAttributeError("targetAggregation");
|
|
83
81
|
}
|
|
84
82
|
|
|
85
83
|
if (oSpecificChangeInfo.index !== undefined) {
|
|
86
|
-
|
|
84
|
+
oContent.index = oSpecificChangeInfo.index;
|
|
87
85
|
} else {
|
|
88
86
|
BaseAddXml._throwMissingAttributeError("index");
|
|
89
87
|
}
|
|
90
88
|
|
|
91
|
-
BaseAddXml.completeChangeContent(oChange, oSpecificChangeInfo,
|
|
89
|
+
BaseAddXml.completeChangeContent(oChange, oSpecificChangeInfo, oContent);
|
|
92
90
|
};
|
|
93
91
|
|
|
94
92
|
return AddXML;
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
*
|
|
17
17
|
* @alias sap.ui.fl.changeHandler.AddXMLAtExtensionPoint
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.105.0
|
|
20
20
|
* @since 1.75
|
|
21
21
|
* @private
|
|
22
22
|
* @experimental Since 1.75. This class is experimental and provides only limited functionality. Also the API might be changed in future.
|
|
@@ -40,13 +40,14 @@ sap.ui.define([
|
|
|
40
40
|
* @param {object} mPropertyBag.modifier Modifier for the controls
|
|
41
41
|
* @param {object} mPropertyBag.view Root view
|
|
42
42
|
* @returns {boolean} <true> if the change got applied successfully
|
|
43
|
-
* @
|
|
43
|
+
* @private
|
|
44
|
+
* @ui5-restricted sap.ui.fl.apply.changes.Applyer
|
|
44
45
|
* @name sap.ui.fl.changeHandler.AddXMLAtExtensionPoint#applyChange
|
|
45
46
|
*/
|
|
46
47
|
AddXMLAtExtensionPoint.applyChange = function (oChange, oControl, mPropertyBag) {
|
|
47
48
|
var oView = mPropertyBag.view;
|
|
48
49
|
var oModifier = mPropertyBag.modifier;
|
|
49
|
-
var oSelector = oChange.
|
|
50
|
+
var oSelector = oChange.getSelector();
|
|
50
51
|
var mExtensionPointInfo;
|
|
51
52
|
|
|
52
53
|
return Promise.resolve()
|
|
@@ -100,7 +101,8 @@ sap.ui.define([
|
|
|
100
101
|
* @param {object} mPropertyBag.appComponent App component
|
|
101
102
|
* @param {object} mPropertyBag.view Root view
|
|
102
103
|
* @return {boolean} <true> if change has been reverted successfully
|
|
103
|
-
* @
|
|
104
|
+
* @private
|
|
105
|
+
* @ui5-restricted sap.ui.fl.apply.changes.Reverter
|
|
104
106
|
* @name sap.ui.fl.changeHandler.AddXMLAtExtensionPoint#revertChange
|
|
105
107
|
*/
|
|
106
108
|
AddXMLAtExtensionPoint.revertChange = BaseAddXml.revertChange;
|
|
@@ -110,13 +112,14 @@ sap.ui.define([
|
|
|
110
112
|
*
|
|
111
113
|
* @param {object} oChange Change object to be completed
|
|
112
114
|
* @param {object} oSpecificChangeInfo Additional information needed to complete the change
|
|
113
|
-
* @
|
|
115
|
+
* @private
|
|
116
|
+
* @ui5-restricted sap.ui.fl.write._internal
|
|
114
117
|
* @name sap.ui.fl.changeHandler.AddXMLAtExtensionPoint#completeChangeContent
|
|
115
118
|
*/
|
|
116
119
|
AddXMLAtExtensionPoint.completeChangeContent = function(oChange, oSpecificChangeInfo) {
|
|
117
120
|
// Complete change content could be called with a third parameter. That would override the
|
|
118
121
|
// optional changeDefinition parameter of the BaseAddXml used in e.g. addxml usecase
|
|
119
|
-
BaseAddXml.completeChangeContent(oChange, oSpecificChangeInfo/*,
|
|
122
|
+
BaseAddXml.completeChangeContent(oChange, oSpecificChangeInfo/*, oContent*/);
|
|
120
123
|
};
|
|
121
124
|
|
|
122
125
|
return AddXMLAtExtensionPoint;
|