@openui5/sap.ui.fl 1.98.0 → 1.101.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/THIRDPARTY.txt +6 -6
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/Cache.js +1 -1
- package/src/sap/ui/fl/Change.js +34 -12
- package/src/sap/ui/fl/ChangePersistence.js +130 -168
- package/src/sap/ui/fl/ChangePersistenceFactory.js +2 -2
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +3 -4
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +3 -4
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +4 -4
- package/src/sap/ui/fl/FlexController.js +25 -57
- package/src/sap/ui/fl/FlexControllerFactory.js +5 -2
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +14 -14
- package/src/sap/ui/fl/Variant.js +5 -5
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +56 -9
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +46 -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 +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/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +8 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +452 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +68 -0
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +34 -43
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -3
- 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 +12 -10
- 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 -4
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +34 -32
- package/src/sap/ui/fl/{PreprocessorImpl.js → apply/_internal/preprocessors/ControllerExtension.js} +38 -47
- package/src/sap/ui/fl/{EventHistory.js → apply/_internal/preprocessors/EventHistory.js} +7 -7
- package/src/sap/ui/fl/{RegistrationDelegator.js → apply/_internal/preprocessors/RegistrationDelegator.js} +40 -42
- package/src/sap/ui/fl/{XmlPreprocessorImpl.js → apply/_internal/preprocessors/XmlPreprocessor.js} +6 -6
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +1 -1
- 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/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +7 -2
- 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/codeExt/CodeExtManager.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- 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/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +9 -9
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- 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 +16 -16
- package/src/sap/ui/fl/messagebundle_fr.properties +14 -14
- package/src/sap/ui/fl/registry/Settings.js +44 -5
- package/src/sap/ui/fl/support/Flexibility.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +34 -0
- package/src/sap/ui/fl/support/api/SupportAPI.js +5 -2
- 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 +4 -4
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +4 -4
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
- package/src/sap/ui/fl/themes/base/VariantManagement.less +0 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +1 -1
- package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +5 -0
- package/src/sap/ui/fl/variants/VariantModel.js +34 -31
- package/src/sap/ui/fl/variants/context/Component.js +2 -6
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +6 -41
- package/src/sap/ui/fl/variants/context/i18n/i18n.properties +3 -7
- package/src/sap/ui/fl/variants/context/i18n/i18n_ar.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_bg.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ca.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_cs.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_cy.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_da.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_de.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_el.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_GB.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_sappsd.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saprigi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_es.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_es_MX.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_et.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr_CA.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_hu.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_id.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_it.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_iw.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ja.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_kk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ko.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_lt.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_lv.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ms.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_nl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_no.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt_PT.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ro.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_ru.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sh.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sl.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_sv.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_th.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_tr.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_uk.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_vi.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_CN.properties +2 -4
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_TW.properties +2 -4
- package/src/sap/ui/fl/variants/context/view/ContextVisibility.view.xml +7 -6
- package/src/sap/ui/fl/write/_internal/Storage.js +15 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +5 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +4 -2
- 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 +2 -2
- 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/KeyUserConnector.js +33 -3
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -4
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- 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/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 +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 +5 -5
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +13 -4
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +125 -32
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +4 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +49 -4
- package/src/sap/ui/fl/write/api/TranslationAPI.js +23 -2
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +13 -0
|
@@ -5,53 +5,55 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/
|
|
9
|
-
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
10
|
-
"sap/ui/fl/Change",
|
|
11
|
-
"sap/ui/fl/Layer",
|
|
12
|
-
"sap/ui/fl/Variant",
|
|
13
|
-
"sap/ui/fl/Utils",
|
|
14
|
-
"sap/ui/fl/LayerUtils",
|
|
15
|
-
"sap/ui/fl/Cache",
|
|
16
|
-
"sap/ui/fl/registry/Settings",
|
|
17
|
-
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
18
|
-
"sap/ui/fl/write/_internal/Storage",
|
|
19
|
-
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
20
|
-
"sap/ui/core/Component",
|
|
21
|
-
"sap/ui/model/json/JSONModel",
|
|
22
|
-
"sap/ui/performance/Measurement",
|
|
8
|
+
"sap/base/util/restricted/_union",
|
|
23
9
|
"sap/base/util/includes",
|
|
24
10
|
"sap/base/util/merge",
|
|
25
|
-
"sap/base/util/restricted/_union",
|
|
26
11
|
"sap/base/util/UriParameters",
|
|
27
12
|
"sap/base/Log",
|
|
13
|
+
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
14
|
+
"sap/ui/core/Component",
|
|
15
|
+
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
16
|
+
"sap/ui/fl/apply/_internal/changes/Utils",
|
|
17
|
+
"sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
|
|
28
18
|
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
29
19
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
30
|
-
"sap/ui/fl/
|
|
20
|
+
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
21
|
+
"sap/ui/fl/registry/Settings",
|
|
22
|
+
"sap/ui/fl/write/_internal/condenser/Condenser",
|
|
23
|
+
"sap/ui/fl/write/_internal/Storage",
|
|
24
|
+
"sap/ui/fl/Cache",
|
|
25
|
+
"sap/ui/fl/Change",
|
|
26
|
+
"sap/ui/fl/LayerUtils",
|
|
27
|
+
"sap/ui/fl/Layer",
|
|
28
|
+
"sap/ui/fl/Utils",
|
|
29
|
+
"sap/ui/fl/Variant",
|
|
30
|
+
"sap/ui/model/json/JSONModel",
|
|
31
|
+
"sap/ui/performance/Measurement"
|
|
31
32
|
], function(
|
|
32
|
-
|
|
33
|
-
StorageUtils,
|
|
34
|
-
Change,
|
|
35
|
-
Layer,
|
|
36
|
-
Variant,
|
|
37
|
-
Utils,
|
|
38
|
-
LayerUtils,
|
|
39
|
-
Cache,
|
|
40
|
-
Settings,
|
|
41
|
-
Applier,
|
|
42
|
-
Storage,
|
|
43
|
-
JsControlTreeModifier,
|
|
44
|
-
Component,
|
|
45
|
-
JSONModel,
|
|
46
|
-
Measurement,
|
|
33
|
+
union,
|
|
47
34
|
includes,
|
|
48
35
|
merge,
|
|
49
|
-
union,
|
|
50
36
|
UriParameters,
|
|
51
37
|
Log,
|
|
38
|
+
JsControlTreeModifier,
|
|
39
|
+
Component,
|
|
40
|
+
Applier,
|
|
41
|
+
ChangesUtils,
|
|
42
|
+
DependencyHandler,
|
|
52
43
|
VariantManagementState,
|
|
53
44
|
FlexState,
|
|
54
|
-
|
|
45
|
+
StorageUtils,
|
|
46
|
+
Settings,
|
|
47
|
+
Condenser,
|
|
48
|
+
Storage,
|
|
49
|
+
Cache,
|
|
50
|
+
Change,
|
|
51
|
+
LayerUtils,
|
|
52
|
+
Layer,
|
|
53
|
+
Utils,
|
|
54
|
+
Variant,
|
|
55
|
+
JSONModel,
|
|
56
|
+
Measurement
|
|
55
57
|
) {
|
|
56
58
|
"use strict";
|
|
57
59
|
|
|
@@ -60,10 +62,10 @@ sap.ui.define([
|
|
|
60
62
|
*
|
|
61
63
|
* @constructor
|
|
62
64
|
* @author SAP SE
|
|
63
|
-
* @version 1.
|
|
65
|
+
* @version 1.101.0
|
|
64
66
|
* @experimental Since 1.25.0
|
|
65
|
-
* @param {object} mComponent Component data to initiate <code>ChangePersistence</code> instance
|
|
66
|
-
* @param {string} mComponent.name Name of the component this instance is responsible for
|
|
67
|
+
* @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
|
|
68
|
+
* @param {string} mComponent.name - Name of the component this instance is responsible for
|
|
67
69
|
*/
|
|
68
70
|
var ChangePersistence = function(mComponent) {
|
|
69
71
|
this._mComponent = mComponent;
|
|
@@ -105,7 +107,7 @@ sap.ui.define([
|
|
|
105
107
|
* Return the name of the SAPUI5 component. All changes are assigned to 1 SAPUI5 component. The SAPUI5 component also serves as authorization
|
|
106
108
|
* object.
|
|
107
109
|
*
|
|
108
|
-
* @returns {
|
|
110
|
+
* @returns {string} component name
|
|
109
111
|
* @public
|
|
110
112
|
*/
|
|
111
113
|
ChangePersistence.prototype.getComponentName = function() {
|
|
@@ -133,19 +135,17 @@ sap.ui.define([
|
|
|
133
135
|
* @param {object} oChangeOrChangeContent Change instance or content of the change
|
|
134
136
|
*
|
|
135
137
|
* @returns {boolean} <code>true</code> if all the preconditions are fulfilled
|
|
136
|
-
* @public
|
|
137
138
|
*/
|
|
138
|
-
|
|
139
|
+
function preconditionsFulfilled(oChangeOrChangeContent) {
|
|
139
140
|
var oChangeContent = oChangeOrChangeContent instanceof Change ? oChangeOrChangeContent.getDefinition() : oChangeOrChangeContent;
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
142
|
+
var bControlVariantChange = false;
|
|
143
|
+
if ((oChangeContent.fileType === "ctrl_variant") || (oChangeContent.fileType === "ctrl_variant_change") || (oChangeContent.fileType === "ctrl_variant_management_change")) {
|
|
144
|
+
bControlVariantChange = oChangeContent.variantManagementReference || oChangeContent.variantReference || (oChangeContent.selector && oChangeContent.selector.id);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
return oChangeContent.fileType === "change" ||
|
|
148
|
-
}
|
|
147
|
+
return oChangeContent.fileType === "change" || bControlVariantChange;
|
|
148
|
+
}
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Calls the back end asynchronously and fetches all changes for the component
|
|
@@ -201,7 +201,7 @@ sap.ui.define([
|
|
|
201
201
|
if (sCurrentLayer) {
|
|
202
202
|
aChanges = LayerUtils.filterChangeOrChangeDefinitionsByCurrentLayer(aChanges, sCurrentLayer);
|
|
203
203
|
} else if (LayerUtils.isLayerFilteringRequired(this._oUShellURLParsingService) && bFilterMaxLayer) {
|
|
204
|
-
fnFilter =
|
|
204
|
+
fnFilter = filterChangeForMaxLayer.bind(this);
|
|
205
205
|
//If layer filtering required, excludes changes in higher layer than the max layer
|
|
206
206
|
aChanges = aChanges.filter(fnFilter);
|
|
207
207
|
} else if (this._bHasChangesOverMaxLayer && !bFilterMaxLayer) {
|
|
@@ -222,21 +222,21 @@ sap.ui.define([
|
|
|
222
222
|
|
|
223
223
|
ChangePersistence.prototype._checkAndGetChangeInstances = function(aChanges, oChangeFileContent) {
|
|
224
224
|
return aChanges
|
|
225
|
-
.filter(
|
|
225
|
+
.filter(preconditionsFulfilled)
|
|
226
226
|
.map(getChangeInstance.bind(this, oChangeFileContent));
|
|
227
227
|
};
|
|
228
228
|
|
|
229
|
-
|
|
230
|
-
if (LayerUtils.isOverMaxLayer(
|
|
229
|
+
function filterChangeForMaxLayer(oChangeOrChangeContent) {
|
|
230
|
+
if (LayerUtils.isOverMaxLayer(getLayerFromChangeOrChangeContent(oChangeOrChangeContent), this._oUShellURLParsingService)) {
|
|
231
231
|
if (!this._bHasChangesOverMaxLayer) {
|
|
232
232
|
this._bHasChangesOverMaxLayer = true;
|
|
233
233
|
}
|
|
234
234
|
return false;
|
|
235
235
|
}
|
|
236
236
|
return true;
|
|
237
|
-
}
|
|
237
|
+
}
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
function getLayerFromChangeOrChangeContent(oChangeOrChangeContent) {
|
|
240
240
|
var sChangeLayer;
|
|
241
241
|
if (oChangeOrChangeContent instanceof Variant || oChangeOrChangeContent instanceof Change) {
|
|
242
242
|
sChangeLayer = oChangeOrChangeContent.getLayer();
|
|
@@ -244,7 +244,7 @@ sap.ui.define([
|
|
|
244
244
|
sChangeLayer = oChangeOrChangeContent.layer;
|
|
245
245
|
}
|
|
246
246
|
return sChangeLayer;
|
|
247
|
-
}
|
|
247
|
+
}
|
|
248
248
|
|
|
249
249
|
ChangePersistence.prototype._getAllCtrlVariantChanges = function(oChangeFileContent, bIncludeCtrlVariants, fnFilter) {
|
|
250
250
|
if (!bIncludeCtrlVariants) {
|
|
@@ -445,40 +445,6 @@ sap.ui.define([
|
|
|
445
445
|
return this._bChangesMapCreated;
|
|
446
446
|
};
|
|
447
447
|
|
|
448
|
-
ChangePersistence.prototype.changesHavingCorrectViewPrefix = function(mPropertyBag, oChange) {
|
|
449
|
-
var oModifier = mPropertyBag.modifier;
|
|
450
|
-
var oAppComponent = mPropertyBag.appComponent;
|
|
451
|
-
var oSelector = oChange.getSelector();
|
|
452
|
-
if (!oSelector || !mPropertyBag) {
|
|
453
|
-
return false;
|
|
454
|
-
}
|
|
455
|
-
if (oSelector.viewSelector) {
|
|
456
|
-
var sSelectorViewId = oModifier.getControlIdBySelector(oSelector.viewSelector, oAppComponent);
|
|
457
|
-
return sSelectorViewId === mPropertyBag.viewId;
|
|
458
|
-
}
|
|
459
|
-
var sSelectorId = oSelector.id;
|
|
460
|
-
if (sSelectorId) {
|
|
461
|
-
var sViewId;
|
|
462
|
-
if (oChange.getSelector().idIsLocal) {
|
|
463
|
-
if (oAppComponent) {
|
|
464
|
-
sViewId = oAppComponent.getLocalId(mPropertyBag.viewId);
|
|
465
|
-
}
|
|
466
|
-
} else {
|
|
467
|
-
sViewId = mPropertyBag.viewId;
|
|
468
|
-
}
|
|
469
|
-
var iIndex = 0;
|
|
470
|
-
var sSelectorIdViewPrefix;
|
|
471
|
-
do {
|
|
472
|
-
iIndex = sSelectorId.indexOf("--", iIndex);
|
|
473
|
-
sSelectorIdViewPrefix = sSelectorId.slice(0, iIndex);
|
|
474
|
-
iIndex++;
|
|
475
|
-
} while (sSelectorIdViewPrefix !== sViewId && iIndex > 0);
|
|
476
|
-
|
|
477
|
-
return sSelectorIdViewPrefix === sViewId;
|
|
478
|
-
}
|
|
479
|
-
return false;
|
|
480
|
-
};
|
|
481
|
-
|
|
482
448
|
/**
|
|
483
449
|
* Gets the changes for the given view id. The complete view prefix has to match.
|
|
484
450
|
*
|
|
@@ -504,8 +470,8 @@ sap.ui.define([
|
|
|
504
470
|
*/
|
|
505
471
|
ChangePersistence.prototype.getChangesForView = function(mPropertyBag) {
|
|
506
472
|
return this.getChangesForComponent(mPropertyBag).then(function(aChanges) {
|
|
507
|
-
return aChanges.filter(
|
|
508
|
-
}
|
|
473
|
+
return aChanges.filter(ChangesUtils.filterChangeByView.bind(undefined, mPropertyBag));
|
|
474
|
+
});
|
|
509
475
|
};
|
|
510
476
|
|
|
511
477
|
/**
|
|
@@ -602,16 +568,12 @@ sap.ui.define([
|
|
|
602
568
|
function shouldCondensingBeEnabled(oAppComponent, aChanges) {
|
|
603
569
|
var bCondenserEnabled = false;
|
|
604
570
|
|
|
605
|
-
if (!oAppComponent || aChanges.length < 2) {
|
|
606
|
-
return false;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
if (!checkIfOnlyOne(aChanges, "getLayer")) {
|
|
571
|
+
if (!oAppComponent || aChanges.length < 2 || !checkIfOnlyOne(aChanges, "getLayer")) {
|
|
610
572
|
return false;
|
|
611
573
|
}
|
|
612
574
|
|
|
613
575
|
var sLayer = aChanges[0].getLayer();
|
|
614
|
-
if (
|
|
576
|
+
if ([Layer.CUSTOMER, Layer.USER].includes(sLayer)) {
|
|
615
577
|
bCondenserEnabled = true;
|
|
616
578
|
}
|
|
617
579
|
|
|
@@ -637,12 +599,15 @@ sap.ui.define([
|
|
|
637
599
|
this._deleteNotSavedChanges(aAllChanges, aCondensedChanges, bAlreadyDeletedViaCondense);
|
|
638
600
|
}
|
|
639
601
|
|
|
640
|
-
function getAllRelevantChangesForCondensing(aDirtyChanges) {
|
|
602
|
+
function getAllRelevantChangesForCondensing(aDirtyChanges, aDraftFilenames) {
|
|
641
603
|
if (!aDirtyChanges.length) {
|
|
642
604
|
return [];
|
|
643
605
|
}
|
|
644
606
|
var sLayer = aDirtyChanges[0].getLayer();
|
|
645
607
|
var aPersistedAndSameLayerChanges = this._mChanges.aChanges.filter(function(oChange) {
|
|
608
|
+
if (sLayer === Layer.CUSTOMER && aDraftFilenames) {
|
|
609
|
+
return oChange.getState() === Change.states.PERSISTED && aDraftFilenames.includes(oChange.getFileName());
|
|
610
|
+
}
|
|
646
611
|
return oChange.getState() === Change.states.PERSISTED && LayerUtils.compareAgainstCurrentLayer(oChange.getLayer(), sLayer) === 0;
|
|
647
612
|
});
|
|
648
613
|
return aPersistedAndSameLayerChanges.concat(aDirtyChanges);
|
|
@@ -660,11 +625,12 @@ sap.ui.define([
|
|
|
660
625
|
* therefore, the cache update of the current app is skipped because the dirty change is not saved for the running app.
|
|
661
626
|
* @param {sap.ui.fl.Change} [aChanges] - If passed only those changes are saved
|
|
662
627
|
* @param {string} sParentVersion - Parent version
|
|
628
|
+
* @param {string[]} [aDraftFilenames] - Filesnames from persisted changes draft version
|
|
663
629
|
* @returns {Promise} Resolving after all changes have been saved
|
|
664
630
|
*/
|
|
665
|
-
ChangePersistence.prototype.saveDirtyChanges = function(oAppComponent, bSkipUpdateCache, aChanges, sParentVersion) {
|
|
631
|
+
ChangePersistence.prototype.saveDirtyChanges = function(oAppComponent, bSkipUpdateCache, aChanges, sParentVersion, aDraftFilenames) {
|
|
666
632
|
var aDirtyChanges = aChanges || this._aDirtyChanges;
|
|
667
|
-
var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(this, aDirtyChanges);
|
|
633
|
+
var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(this, aDirtyChanges, aDraftFilenames);
|
|
668
634
|
var bIsCondensingEnabled = (
|
|
669
635
|
isBackendCondensingEnabled(aRelevantChangesForCondensing)
|
|
670
636
|
&& shouldCondensingBeEnabled(oAppComponent, aRelevantChangesForCondensing)
|
|
@@ -672,8 +638,8 @@ sap.ui.define([
|
|
|
672
638
|
var aAllChanges = bIsCondensingEnabled ? aRelevantChangesForCondensing : aDirtyChanges;
|
|
673
639
|
var aChangesClone = aAllChanges.slice(0);
|
|
674
640
|
var aDirtyChangesClone = aDirtyChanges.slice(0);
|
|
675
|
-
var aRequests =
|
|
676
|
-
var aStates =
|
|
641
|
+
var aRequests = getRequests(aDirtyChanges);
|
|
642
|
+
var aStates = getStates(aDirtyChanges);
|
|
677
643
|
|
|
678
644
|
if (aStates.length === 1 && aRequests.length === 1 && aStates[0] === Change.states.NEW) {
|
|
679
645
|
var oCondensedChangesPromise = Promise.resolve(aChangesClone);
|
|
@@ -699,7 +665,7 @@ sap.ui.define([
|
|
|
699
665
|
if (aCondensedChanges.length) {
|
|
700
666
|
return Storage.write({
|
|
701
667
|
layer: sLayer,
|
|
702
|
-
flexObjects:
|
|
668
|
+
flexObjects: prepareDirtyChanges(aCondensedChanges),
|
|
703
669
|
transport: sRequest,
|
|
704
670
|
isLegacyVariant: false,
|
|
705
671
|
parentVersion: sParentVersion
|
|
@@ -739,33 +705,32 @@ sap.ui.define([
|
|
|
739
705
|
|
|
740
706
|
return aDirtyChanges.reduce(function(oPreviousPromise, oDirtyChange) {
|
|
741
707
|
return oPreviousPromise
|
|
742
|
-
.then(
|
|
708
|
+
.then(performSingleSaveAction.bind(undefined, oDirtyChange, oFirstNewChange, sParentVersion))
|
|
743
709
|
.then(this._updateCacheAndDirtyState.bind(this, oDirtyChange, bSkipUpdateCache));
|
|
744
710
|
}.bind(this), Promise.resolve());
|
|
745
711
|
};
|
|
746
712
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
};
|
|
713
|
+
function performSingleSaveAction(oDirtyChange, oFirstChange, sParentVersion) {
|
|
714
|
+
switch (oDirtyChange.getState()) {
|
|
715
|
+
case Change.states.NEW:
|
|
716
|
+
if (sParentVersion !== undefined) {
|
|
717
|
+
sParentVersion = oDirtyChange === oFirstChange ? sParentVersion : sap.ui.fl.Versions.Draft;
|
|
718
|
+
}
|
|
719
|
+
return Storage.write({
|
|
720
|
+
layer: oDirtyChange.getLayer(),
|
|
721
|
+
flexObjects: [oDirtyChange.getDefinition()],
|
|
722
|
+
transport: oDirtyChange.getRequest(),
|
|
723
|
+
parentVersion: sParentVersion
|
|
724
|
+
});
|
|
725
|
+
case Change.states.DELETED:
|
|
726
|
+
return Storage.remove({
|
|
727
|
+
flexObject: oDirtyChange.getDefinition(),
|
|
728
|
+
layer: oDirtyChange.getLayer(),
|
|
729
|
+
transport: oDirtyChange.getRequest()
|
|
730
|
+
});
|
|
731
|
+
default:
|
|
732
|
+
}
|
|
733
|
+
}
|
|
769
734
|
|
|
770
735
|
/**
|
|
771
736
|
* Updates the cache with the dirty change passed and removes it from the array of dirty changes if present.
|
|
@@ -774,6 +739,10 @@ sap.ui.define([
|
|
|
774
739
|
* therefore, the cache update of the current app is skipped
|
|
775
740
|
*/
|
|
776
741
|
ChangePersistence.prototype._updateCacheAndDirtyState = function(oDirtyChange, bSkipUpdateCache) {
|
|
742
|
+
this._aDirtyChanges = this._aDirtyChanges.filter(function(oExistingDirtyChange) {
|
|
743
|
+
return oDirtyChange.getId() !== oExistingDirtyChange.getId();
|
|
744
|
+
});
|
|
745
|
+
|
|
777
746
|
if (!bSkipUpdateCache) {
|
|
778
747
|
if (Utils.isChangeRelatedToVariants(oDirtyChange)) {
|
|
779
748
|
VariantManagementState.updateVariantsState({
|
|
@@ -796,10 +765,6 @@ sap.ui.define([
|
|
|
796
765
|
}
|
|
797
766
|
}
|
|
798
767
|
}
|
|
799
|
-
|
|
800
|
-
this._aDirtyChanges = this._aDirtyChanges.filter(function(oExistingDirtyChange) {
|
|
801
|
-
return oDirtyChange.getId() !== oExistingDirtyChange.getId();
|
|
802
|
-
});
|
|
803
768
|
};
|
|
804
769
|
|
|
805
770
|
/**
|
|
@@ -813,7 +778,7 @@ sap.ui.define([
|
|
|
813
778
|
}, this);
|
|
814
779
|
};
|
|
815
780
|
|
|
816
|
-
|
|
781
|
+
function getRequests(aDirtyChanges) {
|
|
817
782
|
var aRequests = [];
|
|
818
783
|
|
|
819
784
|
aDirtyChanges.forEach(function(oChange) {
|
|
@@ -824,9 +789,9 @@ sap.ui.define([
|
|
|
824
789
|
});
|
|
825
790
|
|
|
826
791
|
return aRequests;
|
|
827
|
-
}
|
|
792
|
+
}
|
|
828
793
|
|
|
829
|
-
|
|
794
|
+
function getStates(aDirtyChanges) {
|
|
830
795
|
var aStates = [];
|
|
831
796
|
|
|
832
797
|
aDirtyChanges.forEach(function(oChange) {
|
|
@@ -837,9 +802,9 @@ sap.ui.define([
|
|
|
837
802
|
});
|
|
838
803
|
|
|
839
804
|
return aStates;
|
|
840
|
-
}
|
|
805
|
+
}
|
|
841
806
|
|
|
842
|
-
|
|
807
|
+
function prepareDirtyChanges(aDirtyChanges) {
|
|
843
808
|
var aChanges = [];
|
|
844
809
|
|
|
845
810
|
aDirtyChanges.forEach(function(oChange) {
|
|
@@ -847,7 +812,7 @@ sap.ui.define([
|
|
|
847
812
|
});
|
|
848
813
|
|
|
849
814
|
return aChanges;
|
|
850
|
-
}
|
|
815
|
+
}
|
|
851
816
|
|
|
852
817
|
ChangePersistence.prototype.getDirtyChanges = function() {
|
|
853
818
|
return this._aDirtyChanges;
|
|
@@ -909,6 +874,20 @@ sap.ui.define([
|
|
|
909
874
|
return (oObject.getRequest() === "$TMP" || oObject.getRequest() === "") && oObject.getLayer() === sLayer;
|
|
910
875
|
}
|
|
911
876
|
|
|
877
|
+
function isPersistedAndInLayer(sLayer, oObject) {
|
|
878
|
+
return oObject.getState() === Change.states.PERSISTED && oObject.getLayer() === sLayer;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
function getAllCompVariantsEntities() {
|
|
882
|
+
var aCompVariantEntities = [];
|
|
883
|
+
var mCompVariantsMap = FlexState.getCompVariantsMap(this.getComponentName());
|
|
884
|
+
for (var sPersistencyKey in mCompVariantsMap) {
|
|
885
|
+
for (var sId in mCompVariantsMap[sPersistencyKey].byId) {
|
|
886
|
+
aCompVariantEntities.push(mCompVariantsMap[sPersistencyKey].byId[sId]);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
return aCompVariantEntities;
|
|
890
|
+
}
|
|
912
891
|
/**
|
|
913
892
|
* Transports all the UI changes and app variant descriptor (if exists) to the target system
|
|
914
893
|
*
|
|
@@ -919,18 +898,8 @@ sap.ui.define([
|
|
|
919
898
|
* @returns {Promise} promise that resolves when all the artifacts are successfully transported
|
|
920
899
|
*/
|
|
921
900
|
ChangePersistence.prototype.transportAllUIChanges = function(oRootControl, sStyleClass, sLayer, aAppVariantDescriptors) {
|
|
922
|
-
return
|
|
923
|
-
|
|
924
|
-
FlexState.getCompVariantsMap(this.getComponentName())// FIXME: also transport comp changes via compState
|
|
925
|
-
]).then(function(aResponses) {
|
|
926
|
-
var aLocalChanges = aResponses[0];
|
|
927
|
-
var mCompVariantsMap = aResponses[1];
|
|
928
|
-
var aCompVariantEntities = [];
|
|
929
|
-
for (var sPersistencyKey in mCompVariantsMap) {
|
|
930
|
-
for (var sId in mCompVariantsMap[sPersistencyKey].byId) {
|
|
931
|
-
aCompVariantEntities.push(mCompVariantsMap[sPersistencyKey].byId[sId]);
|
|
932
|
-
}
|
|
933
|
-
}
|
|
901
|
+
return this.getChangesForComponent({currentLayer: sLayer, includeCtrlVariants: true}).then(function(aLocalChanges) {
|
|
902
|
+
var aCompVariantEntities = getAllCompVariantsEntities.call(this);
|
|
934
903
|
|
|
935
904
|
aLocalChanges = aLocalChanges.concat(
|
|
936
905
|
aCompVariantEntities.filter(isLocalAndInLayer.bind(this, sLayer)));
|
|
@@ -962,10 +931,10 @@ sap.ui.define([
|
|
|
962
931
|
};
|
|
963
932
|
|
|
964
933
|
/**
|
|
965
|
-
* Removes unsaved changes
|
|
934
|
+
* Removes unsaved changes.
|
|
966
935
|
*
|
|
967
|
-
* @param {string|string[]} vLayer - Layer or multiple layers for which changes shall be deleted
|
|
968
|
-
* @param {sap.ui.core.Component} oComponent - Component instance
|
|
936
|
+
* @param {string|string[]} [vLayer] - Layer or multiple layers for which changes shall be deleted. If omitted, changes on all layers are considered.
|
|
937
|
+
* @param {sap.ui.core.Component} [oComponent] - Component instance, required if oControl is specified
|
|
969
938
|
* @param {string} [oControl] - Control for which the changes should be deleted. If omitted, all changes for the app component are considered.
|
|
970
939
|
* @param {string} [sGenerator] - Generator of changes (optional)
|
|
971
940
|
* @param {string[]} [aChangeTypes] - Types of changes (optional)
|
|
@@ -973,13 +942,13 @@ sap.ui.define([
|
|
|
973
942
|
* @returns {Promise} Promise that resolves after the deletion took place
|
|
974
943
|
*/
|
|
975
944
|
ChangePersistence.prototype.removeDirtyChanges = function(vLayer, oComponent, oControl, sGenerator, aChangeTypes) {
|
|
976
|
-
var aLayers = [].concat(vLayer);
|
|
945
|
+
var aLayers = [].concat(vLayer || []);
|
|
977
946
|
var aDirtyChanges = this._aDirtyChanges;
|
|
978
947
|
|
|
979
948
|
var aChangesToBeRemoved = aDirtyChanges.filter(function (oChange) {
|
|
980
949
|
var bChangeValid = true;
|
|
981
950
|
|
|
982
|
-
if (!aLayers.includes(oChange.getLayer())) {
|
|
951
|
+
if (aLayers.length && !aLayers.includes(oChange.getLayer())) {
|
|
983
952
|
return false;
|
|
984
953
|
}
|
|
985
954
|
|
|
@@ -1024,10 +993,16 @@ sap.ui.define([
|
|
|
1024
993
|
var bSelectorIdsProvided = aSelectorIds && aSelectorIds.length > 0;
|
|
1025
994
|
var bChangeTypesProvided = aChangeTypes && aChangeTypes.length > 0;
|
|
1026
995
|
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
996
|
+
//In case of application reset and PUBLIC layer available, also includes comp variant entities
|
|
997
|
+
var isPublicLayerAvailable = Settings.getInstanceOrUndef() && Settings.getInstanceOrUndef().isPublicLayerAvailable();
|
|
998
|
+
var isApplicationReset = sGenerator === undefined && aSelectorIds === undefined && aChangeTypes === undefined;
|
|
999
|
+
var aCompVariantsEntries = [];
|
|
1000
|
+
if (isPublicLayerAvailable && isApplicationReset) {
|
|
1001
|
+
aCompVariantsEntries = getAllCompVariantsEntities.call(this).filter(isPersistedAndInLayer.bind(this, sLayer));
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
return this.getChangesForComponent({ currentLayer: sLayer, includeCtrlVariants: true}).then(function(aChanges) {
|
|
1005
|
+
aChanges = aChanges.concat(aCompVariantsEntries);
|
|
1031
1006
|
var mParams = {
|
|
1032
1007
|
reference: this.getComponentName(),
|
|
1033
1008
|
layer: sLayer,
|
|
@@ -1062,18 +1037,5 @@ sap.ui.define([
|
|
|
1062
1037
|
}.bind(this));
|
|
1063
1038
|
};
|
|
1064
1039
|
|
|
1065
|
-
/**
|
|
1066
|
-
* Send a flex/info request to the backend.
|
|
1067
|
-
*
|
|
1068
|
-
* @param {object} mPropertyBag Contains additional data needed for checking flex/info
|
|
1069
|
-
* @param {sap.ui.fl.Selector} mPropertyBag.selector Selector
|
|
1070
|
-
* @param {string} mPropertyBag.layer Layer on which the request is sent to the backend
|
|
1071
|
-
*
|
|
1072
|
-
* @returns {Promise<boolean>} Resolves the information if the application has content that can be reset and/or published
|
|
1073
|
-
*/
|
|
1074
|
-
ChangePersistence.prototype.getResetAndPublishInfo = function(mPropertyBag) {
|
|
1075
|
-
return Storage.getFlexInfo(mPropertyBag);
|
|
1076
|
-
};
|
|
1077
|
-
|
|
1078
1040
|
return ChangePersistence;
|
|
1079
1041
|
});
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @alias sap.ui.fl.ChangePersistenceFactory
|
|
31
31
|
* @experimental Since 1.27.0
|
|
32
32
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.101.0
|
|
34
34
|
* @private
|
|
35
35
|
* @ui5-restricted sap.ui.fl
|
|
36
36
|
*/
|
|
@@ -40,7 +40,7 @@ sap.ui.define([
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Creates or returns an instance of the ChangePersistence
|
|
43
|
-
* @param {
|
|
43
|
+
* @param {string} sComponentName - Name of the component
|
|
44
44
|
* @returns {sap.ui.fl.ChangePersistence} <code>ChangePersistence</code> instance
|
|
45
45
|
*/
|
|
46
46
|
ChangePersistenceFactory.getChangePersistenceForComponent = function(sComponentName) {
|
|
@@ -15,15 +15,14 @@ function(
|
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Utility for storing changes in local storage.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @namespace
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.101.0
|
|
24
24
|
*
|
|
25
25
|
* @private
|
|
26
|
-
* @static
|
|
27
26
|
* @since 1.48
|
|
28
27
|
* @alias sap.ui.fl.FakeLrepConnectorLocalStorage
|
|
29
28
|
*/
|
|
@@ -15,15 +15,14 @@ function(
|
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Utility for storing changes in session storage.
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @namespace
|
|
21
21
|
*
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.101.0
|
|
24
24
|
*
|
|
25
25
|
* @private
|
|
26
|
-
* @static
|
|
27
26
|
* @since 1.58
|
|
28
27
|
* @alias sap.ui.fl.FakeLrepConnectorSessionStorage
|
|
29
28
|
*/
|
|
@@ -10,16 +10,16 @@ sap.ui.define([
|
|
|
10
10
|
FakeLrepConnectorLocalStorage
|
|
11
11
|
) {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Utility handling the Fake Lrep storage for local storage;
|
|
14
|
+
*
|
|
14
15
|
* This class stays since some tests are still using this internal; We will remove this in the near future.
|
|
15
16
|
*
|
|
16
|
-
* @
|
|
17
|
+
* @namespace
|
|
17
18
|
*
|
|
18
19
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
20
|
+
* @version 1.101.0
|
|
20
21
|
*
|
|
21
22
|
* @private
|
|
22
|
-
* @static
|
|
23
23
|
* @since 1.48
|
|
24
24
|
* @alias sap.ui.fl.FakeLrepLocalStorage
|
|
25
25
|
*/
|