@openui5/sap.ui.fl 1.136.3 → 1.139.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/README.md +1 -1
- package/REUSE.toml +8 -29
- package/THIRDPARTY.txt +72 -90
- package/package.json +4 -4
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +4 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +3 -8
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +5 -5
- 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/AddNewDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.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/ChangeOutbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.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/SetCloudDevAdaptationStatus.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/ChangeModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +6 -6
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/VariantChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +5 -5
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +43 -51
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +13 -11
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +3 -3
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +5 -9
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.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/FlexRuntimeInfoAPI.js +22 -3
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/ChangeAnnotation.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
- 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 +1 -1
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChange.js +10 -12
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +3 -3
- 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/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Settings.js +151 -0
- package/src/sap/ui/fl/initial/_internal/Storage.js +3 -2
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +18 -24
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +9 -7
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +19 -7
- package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +3 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +5 -2
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/initial/api/InitialFlexAPI.js +3 -3
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +43 -43
- package/src/sap/ui/fl/messagebundle.properties +0 -9
- package/src/sap/ui/fl/messagebundle_ar.properties +0 -6
- package/src/sap/ui/fl/messagebundle_bg.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ca.properties +0 -6
- package/src/sap/ui/fl/messagebundle_cnr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_cs.properties +0 -6
- package/src/sap/ui/fl/messagebundle_cy.properties +0 -6
- package/src/sap/ui/fl/messagebundle_da.properties +0 -6
- package/src/sap/ui/fl/messagebundle_de.properties +0 -6
- package/src/sap/ui/fl/messagebundle_el.properties +0 -6
- package/src/sap/ui/fl/messagebundle_en.properties +0 -6
- package/src/sap/ui/fl/messagebundle_en_GB.properties +0 -6
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_es.properties +0 -6
- package/src/sap/ui/fl/messagebundle_es_MX.properties +0 -6
- package/src/sap/ui/fl/messagebundle_et.properties +0 -6
- package/src/sap/ui/fl/messagebundle_fi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_fr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_fr_CA.properties +0 -6
- package/src/sap/ui/fl/messagebundle_hi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_hr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_hu.properties +0 -6
- package/src/sap/ui/fl/messagebundle_id.properties +0 -6
- package/src/sap/ui/fl/messagebundle_it.properties +0 -6
- package/src/sap/ui/fl/messagebundle_iw.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ja.properties +0 -6
- package/src/sap/ui/fl/messagebundle_kk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ko.properties +0 -6
- package/src/sap/ui/fl/messagebundle_lt.properties +0 -6
- package/src/sap/ui/fl/messagebundle_lv.properties +0 -6
- package/src/sap/ui/fl/messagebundle_mk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ms.properties +0 -6
- package/src/sap/ui/fl/messagebundle_nl.properties +0 -6
- package/src/sap/ui/fl/messagebundle_no.properties +0 -6
- package/src/sap/ui/fl/messagebundle_pl.properties +0 -6
- package/src/sap/ui/fl/messagebundle_pt.properties +0 -6
- package/src/sap/ui/fl/messagebundle_pt_PT.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ro.properties +0 -6
- package/src/sap/ui/fl/messagebundle_ru.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sh.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sl.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_sv.properties +0 -6
- package/src/sap/ui/fl/messagebundle_th.properties +0 -6
- package/src/sap/ui/fl/messagebundle_tr.properties +0 -6
- package/src/sap/ui/fl/messagebundle_uk.properties +0 -6
- package/src/sap/ui/fl/messagebundle_vi.properties +0 -6
- package/src/sap/ui/fl/messagebundle_zh_CN.properties +0 -6
- package/src/sap/ui/fl/messagebundle_zh_TW.properties +0 -6
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +5 -1
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +2 -2
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +4 -4
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- 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/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +2 -2
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +4 -2
- package/src/sap/ui/fl/variants/VariantManagement.js +3 -5
- package/src/sap/ui/fl/variants/VariantManager.js +12 -10
- package/src/sap/ui/fl/variants/VariantModel.js +26 -24
- package/src/sap/ui/fl/write/_internal/SaveAs.js +7 -8
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -14
- package/src/sap/ui/fl/write/_internal/Versions.js +40 -27
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -11
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +4 -14
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +2 -39
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/controlVariants/ControlVariantWriteUtils.js +4 -4
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.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 +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
- 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/FlexObjectManager.js +304 -50
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +3 -3
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +5 -5
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +14 -14
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/BusinessNetworkAPI.js +55 -2
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +38 -16
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +7 -7
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +6 -11
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +23 -17
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +29 -14
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +48 -76
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +7 -7
- package/src/sap/ui/fl/write/api/VersionsAPI.js +15 -0
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +0 -9
- package/ui5.yaml +0 -1
- package/src/sap/ui/fl/ChangePersistence.js +0 -438
- package/src/sap/ui/fl/ChangePersistenceFactory.js +0 -60
- package/src/sap/ui/fl/FlexController.js +0 -174
- package/src/sap/ui/fl/FlexControllerFactory.js +0 -82
- package/src/sap/ui/fl/registry/Settings.js +0 -477
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/core/Lib",
|
|
9
|
-
"sap/ui/fl/
|
|
10
|
-
"sap/ui/fl/
|
|
9
|
+
"sap/ui/fl/initial/_internal/Settings",
|
|
10
|
+
"sap/ui/fl/Layer"
|
|
11
11
|
], function(
|
|
12
12
|
Lib,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Settings,
|
|
14
|
+
Layer
|
|
15
15
|
) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
*
|
|
22
22
|
* @function
|
|
23
23
|
* @since 1.121
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.139.0
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.fl
|
|
27
27
|
* @alias module:sap/ui/fl/apply/_internal/flexState/compVariants/getVariantAuthor
|
|
@@ -73,7 +73,6 @@ sap.ui.define([
|
|
|
73
73
|
* },
|
|
74
74
|
* loadModules: <boolean>
|
|
75
75
|
* },
|
|
76
|
-
* unfilteredStorageResponse: {...}, // same as above but without layer filtering
|
|
77
76
|
* runtimePersistence: {
|
|
78
77
|
* flexObjects: [...],
|
|
79
78
|
* runtimeOnlyData: {
|
|
@@ -82,22 +81,23 @@ sap.ui.define([
|
|
|
82
81
|
* },
|
|
83
82
|
* maxLayer: <string>,
|
|
84
83
|
* emptyState: <boolean>,
|
|
85
|
-
*
|
|
84
|
+
* skipLoadBundle: <boolean>,
|
|
86
85
|
* componentId: "<componentId>",
|
|
87
86
|
* componentData: {...}
|
|
88
87
|
* }
|
|
89
88
|
*
|
|
90
89
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexState
|
|
91
90
|
* @since 1.73
|
|
92
|
-
* @version 1.
|
|
91
|
+
* @version 1.139.0
|
|
93
92
|
* @private
|
|
94
93
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
95
94
|
*/
|
|
96
|
-
|
|
95
|
+
const FlexState = {};
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
const _mInstances = {};
|
|
98
|
+
const _mCachedFlexData = {};
|
|
99
|
+
const _mInitPromises = {};
|
|
100
|
+
const _mFlexObjectInfo = {
|
|
101
101
|
appDescriptorChanges: {
|
|
102
102
|
pathInResponse: []
|
|
103
103
|
},
|
|
@@ -120,7 +120,7 @@ sap.ui.define([
|
|
|
120
120
|
// some runtime data is only fetched once (e.g. during control init) and has to survive an invalidation of the FlexState
|
|
121
121
|
// TODO: Move to runtime persistence as soon as flex objects are no longer deleted during cache invalidation
|
|
122
122
|
// but instead updated with the new data from the flex response
|
|
123
|
-
|
|
123
|
+
const _mExternalData = {
|
|
124
124
|
compVariants: {},
|
|
125
125
|
flexObjects: {}
|
|
126
126
|
};
|
|
@@ -245,7 +245,7 @@ sap.ui.define([
|
|
|
245
245
|
|
|
246
246
|
if (!_mInstances[sReference].preparedMaps[sMapName]) {
|
|
247
247
|
var mPropertyBag = {
|
|
248
|
-
unfilteredStorageResponse:
|
|
248
|
+
unfilteredStorageResponse: _mCachedFlexData[sReference],
|
|
249
249
|
storageResponse: _mInstances[sReference].storageResponse,
|
|
250
250
|
componentId: _mInstances[sReference].componentId,
|
|
251
251
|
componentData: _mInstances[sReference].componentData,
|
|
@@ -357,7 +357,7 @@ sap.ui.define([
|
|
|
357
357
|
bDataUpdated = true;
|
|
358
358
|
}
|
|
359
359
|
if (!_mInstances[sReference].storageResponse) {
|
|
360
|
-
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference,
|
|
360
|
+
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mCachedFlexData[sReference]);
|
|
361
361
|
// Flex objects need to be recreated
|
|
362
362
|
delete _mInstances[sReference].runtimePersistence;
|
|
363
363
|
bDataUpdated = true;
|
|
@@ -399,31 +399,28 @@ sap.ui.define([
|
|
|
399
399
|
return mFilteredReturn;
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
async function
|
|
402
|
+
async function loadAndCacheFlexData(mPropertyBag) {
|
|
403
403
|
const mResponse = await Loader.loadFlexData(mPropertyBag);
|
|
404
|
-
if (!mPropertyBag.
|
|
404
|
+
if (!mPropertyBag.skipLoadBundle) {
|
|
405
405
|
mResponse.authors = await Loader.loadVariantsAuthors(mPropertyBag.reference);
|
|
406
406
|
}
|
|
407
|
+
_mCachedFlexData[mPropertyBag.reference] = merge({}, mResponse);
|
|
407
408
|
storeInfoInSession(mPropertyBag.reference, mResponse);
|
|
408
|
-
|
|
409
|
-
return mResponse;
|
|
410
409
|
}
|
|
411
410
|
|
|
412
|
-
function prepareNewInstance(
|
|
411
|
+
function prepareNewInstance(mPropertyBag) {
|
|
413
412
|
// The following line is used by the Flex Support Tool to set breakpoints - please adjust the tool if you change it!
|
|
414
413
|
_mInstances[mPropertyBag.reference] = merge({}, {
|
|
415
|
-
unfilteredStorageResponse: mResponse,
|
|
416
414
|
preparedMaps: {},
|
|
417
415
|
componentId: mPropertyBag.componentId,
|
|
418
416
|
componentData: mPropertyBag.componentData,
|
|
419
|
-
|
|
417
|
+
skipLoadBundle: mPropertyBag.skipLoadBundle,
|
|
420
418
|
version: mPropertyBag.version,
|
|
421
419
|
allContextsProvided: mPropertyBag.allContextsProvided
|
|
422
420
|
});
|
|
423
421
|
|
|
424
422
|
// no further changes to storageResponse properties allowed
|
|
425
423
|
Object.freeze(_mInstances[mPropertyBag.reference].storageResponse);
|
|
426
|
-
Object.freeze(_mInstances[mPropertyBag.reference].unfilteredStorageResponse);
|
|
427
424
|
}
|
|
428
425
|
|
|
429
426
|
function storeInfoInSession(sReference, mResponse) {
|
|
@@ -437,19 +434,17 @@ sap.ui.define([
|
|
|
437
434
|
|
|
438
435
|
function checkPartialFlexState(mInitProperties) {
|
|
439
436
|
var oFlexInstance = _mInstances[mInitProperties.reference];
|
|
440
|
-
if (oFlexInstance.
|
|
441
|
-
oFlexInstance.
|
|
442
|
-
mInitProperties.partialFlexData = merge({},
|
|
437
|
+
if (oFlexInstance.skipLoadBundle === true && mInitProperties.skipLoadBundle !== true) {
|
|
438
|
+
oFlexInstance.skipLoadBundle = false;
|
|
439
|
+
mInitProperties.partialFlexData = merge({}, _mCachedFlexData[mInitProperties.reference].changes);
|
|
443
440
|
mInitProperties.reInitialize = true;
|
|
444
441
|
}
|
|
445
442
|
}
|
|
446
443
|
|
|
447
|
-
function
|
|
444
|
+
function checkComponentIdChanged(mInitProperties) {
|
|
448
445
|
var sFlexInstanceComponentId = _mInstances[mInitProperties.reference].componentId;
|
|
449
446
|
// if the component with the same reference was rendered with a new ID - clear existing state
|
|
450
|
-
|
|
451
|
-
mInitProperties.reInitialize = true;
|
|
452
|
-
}
|
|
447
|
+
return sFlexInstanceComponentId !== mInitProperties.componentId;
|
|
453
448
|
}
|
|
454
449
|
|
|
455
450
|
function checkVersionAndAllContexts(mInitProperties) {
|
|
@@ -471,7 +466,6 @@ sap.ui.define([
|
|
|
471
466
|
|
|
472
467
|
function initializeEmptyState(sReference) {
|
|
473
468
|
_mInstances[sReference] = {
|
|
474
|
-
unfilteredStorageResponse: { changes: StorageUtils.getEmptyFlexDataResponse() },
|
|
475
469
|
storageResponse: { changes: StorageUtils.getEmptyFlexDataResponse() },
|
|
476
470
|
preparedMaps: {},
|
|
477
471
|
emptyState: true,
|
|
@@ -479,6 +473,7 @@ sap.ui.define([
|
|
|
479
473
|
reInitialize: true,
|
|
480
474
|
componentId: ""
|
|
481
475
|
};
|
|
476
|
+
_mCachedFlexData[sReference] = { changes: StorageUtils.getEmptyFlexDataResponse() };
|
|
482
477
|
const oNewInitPromise = new Deferred();
|
|
483
478
|
_mInitPromises[sReference] = oNewInitPromise;
|
|
484
479
|
oNewInitPromise.resolve();
|
|
@@ -505,7 +500,7 @@ sap.ui.define([
|
|
|
505
500
|
* @param {object} [mPropertyBag.asyncHints] - Async hints passed from the app index to the component processing
|
|
506
501
|
* @param {string} [mPropertyBag.version] - Number of the version in which the state should be initialized
|
|
507
502
|
* @param {string} [mPropertyBag.adaptationId] - Context-based adaptation for which the state should be initialized
|
|
508
|
-
* @param {boolean} [mPropertyBag.
|
|
503
|
+
* @param {boolean} [mPropertyBag.skipLoadBundle=false] - if true state is initialized partially and does not include flex bundles
|
|
509
504
|
* @returns {Promise<undefined>} Resolves a promise as soon as FlexState is initialized
|
|
510
505
|
*/
|
|
511
506
|
FlexState.initialize = async function(mPropertyBag) {
|
|
@@ -520,17 +515,19 @@ sap.ui.define([
|
|
|
520
515
|
if (oOldInitPromise) {
|
|
521
516
|
await oOldInitPromise.promise;
|
|
522
517
|
checkPartialFlexState(mProperties);
|
|
523
|
-
checkComponentId(mProperties);
|
|
524
518
|
checkVersionAndAllContexts(mProperties);
|
|
525
519
|
if (mProperties.reInitialize) {
|
|
526
|
-
|
|
527
|
-
prepareNewInstance(
|
|
520
|
+
await loadAndCacheFlexData(mProperties);
|
|
521
|
+
prepareNewInstance(mProperties);
|
|
522
|
+
} else if (checkComponentIdChanged(mProperties)) {
|
|
523
|
+
// a changed component Id does not invalidate the cached flex data, only the instance
|
|
524
|
+
prepareNewInstance(mProperties);
|
|
528
525
|
} else {
|
|
529
526
|
rebuildResponseIfMaxLayerChanged(mPropertyBag.reference);
|
|
530
527
|
}
|
|
531
528
|
} else {
|
|
532
|
-
|
|
533
|
-
prepareNewInstance(
|
|
529
|
+
await loadAndCacheFlexData(mProperties);
|
|
530
|
+
prepareNewInstance(mProperties);
|
|
534
531
|
}
|
|
535
532
|
|
|
536
533
|
initializeNewInstance(mProperties);
|
|
@@ -582,9 +579,9 @@ sap.ui.define([
|
|
|
582
579
|
}
|
|
583
580
|
const oInstance = _mInstances[mPropertyBag.reference];
|
|
584
581
|
Object.entries(mPropertyBag.newData).forEach(([sKey, vValue]) => {
|
|
585
|
-
|
|
582
|
+
_mCachedFlexData[mPropertyBag.reference].changes[sKey].push(...vValue);
|
|
586
583
|
});
|
|
587
|
-
oInstance.storageResponse = filterByMaxLayer(mPropertyBag.reference,
|
|
584
|
+
oInstance.storageResponse = filterByMaxLayer(mPropertyBag.reference, _mCachedFlexData[mPropertyBag.reference]);
|
|
588
585
|
oInstance.runtimePersistence.flexObjects =
|
|
589
586
|
[
|
|
590
587
|
...oInstance.runtimePersistence.flexObjects,
|
|
@@ -614,9 +611,9 @@ sap.ui.define([
|
|
|
614
611
|
const oNewInitPromise = new Deferred();
|
|
615
612
|
_mInitPromises[sReference] = oNewInitPromise;
|
|
616
613
|
await oOldInitPromise;
|
|
617
|
-
|
|
618
|
-
prepareNewInstance(
|
|
619
|
-
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference,
|
|
614
|
+
await loadAndCacheFlexData(mPropertyBag);
|
|
615
|
+
prepareNewInstance(mPropertyBag);
|
|
616
|
+
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mCachedFlexData[sReference]);
|
|
620
617
|
const bUpdated = updateRuntimePersistence(
|
|
621
618
|
sReference,
|
|
622
619
|
_mInstances[sReference].storageResponse,
|
|
@@ -664,11 +661,11 @@ sap.ui.define([
|
|
|
664
661
|
const aFlexObjectUpdates = [];
|
|
665
662
|
aUpdates.forEach((oUpdate) => {
|
|
666
663
|
if (oUpdate.type === "ui2") {
|
|
667
|
-
|
|
664
|
+
_mCachedFlexData[sReference].changes.ui2personalization = oUpdate.newData;
|
|
668
665
|
} else {
|
|
669
666
|
const vPath = getChangeCategory(oUpdate.flexObject);
|
|
670
667
|
const sFileName = oUpdate.flexObject.fileName;
|
|
671
|
-
const aUnfiltered = ObjectPath.get(vPath,
|
|
668
|
+
const aUnfiltered = ObjectPath.get(vPath, _mCachedFlexData[sReference].changes);
|
|
672
669
|
const aFiltered = ObjectPath.get(vPath, _mInstances[sReference].storageResponse.changes);
|
|
673
670
|
const iExistingFlexObjectIdx = _mInstances[sReference].runtimePersistence.flexObjects.findIndex(
|
|
674
671
|
(oFlexObject) => oFlexObject.getId() === sFileName
|
|
@@ -717,8 +714,8 @@ sap.ui.define([
|
|
|
717
714
|
delete _mInitPromises[sReference];
|
|
718
715
|
oFlexObjectsDataSelector.clearCachedResult({ reference: sReference });
|
|
719
716
|
} else {
|
|
720
|
-
_mInstances
|
|
721
|
-
_mInitPromises
|
|
717
|
+
Object.keys(_mInstances).forEach((sReference) => delete _mInstances[sReference]);
|
|
718
|
+
Object.keys(_mInitPromises).forEach((sReference) => delete _mInitPromises[sReference]);
|
|
722
719
|
oFlexObjectsDataSelector.clearCachedResult();
|
|
723
720
|
}
|
|
724
721
|
};
|
|
@@ -786,7 +783,7 @@ sap.ui.define([
|
|
|
786
783
|
FlexState.rebuildFilteredResponse = function(sReference) {
|
|
787
784
|
if (_mInstances[sReference]) {
|
|
788
785
|
_mInstances[sReference].preparedMaps = {};
|
|
789
|
-
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference,
|
|
786
|
+
_mInstances[sReference].storageResponse = filterByMaxLayer(sReference, _mCachedFlexData[sReference]);
|
|
790
787
|
// Storage response has changed, recreate the flex objects
|
|
791
788
|
_mInstances[sReference].runtimePersistence = buildRuntimePersistence(
|
|
792
789
|
_mInstances[sReference],
|
|
@@ -831,11 +828,7 @@ sap.ui.define([
|
|
|
831
828
|
|
|
832
829
|
FlexState.removeDirtyFlexObjects = function(sReference, aFlexObjects) {
|
|
833
830
|
const aRemovedFlexObjects = [];
|
|
834
|
-
|
|
835
|
-
// independent of FlexState in some test cases
|
|
836
|
-
// Once the ChangePersistence is no longer used
|
|
837
|
-
// make sure to remove the safeguard
|
|
838
|
-
if (_mInstances[sReference] && aFlexObjects.length > 0) {
|
|
831
|
+
if (aFlexObjects.length > 0) {
|
|
839
832
|
const aCurrentFlexObjects = _mInstances[sReference].runtimePersistence.flexObjects;
|
|
840
833
|
aFlexObjects.forEach(function(oFlexObject) {
|
|
841
834
|
const iIndex = aCurrentFlexObjects.indexOf(oFlexObject);
|
|
@@ -873,7 +866,7 @@ sap.ui.define([
|
|
|
873
866
|
};
|
|
874
867
|
|
|
875
868
|
FlexState.getUI2Personalization = function(sReference) {
|
|
876
|
-
return merge({},
|
|
869
|
+
return merge({}, _mCachedFlexData[sReference].changes.ui2personalization);
|
|
877
870
|
};
|
|
878
871
|
|
|
879
872
|
FlexState.getCompVariantsMap = function(sReference) {
|
|
@@ -884,12 +877,11 @@ sap.ui.define([
|
|
|
884
877
|
return _mFlexObjectInfo[sMapName].prepareFunction(mPropertyBag);
|
|
885
878
|
};
|
|
886
879
|
|
|
887
|
-
//
|
|
888
|
-
// TODO: also used by the CompVariantState to mutate the storage response, this has to be changed
|
|
880
|
+
// TODO: used by the CompVariantState to mutate the storage response, this has to be changed
|
|
889
881
|
FlexState.getStorageResponse = function(sReference) {
|
|
890
882
|
if (_mInitPromises[sReference]) {
|
|
891
883
|
return _mInitPromises[sReference].promise.then(function() {
|
|
892
|
-
return
|
|
884
|
+
return _mCachedFlexData[sReference];
|
|
893
885
|
});
|
|
894
886
|
}
|
|
895
887
|
return Promise.resolve();
|
|
@@ -8,16 +8,16 @@ sap.ui.define([
|
|
|
8
8
|
"sap/base/util/ObjectPath",
|
|
9
9
|
"sap/ui/base/ManagedObject",
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
11
|
+
"sap/ui/fl/initial/_internal/Settings",
|
|
11
12
|
"sap/ui/fl/initial/_internal/Storage",
|
|
12
|
-
"sap/ui/fl/initial/_internal/StorageUtils"
|
|
13
|
-
"sap/ui/fl/registry/Settings"
|
|
13
|
+
"sap/ui/fl/initial/_internal/StorageUtils"
|
|
14
14
|
], function(
|
|
15
15
|
ObjectPath,
|
|
16
16
|
ManagedObject,
|
|
17
17
|
ManifestUtils,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
Settings,
|
|
19
|
+
Storage,
|
|
20
|
+
StorageUtils
|
|
21
21
|
) {
|
|
22
22
|
"use strict";
|
|
23
23
|
|
|
@@ -135,7 +135,7 @@ sap.ui.define([
|
|
|
135
135
|
*
|
|
136
136
|
* @namespace sap.ui.fl.apply._internal.flexState.Loader
|
|
137
137
|
* @since 1.74
|
|
138
|
-
* @version 1.
|
|
138
|
+
* @version 1.139.0
|
|
139
139
|
* @private
|
|
140
140
|
* @ui5-restricted sap.ui.fl.apply._internal.flexState
|
|
141
141
|
*/
|
|
@@ -155,15 +155,16 @@ sap.ui.define([
|
|
|
155
155
|
* @param {object} [mPropertyBag.asyncHints] - Async hints passed from the app index to the component processing
|
|
156
156
|
* @param {number} [mPropertyBag.version] - Number of the version in which the state should be initialized
|
|
157
157
|
* @param {string} [mPropertyBag.adaptationId] - Context-based adaptation for which the state should be initialized
|
|
158
|
-
* @param {
|
|
158
|
+
* @param {boolean} [mPropertyBag.skipLoadBundle=false] - If true only the partial flex data is loaded, without the bundle
|
|
159
159
|
* @param {boolean} [mPropertyBag.allContexts] - Includes also restricted context
|
|
160
|
+
* @param {object} [mPropertyBag.partialFlexData] - Already loaded data if only the bundle has to be loaded
|
|
160
161
|
* @returns {Promise<object>} resolves with the change file for the given component from the Storage
|
|
161
162
|
*/
|
|
162
163
|
loadFlexData(mPropertyBag) {
|
|
163
164
|
var sComponentName = ManifestUtils.getBaseComponentNameFromManifest(mPropertyBag.manifest);
|
|
164
165
|
|
|
165
166
|
if (mPropertyBag.partialFlexData) {
|
|
166
|
-
return
|
|
167
|
+
return Storage.completeFlexData({
|
|
167
168
|
reference: mPropertyBag.reference,
|
|
168
169
|
componentName: sComponentName,
|
|
169
170
|
partialFlexData: mPropertyBag.partialFlexData
|
|
@@ -173,7 +174,7 @@ sap.ui.define([
|
|
|
173
174
|
// the cache key cannot be used in case of a reinitialization
|
|
174
175
|
var sCacheKey = mPropertyBag.reInitialize ? undefined : ManifestUtils.getCacheKeyFromAsyncHints(mPropertyBag.reference, mPropertyBag.asyncHints);
|
|
175
176
|
|
|
176
|
-
return
|
|
177
|
+
return Storage.loadFlexData({
|
|
177
178
|
preview: ManifestUtils.getPreviewSectionFromAsyncHints(mPropertyBag.asyncHints),
|
|
178
179
|
reference: mPropertyBag.reference,
|
|
179
180
|
componentName: sComponentName,
|
|
@@ -182,7 +183,8 @@ sap.ui.define([
|
|
|
182
183
|
appDescriptor: mPropertyBag.manifest.getRawJson ? mPropertyBag.manifest.getRawJson() : mPropertyBag.manifest,
|
|
183
184
|
version: mPropertyBag.version,
|
|
184
185
|
allContexts: mPropertyBag.allContexts,
|
|
185
|
-
adaptationId: mPropertyBag.adaptationId
|
|
186
|
+
adaptationId: mPropertyBag.adaptationId,
|
|
187
|
+
skipLoadBundle: mPropertyBag.skipLoadBundle
|
|
186
188
|
})
|
|
187
189
|
.then(applyDeactivateChanges.bind())
|
|
188
190
|
.then(filterInvalidFileNames.bind())
|
|
@@ -200,7 +202,7 @@ sap.ui.define([
|
|
|
200
202
|
// the settings are available due to previous loadFlexData calls or
|
|
201
203
|
// not available due to an async hint stating that no changes are available, thus also no author mapping needed
|
|
202
204
|
const oSettings = Settings.getInstanceOrUndef();
|
|
203
|
-
return oSettings?.
|
|
205
|
+
return oSettings?.getIsVariantAuthorNameAvailable() ? Storage.loadVariantsAuthors(sReference) : Promise.resolve({});
|
|
204
206
|
}
|
|
205
207
|
};
|
|
206
208
|
});
|
|
@@ -125,7 +125,7 @@ sap.ui.define([
|
|
|
125
125
|
*
|
|
126
126
|
* @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
|
|
127
127
|
* @since 1.86
|
|
128
|
-
* @version 1.
|
|
128
|
+
* @version 1.139.0
|
|
129
129
|
* @private
|
|
130
130
|
* @ui5-restricted sap.ui.fl
|
|
131
131
|
*/
|
|
@@ -215,7 +215,7 @@ sap.ui.define([
|
|
|
215
215
|
*
|
|
216
216
|
* @function
|
|
217
217
|
* @since 1.89
|
|
218
|
-
* @version 1.
|
|
218
|
+
* @version 1.139.0
|
|
219
219
|
* @private
|
|
220
220
|
* @ui5-restricted sap.ui.fl
|
|
221
221
|
*
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
*
|
|
56
56
|
* @namespace sap.ui.fl.apply._internal.flexState.controlVariants.VariantManagementState
|
|
57
57
|
* @since 1.74
|
|
58
|
-
* @version 1.
|
|
58
|
+
* @version 1.139.0
|
|
59
59
|
* @private
|
|
60
60
|
* @ui5-restricted
|
|
61
61
|
*/
|
|
@@ -542,11 +542,11 @@ sap.ui.define([
|
|
|
542
542
|
* @param {string} mPropertyBag.vmReference - Variant management reference
|
|
543
543
|
* @param {string} mPropertyBag.reference - Component reference
|
|
544
544
|
* @param {string} [mPropertyBag.vReference] - Variant reference
|
|
545
|
-
* @returns {object} All variant changes of the variant
|
|
545
|
+
* @returns {object[]} All variant changes of the variant
|
|
546
546
|
*/
|
|
547
547
|
VariantManagementState.getVariantChangesForVariant = function(mPropertyBag) {
|
|
548
548
|
var oVariant = VariantManagementState.getVariant(mPropertyBag);
|
|
549
|
-
return oVariant
|
|
549
|
+
return oVariant?.variantChanges || [];
|
|
550
550
|
};
|
|
551
551
|
|
|
552
552
|
/**
|
|
@@ -16,7 +16,6 @@ sap.ui.define([
|
|
|
16
16
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
17
17
|
"sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration",
|
|
18
18
|
"sap/ui/fl/variants/VariantModel",
|
|
19
|
-
"sap/ui/fl/FlexControllerFactory",
|
|
20
19
|
"sap/ui/fl/Layer",
|
|
21
20
|
"sap/ui/fl/Utils",
|
|
22
21
|
"sap/ui/model/json/JSONModel",
|
|
@@ -34,7 +33,6 @@ sap.ui.define([
|
|
|
34
33
|
ControlVariantApplyAPI,
|
|
35
34
|
ChangeHandlerRegistration,
|
|
36
35
|
VariantModel,
|
|
37
|
-
FlexControllerFactory,
|
|
38
36
|
Layer,
|
|
39
37
|
Utils,
|
|
40
38
|
JSONModel,
|
|
@@ -126,7 +124,6 @@ sap.ui.define([
|
|
|
126
124
|
|
|
127
125
|
async function propagateChangesForAppComponent(oAppComponent) {
|
|
128
126
|
// only manifest with type = "application" will fetch changes
|
|
129
|
-
var oFlexController = FlexControllerFactory.createForControl(oAppComponent);
|
|
130
127
|
const sReference = ManifestUtils.getFlexReferenceForControl(oAppComponent);
|
|
131
128
|
var oVariantModel;
|
|
132
129
|
var fnPropagationListener = ChangesApplier.applyAllChangesForControl.bind(
|
|
@@ -134,9 +131,9 @@ sap.ui.define([
|
|
|
134
131
|
oAppComponent,
|
|
135
132
|
sReference
|
|
136
133
|
);
|
|
137
|
-
fnPropagationListener.
|
|
134
|
+
fnPropagationListener._bIsFlexApplyChangesFunction = true;
|
|
138
135
|
oAppComponent.addPropagationListener(fnPropagationListener);
|
|
139
|
-
oVariantModel = ComponentLifecycleHooks._createVariantModel(
|
|
136
|
+
oVariantModel = ComponentLifecycleHooks._createVariantModel(oAppComponent);
|
|
140
137
|
await oVariantModel.initialize();
|
|
141
138
|
Measurement.end("flexProcessing");
|
|
142
139
|
oAppComponent.setModel(oVariantModel, ControlVariantApplyAPI.getVariantModelName());
|
|
@@ -204,9 +201,8 @@ sap.ui.define([
|
|
|
204
201
|
}
|
|
205
202
|
|
|
206
203
|
// the current sinon version used in UI5 does not support stubbing the constructor
|
|
207
|
-
ComponentLifecycleHooks._createVariantModel = function(
|
|
204
|
+
ComponentLifecycleHooks._createVariantModel = function(oAppComponent) {
|
|
208
205
|
return new VariantModel({}, {
|
|
209
|
-
flexController: oFlexController,
|
|
210
206
|
appComponent: oAppComponent
|
|
211
207
|
});
|
|
212
208
|
};
|
|
@@ -254,13 +250,13 @@ sap.ui.define([
|
|
|
254
250
|
componentData: oComponentData
|
|
255
251
|
});
|
|
256
252
|
try {
|
|
257
|
-
//
|
|
253
|
+
// skipLoadBundle has to be true as there is no guarantee that the flex bundle is already available at this point
|
|
258
254
|
await FlexState.initialize({
|
|
259
255
|
componentData: oComponentData,
|
|
260
256
|
asyncHints: oPropertyBag.owner?.config.asyncHints || oPropertyBag.factoryConfig.asyncHints,
|
|
261
257
|
componentId: sAppComponentId,
|
|
262
258
|
reference: sReference,
|
|
263
|
-
|
|
259
|
+
skipLoadBundle: true
|
|
264
260
|
});
|
|
265
261
|
const sServiceUrl = ODataUtils.removeOriginSegmentParameters(oPropertyBag.model.getServiceUrl());
|
|
266
262
|
const aRelevantAnnotationChanges = FlexState.getAnnotationChanges(sReference)
|
|
@@ -14,7 +14,7 @@ sap.ui.define([
|
|
|
14
14
|
"sap/ui/fl/initial/_internal/FlexConfiguration",
|
|
15
15
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
16
16
|
"sap/ui/fl/initial/api/InitialFlexAPI",
|
|
17
|
-
"sap/ui/fl/
|
|
17
|
+
"sap/ui/fl/initial/_internal/Settings",
|
|
18
18
|
"sap/ui/fl/Layer",
|
|
19
19
|
"sap/ui/fl/Utils",
|
|
20
20
|
"sap/ui/VersionInfo"
|
|
@@ -251,6 +251,11 @@ sap.ui.define([
|
|
|
251
251
|
};
|
|
252
252
|
},
|
|
253
253
|
|
|
254
|
+
// Used for stubbing in tests
|
|
255
|
+
_getHostname() {
|
|
256
|
+
return document.location.hostname;
|
|
257
|
+
},
|
|
258
|
+
|
|
254
259
|
/**
|
|
255
260
|
* Checks if the Settings are available and if so returns if the system is a customer system
|
|
256
261
|
*
|
|
@@ -259,7 +264,21 @@ sap.ui.define([
|
|
|
259
264
|
* @ui5-restricted sap.ui.rta
|
|
260
265
|
*/
|
|
261
266
|
isCustomerSystem() {
|
|
262
|
-
|
|
267
|
+
const oSettings = Settings.getInstanceOrUndef();
|
|
268
|
+
const sSystemType = oSettings?.getSystemType();
|
|
269
|
+
const bIsCustomerSystem = {
|
|
270
|
+
CUSTOMER: true,
|
|
271
|
+
SAP: false
|
|
272
|
+
}[sSystemType];
|
|
273
|
+
const sHostname = this._getHostname();
|
|
274
|
+
|
|
275
|
+
return bIsCustomerSystem !== undefined
|
|
276
|
+
? bIsCustomerSystem
|
|
277
|
+
// Fallback if back end has no info, guess based on hostname
|
|
278
|
+
: !(
|
|
279
|
+
sHostname === "localhost"
|
|
280
|
+
|| sHostname === "127.0.0.1"
|
|
281
|
+
);
|
|
263
282
|
},
|
|
264
283
|
|
|
265
284
|
/**
|
|
@@ -270,7 +289,7 @@ sap.ui.define([
|
|
|
270
289
|
* @ui5-restricted sap.ui.rta
|
|
271
290
|
*/
|
|
272
291
|
isAtoEnabled() {
|
|
273
|
-
return Settings.getInstanceOrUndef()?.
|
|
292
|
+
return Settings.getInstanceOrUndef()?.getIsAtoEnabled();
|
|
274
293
|
},
|
|
275
294
|
|
|
276
295
|
/**
|