@openui5/sap.ui.fl 1.115.0 → 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
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @namespace sap.ui.fl.apply._internal.flexState.changes.ExtensionPointState
|
|
29
29
|
* @experimental Since 1.79
|
|
30
30
|
* @since 1.79
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.116.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted
|
|
34
34
|
*/
|
|
@@ -98,9 +98,9 @@ sap.ui.define([
|
|
|
98
98
|
return Promise.resolve([]);
|
|
99
99
|
}
|
|
100
100
|
return oChangePersistence.getChangesForComponent()
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
.then(function(aChanges) {
|
|
102
|
+
return aChanges.filter(isChangeValidForExtensionPoint.bind(undefined, mPropertyBag));
|
|
103
|
+
});
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -117,61 +117,61 @@ sap.ui.define([
|
|
|
117
117
|
* @private
|
|
118
118
|
* @ui5-restricted
|
|
119
119
|
*/
|
|
120
|
-
ExtensionPointState.enhanceExtensionPointChanges = function
|
|
120
|
+
ExtensionPointState.enhanceExtensionPointChanges = function(mPropertyBag, mExtensionPointInfo) {
|
|
121
121
|
mPropertyBag.extensionPointName = mExtensionPointInfo.name;
|
|
122
122
|
var oChangePersistence = ChangePersistenceFactory.getChangePersistenceForControl(mExtensionPointInfo.targetControl);
|
|
123
123
|
|
|
124
124
|
return ExtensionPointState.getChangesForExtensionPoint(oChangePersistence, mPropertyBag)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
.then(function(aChanges) {
|
|
126
|
+
var aPromises = [];
|
|
127
|
+
aChanges.forEach(function(oChange) {
|
|
128
|
+
// Only continue process if the change has not been applied, such as in case of XMLPreprocessing of an async view
|
|
129
|
+
if (oChange.isInInitialState() && !(oChange.getExtensionPointInfo && oChange.getExtensionPointInfo())) {
|
|
130
|
+
oChange.setExtensionPointInfo(mExtensionPointInfo);
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
// Set correct selector from extension point targetControl's ID
|
|
133
|
+
replaceChangeSelector(oChange, mExtensionPointInfo, false);
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
} else if (isValidForRuntimeOnlyChanges(oChange, mExtensionPointInfo)) {
|
|
141
|
-
//Change is applied but we need to create additional runtime only changes
|
|
142
|
-
//in case of duplicate extension points with different fragment id (fragment as template)
|
|
143
|
-
var oChangeFileContent = oChange.convertToFileContent();
|
|
144
|
-
var oChangeContent = oChange.getContent();
|
|
145
|
-
var mChangeSpecificData = _omit(oChangeFileContent, ["dependentSelector", "fileName", "selector", "content"]);
|
|
146
|
-
Object.keys(oChangeContent).forEach(function (sKey) {
|
|
147
|
-
mChangeSpecificData[sKey] = oChangeContent[sKey];
|
|
148
|
-
});
|
|
149
|
-
mChangeSpecificData.support.sourceChangeFileName = oChange.getId() || "";
|
|
150
|
-
aPromises.push(ChangesWriteAPI.create({
|
|
151
|
-
changeSpecificData: mChangeSpecificData,
|
|
152
|
-
selector: {
|
|
153
|
-
view: mExtensionPointInfo.view,
|
|
154
|
-
name: mExtensionPointInfo.name
|
|
155
|
-
}
|
|
156
|
-
})
|
|
157
|
-
.then(function (oRuntimeOnlyChange) {
|
|
158
|
-
//Set correct selector from extension point targetControl's ID
|
|
159
|
-
replaceChangeSelector(oRuntimeOnlyChange, mExtensionPointInfo, true);
|
|
160
|
-
oRuntimeOnlyChange.setExtensionPointInfo(mExtensionPointInfo);
|
|
161
|
-
var oFlexObjectMetadata = oRuntimeOnlyChange.getFlexObjectMetadata();
|
|
162
|
-
oFlexObjectMetadata.moduleName = oChange.getFlexObjectMetadata().moduleName;
|
|
163
|
-
oRuntimeOnlyChange.setFlexObjectMetadata(oFlexObjectMetadata);
|
|
164
|
-
oRuntimeOnlyChange.setCreation(oChange.getCreation());
|
|
165
|
-
oChangePersistence.addChangeAndUpdateDependencies(mPropertyBag.appComponent, oRuntimeOnlyChange, oChange);
|
|
166
|
-
})
|
|
167
|
-
);
|
|
135
|
+
// If the component creation is async, the changesMap already created without changes on EP --> it need to be updated
|
|
136
|
+
// Otherwise, update the selector of changes is enough, change map will be created later correctly
|
|
137
|
+
if (oChangePersistence.isChangeMapCreated()) {
|
|
138
|
+
oChangePersistence.addChangeAndUpdateDependencies(mPropertyBag.appComponent, oChange);
|
|
168
139
|
}
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
140
|
+
} else if (isValidForRuntimeOnlyChanges(oChange, mExtensionPointInfo)) {
|
|
141
|
+
// Change is applied but we need to create additional runtime only changes
|
|
142
|
+
// in case of duplicate extension points with different fragment id (fragment as template)
|
|
143
|
+
var oChangeFileContent = oChange.convertToFileContent();
|
|
144
|
+
var oChangeContent = oChange.getContent();
|
|
145
|
+
var mChangeSpecificData = _omit(oChangeFileContent, ["dependentSelector", "fileName", "selector", "content"]);
|
|
146
|
+
Object.keys(oChangeContent).forEach(function(sKey) {
|
|
147
|
+
mChangeSpecificData[sKey] = oChangeContent[sKey];
|
|
173
148
|
});
|
|
149
|
+
mChangeSpecificData.support.sourceChangeFileName = oChange.getId() || "";
|
|
150
|
+
aPromises.push(ChangesWriteAPI.create({
|
|
151
|
+
changeSpecificData: mChangeSpecificData,
|
|
152
|
+
selector: {
|
|
153
|
+
view: mExtensionPointInfo.view,
|
|
154
|
+
name: mExtensionPointInfo.name
|
|
155
|
+
}
|
|
156
|
+
})
|
|
157
|
+
.then(function(oRuntimeOnlyChange) {
|
|
158
|
+
// Set correct selector from extension point targetControl's ID
|
|
159
|
+
replaceChangeSelector(oRuntimeOnlyChange, mExtensionPointInfo, true);
|
|
160
|
+
oRuntimeOnlyChange.setExtensionPointInfo(mExtensionPointInfo);
|
|
161
|
+
var oFlexObjectMetadata = oRuntimeOnlyChange.getFlexObjectMetadata();
|
|
162
|
+
oFlexObjectMetadata.moduleName = oChange.getFlexObjectMetadata().moduleName;
|
|
163
|
+
oRuntimeOnlyChange.setFlexObjectMetadata(oFlexObjectMetadata);
|
|
164
|
+
oRuntimeOnlyChange.setCreation(oChange.getCreation());
|
|
165
|
+
oChangePersistence.addChangeAndUpdateDependencies(mPropertyBag.appComponent, oRuntimeOnlyChange, oChange);
|
|
166
|
+
})
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
return Promise.all(aPromises)
|
|
171
|
+
.then(function() {
|
|
172
|
+
return aChanges;
|
|
174
173
|
});
|
|
174
|
+
});
|
|
175
175
|
};
|
|
176
176
|
|
|
177
177
|
return ExtensionPointState;
|
|
@@ -16,13 +16,13 @@ sap.ui.define([
|
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
18
|
var mChangeHandlers = {
|
|
19
|
-
addFavorite: function
|
|
19
|
+
addFavorite: function(oVariant) {
|
|
20
20
|
oVariant.setFavorite(true);
|
|
21
21
|
},
|
|
22
|
-
removeFavorite: function
|
|
22
|
+
removeFavorite: function(oVariant) {
|
|
23
23
|
oVariant.setFavorite(false);
|
|
24
24
|
},
|
|
25
|
-
updateVariant: function
|
|
25
|
+
updateVariant: function(oVariant, oChange) {
|
|
26
26
|
var oChangeContent = oChange.getContent();
|
|
27
27
|
if (oChangeContent.executeOnSelection !== undefined) {
|
|
28
28
|
oVariant.setExecuteOnSelection(oChangeContent.executeOnSelection);
|
|
@@ -33,6 +33,9 @@ sap.ui.define([
|
|
|
33
33
|
if (oChangeContent.contexts) {
|
|
34
34
|
oVariant.setContexts(oChangeContent.contexts);
|
|
35
35
|
}
|
|
36
|
+
if (oChangeContent.visible !== undefined) {
|
|
37
|
+
oVariant.setVisible(oChangeContent.visible);
|
|
38
|
+
}
|
|
36
39
|
|
|
37
40
|
if (oChangeContent.variantContent) {
|
|
38
41
|
oVariant.setContent(oChangeContent.variantContent, /* bSkipStateChange = */ true);
|
|
@@ -42,7 +45,7 @@ sap.ui.define([
|
|
|
42
45
|
oVariant.setName(sVariantName, /* bSkipStateChange = */ true);
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
|
-
standardVariant: function
|
|
48
|
+
standardVariant: function(oVariant, oChange) {
|
|
46
49
|
// legacy change on standard variants
|
|
47
50
|
oVariant.setExecuteOnSelection(oChange.getContent().executeOnSelect);
|
|
48
51
|
}
|
|
@@ -51,7 +54,7 @@ sap.ui.define([
|
|
|
51
54
|
function getChangesMappedByVariant(mCompVariants) {
|
|
52
55
|
var mChanges = {};
|
|
53
56
|
|
|
54
|
-
mCompVariants.changes.forEach(function
|
|
57
|
+
mCompVariants.changes.forEach(function(oChange) {
|
|
55
58
|
var sVariantId = oChange.getSelector().variantId || oChange.getContent().key;
|
|
56
59
|
if (!mChanges[sVariantId]) {
|
|
57
60
|
mChanges[sVariantId] = [];
|
|
@@ -109,7 +112,7 @@ sap.ui.define([
|
|
|
109
112
|
function applyChangesOnVariant(mChanges, oVariant) {
|
|
110
113
|
var sVariantId = oVariant.getVariantId();
|
|
111
114
|
if (mChanges[sVariantId]) {
|
|
112
|
-
mChanges[sVariantId].forEach(function
|
|
115
|
+
mChanges[sVariantId].forEach(function(oChange) {
|
|
113
116
|
applyChangeOnVariant(oVariant, oChange);
|
|
114
117
|
});
|
|
115
118
|
}
|
|
@@ -121,18 +124,18 @@ sap.ui.define([
|
|
|
121
124
|
*
|
|
122
125
|
* @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
|
|
123
126
|
* @since 1.86
|
|
124
|
-
* @version 1.
|
|
127
|
+
* @version 1.116.0
|
|
125
128
|
* @private
|
|
126
129
|
* @ui5-restricted sap.ui.fl
|
|
127
130
|
*/
|
|
128
131
|
return {
|
|
129
|
-
merge: function
|
|
132
|
+
merge: function(sPersistencyKey, mCompData, oStandardVariantInput) {
|
|
130
133
|
var aVariants = mCompData.nonPersistedVariants.concat(mCompData.variants);
|
|
131
134
|
var mChanges = getChangesMappedByVariant(mCompData);
|
|
132
135
|
|
|
133
136
|
// check for an overwritten standard variant
|
|
134
137
|
var oStandardVariant;
|
|
135
|
-
aVariants.forEach(function
|
|
138
|
+
aVariants.forEach(function(oVariant) {
|
|
136
139
|
if (oVariant.getContent() && oVariant.getContent().standardvariant) {
|
|
137
140
|
oStandardVariant = oVariant;
|
|
138
141
|
}
|
|
@@ -143,13 +146,25 @@ sap.ui.define([
|
|
|
143
146
|
oStandardVariant = createVariant(sPersistencyKey, oStandardVariantInput);
|
|
144
147
|
} else {
|
|
145
148
|
// remove all standard variant entries
|
|
146
|
-
aVariants = aVariants.filter(function
|
|
149
|
+
aVariants = aVariants.filter(function(oVariant) {
|
|
147
150
|
return !oVariant.getContent() || !oVariant.getContent().standardvariant;
|
|
148
151
|
});
|
|
149
152
|
}
|
|
153
|
+
|
|
150
154
|
// apply all changes on non-standard variants
|
|
151
155
|
aVariants.forEach(applyChangesOnVariant.bind(undefined, mChanges));
|
|
152
156
|
|
|
157
|
+
// Remove all invisible variants
|
|
158
|
+
aVariants = aVariants.filter(function(oVariant) {
|
|
159
|
+
var bVisible = oVariant.getVisible();
|
|
160
|
+
if (!bVisible) {
|
|
161
|
+
var sVariantId = oVariant.getId();
|
|
162
|
+
delete mChanges[sVariantId];
|
|
163
|
+
delete mCompData.byId[sVariantId];
|
|
164
|
+
}
|
|
165
|
+
return bVisible;
|
|
166
|
+
});
|
|
167
|
+
|
|
153
168
|
// the standard must always be visible
|
|
154
169
|
oStandardVariant.setFavorite(true);
|
|
155
170
|
oStandardVariant.setStandardVariant(true);
|
|
@@ -159,7 +174,7 @@ sap.ui.define([
|
|
|
159
174
|
if (oStandardVariantChange) {
|
|
160
175
|
mChanges[oStandardVariant.getVariantId()] = mChanges[oStandardVariant.getVariantId()] || [];
|
|
161
176
|
mChanges[oStandardVariant.getVariantId()].push(oStandardVariantChange);
|
|
162
|
-
mChanges[oStandardVariant.getVariantId()].sort(function
|
|
177
|
+
mChanges[oStandardVariant.getVariantId()].sort(function(a, b) {
|
|
163
178
|
if (a.getCreation() < b.getCreation()) {
|
|
164
179
|
return -1;
|
|
165
180
|
}
|
|
@@ -173,7 +188,6 @@ sap.ui.define([
|
|
|
173
188
|
|
|
174
189
|
mCompData.standardVariant = oStandardVariant;
|
|
175
190
|
|
|
176
|
-
|
|
177
191
|
return {
|
|
178
192
|
standardVariant: oStandardVariant,
|
|
179
193
|
variants: aVariants
|
|
@@ -186,7 +200,7 @@ sap.ui.define([
|
|
|
186
200
|
*
|
|
187
201
|
* @function
|
|
188
202
|
* @since 1.89
|
|
189
|
-
* @version 1.
|
|
203
|
+
* @version 1.116.0
|
|
190
204
|
* @private
|
|
191
205
|
* @ui5-restricted sap.ui.fl
|
|
192
206
|
*
|
|
@@ -37,11 +37,11 @@ sap.ui.define([
|
|
|
37
37
|
mMapOfKey.controlId = sSVMControlId;
|
|
38
38
|
|
|
39
39
|
// clear all non-persisted variants in case of a reinitialization
|
|
40
|
-
mMapOfKey.nonPersistedVariants.forEach(function
|
|
40
|
+
mMapOfKey.nonPersistedVariants.forEach(function(oVariant) {
|
|
41
41
|
delete mMapOfKey.byId[oVariant.getId()];
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
mMapOfKey.nonPersistedVariants = aVariants.map(function
|
|
44
|
+
mMapOfKey.nonPersistedVariants = aVariants.map(function(oVariant) {
|
|
45
45
|
var oVariantInstance = Object.assign({
|
|
46
46
|
id: oVariant.id,
|
|
47
47
|
persisted: false
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
function buildSectionMap(mCompSection, sSubSection, mCompVariants) {
|
|
58
|
-
var aFlexObjects = mCompSection[sSubSection].map(function
|
|
58
|
+
var aFlexObjects = mCompSection[sSubSection].map(function(oCompVariantChangeDefinition) {
|
|
59
59
|
var oFlexObject;
|
|
60
60
|
if (sSubSection === "variants") {
|
|
61
61
|
oFlexObject = FlexObjectFactory.createCompVariant(oCompVariantChangeDefinition);
|
|
@@ -66,7 +66,7 @@ sap.ui.define([
|
|
|
66
66
|
return oFlexObject;
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
aFlexObjects.forEach(function
|
|
69
|
+
aFlexObjects.forEach(function(oFlexObject) {
|
|
70
70
|
var sPersistencyKey = oFlexObject.getPersistencyKey ? oFlexObject.getPersistencyKey() : oFlexObject.getSelector().persistencyKey;
|
|
71
71
|
getOrCreate(
|
|
72
72
|
mCompVariants,
|
|
@@ -105,7 +105,7 @@ sap.ui.define([
|
|
|
105
105
|
|
|
106
106
|
// check for the existence due to test mocks
|
|
107
107
|
if (mPropertyBag.storageResponse.changes.comp) {
|
|
108
|
-
["variants", "changes", "defaultVariants", "standardVariants"].forEach(function
|
|
108
|
+
["variants", "changes", "defaultVariants", "standardVariants"].forEach(function(sSection) {
|
|
109
109
|
buildSectionMap(mPropertyBag.storageResponse.changes.comp, sSection, mCompVariants);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
@@ -91,7 +91,7 @@ sap.ui.define([
|
|
|
91
91
|
* @namespace sap.ui.fl.apply._internal.flexState.controlVariants.Switcher
|
|
92
92
|
* @experimental Since 1.74
|
|
93
93
|
* @since 1.74
|
|
94
|
-
* @version 1.
|
|
94
|
+
* @version 1.116.0
|
|
95
95
|
* @private
|
|
96
96
|
* @ui5-restricted
|
|
97
97
|
*/
|
|
@@ -113,14 +113,14 @@ sap.ui.define([
|
|
|
113
113
|
*/
|
|
114
114
|
switchVariant: function(mPropertyBag) {
|
|
115
115
|
return Promise.resolve().then(function() {
|
|
116
|
-
//TODO: should be a function in FlexState e.g. getUIChanges()
|
|
116
|
+
// TODO: should be a function in FlexState e.g. getUIChanges()
|
|
117
117
|
mPropertyBag.changesMap = mPropertyBag.flexController._oChangePersistence.getChangesMapForComponent().mChanges;
|
|
118
118
|
var mChangesToBeSwitched = _getControlChangesForVariantSwitch(mPropertyBag);
|
|
119
119
|
|
|
120
120
|
return Reverter.revertMultipleChanges(mChangesToBeSwitched.changesToBeReverted, mPropertyBag)
|
|
121
|
-
//TODO: apply variantChanges() should be moved out of flex controller
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
// TODO: apply variantChanges() should be moved out of flex controller
|
|
122
|
+
.then(mPropertyBag.flexController.applyVariantChanges.bind(mPropertyBag.flexController, mChangesToBeSwitched.changesToBeApplied, mPropertyBag.appComponent))
|
|
123
|
+
.then(VariantManagementState.setCurrentVariant.bind(null, mPropertyBag));
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @namespace sap.ui.fl.apply._internal.flexState.controlVariants.VariantManagementState
|
|
36
36
|
* @experimental Since 1.74
|
|
37
37
|
* @since 1.74
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.116.0
|
|
39
39
|
* @private
|
|
40
40
|
* @ui5-restricted
|
|
41
41
|
*/
|
|
@@ -69,13 +69,13 @@ sap.ui.define([
|
|
|
69
69
|
// check is only executed once and influenced by technical parameters
|
|
70
70
|
// Default is set via applyVariantManagementChange instead
|
|
71
71
|
return aCtrlVariantManagementChanges
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
.reverse()
|
|
73
|
+
.map(function(oVariantManagementChange) {
|
|
74
|
+
return oVariantManagementChange.getContent().defaultVariant;
|
|
75
|
+
})
|
|
76
|
+
.find(function(sDesiredDefaultVariantId) {
|
|
77
|
+
return aVariantIds.includes(sDesiredDefaultVariantId);
|
|
78
|
+
});
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
function createVariantManagement(aFlexObjects, aVariants, sReference, sVMReference) {
|
|
@@ -98,7 +98,11 @@ sap.ui.define([
|
|
|
98
98
|
&& sVMReference === oFlexObject.getSelector().id
|
|
99
99
|
);
|
|
100
100
|
});
|
|
101
|
-
sCurrentVariantReference = getInitialCurrentVariant(
|
|
101
|
+
sCurrentVariantReference = getInitialCurrentVariant(
|
|
102
|
+
sReference,
|
|
103
|
+
aCtrlVariantManagementChanges,
|
|
104
|
+
aRelevantVariants
|
|
105
|
+
) || sVMReference;
|
|
102
106
|
ObjectPath.set(
|
|
103
107
|
[sReference, sVMReference],
|
|
104
108
|
sCurrentVariantReference,
|
|
@@ -211,24 +215,26 @@ sap.ui.define([
|
|
|
211
215
|
});
|
|
212
216
|
|
|
213
217
|
aFlexObjects
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
218
|
+
.filter(function(oFlexObject) {
|
|
219
|
+
return oFlexObject.getFileType() === "ctrl_variant_change";
|
|
220
|
+
})
|
|
221
|
+
.forEach(function(oVariantChange) {
|
|
222
|
+
var oVariantEntry = findVariant(oVariantManagementsMap, oVariantChange);
|
|
223
|
+
if (oVariantEntry) {
|
|
219
224
|
applyVariantChange(oVariantEntry, oVariantChange, sReference, oVariantManagementsMap);
|
|
220
|
-
}
|
|
225
|
+
}
|
|
226
|
+
});
|
|
221
227
|
|
|
222
228
|
aFlexObjects
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
.filter(function(oFlexObject) {
|
|
230
|
+
return oFlexObject.getFileType() === "ctrl_variant_management_change";
|
|
231
|
+
})
|
|
232
|
+
.forEach(function(oVariantManagementChange) {
|
|
233
|
+
var oVariantManagementEntry = oVariantManagementsMap[oVariantManagementChange.getSelector().id];
|
|
234
|
+
if (oVariantManagementEntry) {
|
|
235
|
+
applyVariantManagementChange(oVariantManagementEntry, oVariantManagementChange);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
232
238
|
|
|
233
239
|
Object.values(oVariantManagementsMap).forEach(function(oVariantManagement) {
|
|
234
240
|
// Standard variant should always be at the first position, all others are sorted alphabetically
|
|
@@ -314,29 +320,26 @@ sap.ui.define([
|
|
|
314
320
|
};
|
|
315
321
|
|
|
316
322
|
/**
|
|
317
|
-
* Wrapper to add a
|
|
323
|
+
* Wrapper to add a runtime-steady object - that survives the invalidation of the FlexState
|
|
324
|
+
* For example: a fake standard variant for a variant management if none exists yet.
|
|
318
325
|
*
|
|
319
326
|
* @param {string} sReference - Flex reference of the app
|
|
320
327
|
* @param {string} sComponentId - ID of the component
|
|
321
|
-
* @param {
|
|
322
|
-
* @param {object} oStandardVariantInstance - Variant instance
|
|
328
|
+
* @param {object} oFlexObject - Flex object to be added as runtime-steady
|
|
323
329
|
*
|
|
324
330
|
*/
|
|
325
|
-
VariantManagementState.
|
|
326
|
-
|
|
327
|
-
if (!oVariantsMap[sVMReference]) {
|
|
328
|
-
FlexState.addFakeStandardVariantToExternalData(sReference, sComponentId, oStandardVariantInstance);
|
|
329
|
-
}
|
|
331
|
+
VariantManagementState.addRuntimeSteadyObject = function(sReference, sComponentId, oFlexObject) {
|
|
332
|
+
FlexState.addRuntimeSteadyObject(sReference, sComponentId, oFlexObject);
|
|
330
333
|
};
|
|
331
334
|
|
|
332
335
|
/**
|
|
333
|
-
* Wrapper to
|
|
336
|
+
* Wrapper to clear the runtime-steady objects for the given component.
|
|
334
337
|
*
|
|
335
338
|
* @param {string} sReference - Flex reference of the app
|
|
336
339
|
* @param {string} sComponentId - ID of the component
|
|
337
340
|
*/
|
|
338
|
-
VariantManagementState.
|
|
339
|
-
FlexState.
|
|
341
|
+
VariantManagementState.clearRuntimeSteadyObjects = function(sReference, sComponentId) {
|
|
342
|
+
FlexState.clearRuntimeSteadyObjects(sReference, sComponentId);
|
|
340
343
|
};
|
|
341
344
|
|
|
342
345
|
/**
|
|
@@ -426,8 +429,8 @@ sap.ui.define([
|
|
|
426
429
|
/**
|
|
427
430
|
* Returns the variant management references saved in the FlexState.
|
|
428
431
|
*
|
|
429
|
-
* @param {string} sReference
|
|
430
|
-
* @returns {string[]} Array of
|
|
432
|
+
* @param {string} sReference - Flex reference of the current app
|
|
433
|
+
* @returns {string[]} Array of flex references
|
|
431
434
|
*/
|
|
432
435
|
VariantManagementState.getVariantManagementReferences = function(sReference) {
|
|
433
436
|
var oVariantsMap = oVariantManagementMapDataSelector.get({
|
|
@@ -436,6 +439,21 @@ sap.ui.define([
|
|
|
436
439
|
return Object.keys(oVariantsMap);
|
|
437
440
|
};
|
|
438
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Returns all variants saved in the FlexState.
|
|
444
|
+
*
|
|
445
|
+
* @param {string} sReference - Flex reference of the current app
|
|
446
|
+
* @returns {object[]} Array of variants
|
|
447
|
+
*/
|
|
448
|
+
VariantManagementState.getAllVariants = function(sReference) {
|
|
449
|
+
var oVariantsMap = oVariantManagementMapDataSelector.get({
|
|
450
|
+
reference: sReference
|
|
451
|
+
});
|
|
452
|
+
return Object.keys(oVariantsMap).reduce(function(aPrev, sCurr) {
|
|
453
|
+
return aPrev.concat(oVariantsMap[sCurr].variants);
|
|
454
|
+
}, []);
|
|
455
|
+
};
|
|
456
|
+
|
|
439
457
|
/**
|
|
440
458
|
* Loads the initial changes of all variant managements.
|
|
441
459
|
* If the application is started with valid variant references, they are used.
|
|
@@ -98,7 +98,7 @@ sap.ui.define([
|
|
|
98
98
|
return Promise.resolve(oResult);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
function propagateChangesForAppComponent
|
|
101
|
+
function propagateChangesForAppComponent(oAppComponent) {
|
|
102
102
|
// only manifest with type = "application" will fetch changes
|
|
103
103
|
var oFlexController = FlexControllerFactory.createForControl(oAppComponent);
|
|
104
104
|
var oVariantModel;
|
|
@@ -131,17 +131,17 @@ sap.ui.define([
|
|
|
131
131
|
componentId: sComponentId,
|
|
132
132
|
asyncHints: vConfig.asyncHints
|
|
133
133
|
})
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
134
|
+
.then(propagateChangesForAppComponent.bind(this, oComponent))
|
|
135
|
+
.then(function() {
|
|
136
|
+
// update any potential embedded component waiting for this app component
|
|
137
|
+
if (oEmbeddedComponentsPromises[sComponentId]) {
|
|
138
|
+
oEmbeddedComponentsPromises[sComponentId].forEach(function(oEmbeddedComponent) {
|
|
139
|
+
var oVariantModel = oComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
|
|
140
|
+
oEmbeddedComponent.setModel(oVariantModel, ControlVariantApplyAPI.getVariantModelName());
|
|
141
|
+
});
|
|
142
|
+
delete oEmbeddedComponentsPromises[sComponentId];
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
145
|
ComponentLifecycleHooks._componentInstantiationPromises.set(oComponent, oReturnPromise);
|
|
146
146
|
|
|
147
147
|
return oReturnPromise;
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @class
|
|
27
27
|
* @constructor
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.116.0
|
|
30
30
|
* @experimental Since 1.27.0
|
|
31
31
|
* @private
|
|
32
32
|
* @ui5-restricted sap.ui.fl, sap.ui.core
|
|
@@ -76,7 +76,7 @@ sap.ui.define([
|
|
|
76
76
|
if (bAsync) {
|
|
77
77
|
if (!sComponentId) {
|
|
78
78
|
Log.warning("No component ID for determining the anchor of the code extensions was passed.");
|
|
79
|
-
//always return a promise if async
|
|
79
|
+
// always return a promise if async
|
|
80
80
|
return Promise.resolve([]);
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -88,16 +88,16 @@ sap.ui.define([
|
|
|
88
88
|
return Promise.resolve([]);
|
|
89
89
|
}
|
|
90
90
|
if (!Utils.isApplication(oAppComponent.getManifestObject())) {
|
|
91
|
-
//we only consider components whose type is application. Otherwise, we might send request for components that can never have changes.
|
|
91
|
+
// we only consider components whose type is application. Otherwise, we might send request for components that can never have changes.
|
|
92
92
|
return Promise.resolve([]);
|
|
93
93
|
}
|
|
94
94
|
var sFlexReference = ManifestUtils.getFlexReferenceForControl(oAppComponent);
|
|
95
95
|
|
|
96
96
|
var oChangePersistence = ChangePersistenceFactory.getChangePersistenceForComponent(sFlexReference);
|
|
97
97
|
return oChangePersistence.getChangesForComponent().then(function(aChanges) {
|
|
98
|
-
var aExtensionModules = aChanges.filter(function
|
|
98
|
+
var aExtensionModules = aChanges.filter(function(oChange) {
|
|
99
99
|
return isCodeExt(oChange) && isForController(sControllerName, oChange);
|
|
100
|
-
}).map(function
|
|
100
|
+
}).map(function(oChange) {
|
|
101
101
|
return oChange.getModuleName();
|
|
102
102
|
});
|
|
103
103
|
|
|
@@ -14,12 +14,12 @@ 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.116.0
|
|
18
18
|
*
|
|
19
19
|
* @private
|
|
20
20
|
* @ui5-restricted sap.ui.fl.apply._internal.preprocessors.RegistrationDelegator
|
|
21
21
|
*/
|
|
22
|
-
var EventHistory = function
|
|
22
|
+
var EventHistory = function() {
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
EventHistory._aEventIds = [
|
|
@@ -33,7 +33,7 @@ sap.ui.define(["sap/ui/core/Core"], function(oCore) {
|
|
|
33
33
|
/**
|
|
34
34
|
* Starts listening to the events
|
|
35
35
|
*/
|
|
36
|
-
EventHistory.start = function
|
|
36
|
+
EventHistory.start = function() {
|
|
37
37
|
EventHistory._aEventIds.forEach(function(sEventId) {
|
|
38
38
|
if (EventHistory._aUnsubscribedEventIds.indexOf(sEventId) === -1) {
|
|
39
39
|
oCore.getEventBus().subscribe("sap.ui", sEventId, EventHistory.saveEvent);
|
|
@@ -49,11 +49,11 @@ sap.ui.define(["sap/ui/core/Core"], function(oCore) {
|
|
|
49
49
|
* @param {string} sEventId The identifier of the event
|
|
50
50
|
* @param {map} mParameters The parameter map carried by the event
|
|
51
51
|
*/
|
|
52
|
-
EventHistory.saveEvent = function
|
|
52
|
+
EventHistory.saveEvent = function(sChannelId, sEventId, mParameters) {
|
|
53
53
|
var oEvent = {
|
|
54
54
|
channelId: sChannelId,
|
|
55
55
|
eventId: sEventId,
|
|
56
|
-
parameters: mParameters.getId() //we only need the id. In unified.shell sap.ui.getCore().byId(vControl); will be used.
|
|
56
|
+
parameters: mParameters.getId() // we only need the id. In unified.shell sap.ui.getCore().byId(vControl); will be used.
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
if (EventHistory._oHistory[sEventId]) {
|
|
@@ -75,7 +75,7 @@ sap.ui.define(["sap/ui/core/Core"], function(oCore) {
|
|
|
75
75
|
*
|
|
76
76
|
* @return {array} List of events
|
|
77
77
|
*/
|
|
78
|
-
EventHistory.getHistoryAndStop = function
|
|
78
|
+
EventHistory.getHistoryAndStop = function(sEventId) {
|
|
79
79
|
oCore.getEventBus().unsubscribe("sap.ui", sEventId, EventHistory.saveEvent);
|
|
80
80
|
EventHistory._addUnsubscribedEvent(sEventId);
|
|
81
81
|
return EventHistory._oHistory[sEventId] || [];
|
|
@@ -44,12 +44,11 @@ sap.ui.define([
|
|
|
44
44
|
* @class
|
|
45
45
|
* @constructor
|
|
46
46
|
* @author SAP SE
|
|
47
|
-
* @version 1.
|
|
47
|
+
* @version 1.116.0
|
|
48
48
|
* @experimental Since 1.43.0
|
|
49
49
|
*/
|
|
50
50
|
var RegistrationDelegator = {};
|
|
51
51
|
|
|
52
|
-
|
|
53
52
|
function registerChangesInComponent() {
|
|
54
53
|
Component._fnOnInstanceCreated = ComponentLifecycleHooks.instanceCreatedHook;
|
|
55
54
|
}
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @class
|
|
29
29
|
* @constructor
|
|
30
30
|
* @author SAP SE
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.116.0
|
|
32
32
|
* @experimental Since 1.27.0
|
|
33
33
|
*/
|
|
34
34
|
var XmlPreprocessor = function() {};
|
|
@@ -64,7 +64,7 @@ sap.ui.define([
|
|
|
64
64
|
|
|
65
65
|
var oAppComponent = Utils.getAppComponentForControl(oComponent);
|
|
66
66
|
if (!Utils.isApplication(oAppComponent.getManifestObject())) {
|
|
67
|
-
//we only consider components whose type is application. Otherwise, we might send request for components that can never have changes.
|
|
67
|
+
// we only consider components whose type is application. Otherwise, we might send request for components that can never have changes.
|
|
68
68
|
return Promise.resolve(oView);
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -76,14 +76,14 @@ sap.ui.define([
|
|
|
76
76
|
Log.debug("flex processing view " + mProperties.id + " finished");
|
|
77
77
|
return oView;
|
|
78
78
|
})
|
|
79
|
-
.catch(function
|
|
79
|
+
.catch(function() {
|
|
80
80
|
Log.warning("Error happens when getting flex cache key! flexibility XML view preprocessing is skipped. " +
|
|
81
81
|
"The processing will be done later on the JS controls.");
|
|
82
82
|
return Promise.resolve(oView);
|
|
83
83
|
});
|
|
84
84
|
} catch (error) {
|
|
85
85
|
var sError = "view " + mProperties.id + ": " + error;
|
|
86
|
-
Log.info(sError); //to allow control usage in applications that do not work with UI flex and components
|
|
86
|
+
Log.info(sError); // to allow control usage in applications that do not work with UI flex and components
|
|
87
87
|
// throw new Error(sError); // throw again, when caller handles the promise
|
|
88
88
|
return Promise.resolve(oView);
|
|
89
89
|
}
|