@openui5/sap.ui.fl 1.113.0 → 1.114.1
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 +1 -1
- 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/ChangePersistence.js +1 -1
- package/src/sap/ui/fl/ChangePersistenceFactory.js +3 -55
- 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/FlexController.js +1 -1
- package/src/sap/ui/fl/FlexControllerFactory.js +7 -159
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/ChangesController.js +0 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +4 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +12 -7
- 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/AddNewInbound.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/RemoveAllInboundsExceptOne.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/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +33 -13
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +8 -15
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +44 -25
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +2 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +20 -2
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +11 -9
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +4 -2
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +2 -2
- 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/compVariants/CompVariantMerger.js +21 -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 +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +219 -0
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +7 -9
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +29 -9
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +6 -0
- 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 +6 -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/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 +3 -1
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +3 -22
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +40 -12
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +3 -1
- 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 +43 -43
- package/src/sap/ui/fl/messagebundle.properties +4 -1
- package/src/sap/ui/fl/requireAsync.js +6 -0
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- 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 +1 -1
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantModel.js +77 -3
- package/src/sap/ui/fl/variants/context/Component.js +11 -0
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +4 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n.properties +2 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_ar.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_bg.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_ca.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_cs.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_cy.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_da.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_de.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_el.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_en.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_GB.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_sappsd.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saprigi.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_es.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_es_MX.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_et.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_fi.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_fr_CA.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_hi.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_hr.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_hu.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_id.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_it.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_iw.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_ja.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_kk.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_ko.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_lt.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_lv.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_ms.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_nl.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_no.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_pl.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_pt_PT.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_ro.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_ru.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_sh.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_sk.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_sl.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_sv.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_th.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_tr.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_uk.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_vi.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_CN.properties +1 -0
- package/src/sap/ui/fl/variants/context/i18n/i18n_zh_TW.properties +1 -0
- package/src/sap/ui/fl/variants/context/view/ContextVisibility.view.xml +1 -1
- package/src/sap/ui/fl/write/_internal/Storage.js +20 -2
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +133 -107
- 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 +23 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +35 -8
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +17 -2
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +8 -5
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +6 -0
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +17 -5
- 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 +11 -3
- 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/FlexObjectState.js +21 -10
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +39 -11
- 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/Adaptations.js +23 -0
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +16 -2
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +809 -56
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +7 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +5 -2
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +10 -0
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +29 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +73 -10
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +6 -0
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +0 -115
|
@@ -23,7 +23,7 @@ sap.ui.define([
|
|
|
23
23
|
* Only available during build time {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
24
24
|
*
|
|
25
25
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith
|
|
26
|
-
* @version 1.
|
|
26
|
+
* @version 1.114.1
|
|
27
27
|
* @private
|
|
28
28
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
29
29
|
*/
|
package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js
CHANGED
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Only available during build time {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.SetFlexExtensionPointEnabled
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.114.1
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -21,7 +21,7 @@ sap.ui.define([
|
|
|
21
21
|
* Only available during build time {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
22
22
|
*
|
|
23
23
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ui5.SetMinUI5Version
|
|
24
|
-
* @version 1.
|
|
24
|
+
* @version 1.114.1
|
|
25
25
|
* @private
|
|
26
26
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
27
27
|
*/
|
|
@@ -12,7 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/Layer",
|
|
13
13
|
"sap/ui/fl/registry/Settings",
|
|
14
14
|
"sap/ui/fl/Utils"
|
|
15
|
-
], function
|
|
15
|
+
], function(
|
|
16
16
|
_pick,
|
|
17
17
|
States,
|
|
18
18
|
Variant,
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @extends sap.ui.fl.apply._internal.flexObjects.Variant
|
|
33
33
|
* @alias sap.ui.fl.apply._internal.flexObjects.CompVariant
|
|
34
34
|
* @since 1.103
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.114.1
|
|
36
36
|
* @private
|
|
37
37
|
* @ui5-restricted sap.ui.fl, sap.ui.comp
|
|
38
38
|
*/
|
|
@@ -93,7 +93,7 @@ sap.ui.define([
|
|
|
93
93
|
* @returns {object} Mapping information
|
|
94
94
|
* @static
|
|
95
95
|
*/
|
|
96
|
-
CompVariant.getMappingInfo = function
|
|
96
|
+
CompVariant.getMappingInfo = function() {
|
|
97
97
|
return Object.assign(Variant.getMappingInfo(), {
|
|
98
98
|
persistencyKey: "selector.persistencyKey",
|
|
99
99
|
variantId: "variantId"
|
|
@@ -105,7 +105,7 @@ sap.ui.define([
|
|
|
105
105
|
* Can be overridden to avoid access of static mapping within base methods.
|
|
106
106
|
* @returns {object} Mapping information
|
|
107
107
|
*/
|
|
108
|
-
CompVariant.prototype.getMappingInfo = function
|
|
108
|
+
CompVariant.prototype.getMappingInfo = function() {
|
|
109
109
|
return CompVariant.getMappingInfo();
|
|
110
110
|
};
|
|
111
111
|
|
|
@@ -180,7 +180,7 @@ sap.ui.define([
|
|
|
180
180
|
* Used by the SmartVariantManagement control.
|
|
181
181
|
* @returns {boolean} <code>true</code> if object is a variant
|
|
182
182
|
*/
|
|
183
|
-
CompVariant.prototype.isVariant = function
|
|
183
|
+
CompVariant.prototype.isVariant = function() {
|
|
184
184
|
return true;
|
|
185
185
|
};
|
|
186
186
|
|
|
@@ -189,7 +189,7 @@ sap.ui.define([
|
|
|
189
189
|
* @param {sap.ui.fl.Layer} [sLayer] - Layer in which the edition may take place
|
|
190
190
|
* @returns {boolean} <code>true</code> if the variant can be updated
|
|
191
191
|
*/
|
|
192
|
-
CompVariant.prototype.isRenameEnabled = function
|
|
192
|
+
CompVariant.prototype.isRenameEnabled = function(sLayer) {
|
|
193
193
|
return !this.getStandardVariant()
|
|
194
194
|
&& this.isEditEnabled(sLayer)
|
|
195
195
|
&& isRenameEnableDueToOriginalLanguage(this.getSupportInformation().originalLanguage);
|
|
@@ -200,7 +200,7 @@ sap.ui.define([
|
|
|
200
200
|
* @param {sap.ui.fl.Layer} [sActiveLayer] - Layer in which the edition may take place
|
|
201
201
|
* @returns {boolean} <code>true</code> if the variant can be updated
|
|
202
202
|
*/
|
|
203
|
-
CompVariant.prototype.isEditEnabled = function
|
|
203
|
+
CompVariant.prototype.isEditEnabled = function(sActiveLayer) {
|
|
204
204
|
var bDeveloperLayer = sActiveLayer && LayerUtils.isDeveloperLayer(sActiveLayer);
|
|
205
205
|
var bOriginSystem = isOriginSystem(
|
|
206
206
|
this.getSupportInformation().sourceSystem,
|
|
@@ -215,7 +215,7 @@ sap.ui.define([
|
|
|
215
215
|
* @param {sap.ui.fl.Layer} [sLayer] - Layer in which the deletion may take place
|
|
216
216
|
* @returns {boolean} <code>true</code> if the variant file can be deleted
|
|
217
217
|
*/
|
|
218
|
-
CompVariant.prototype.isDeleteEnabled = function
|
|
218
|
+
CompVariant.prototype.isDeleteEnabled = function(sLayer) {
|
|
219
219
|
var bOriginSystem = isOriginSystem(
|
|
220
220
|
this.getSupportInformation().sourceSystem,
|
|
221
221
|
this.getSupportInformation().sourceClient
|
|
@@ -232,13 +232,27 @@ sap.ui.define([
|
|
|
232
232
|
* @private
|
|
233
233
|
* @ui5-restricted sap.ui.fl
|
|
234
234
|
*/
|
|
235
|
-
CompVariant.prototype.storeFavorite = function
|
|
235
|
+
CompVariant.prototype.storeFavorite = function(bFavorite) {
|
|
236
236
|
if (bFavorite !== this.getFavorite()) {
|
|
237
237
|
this.setState(States.LifecycleState.DIRTY);
|
|
238
238
|
this.setFavorite(bFavorite);
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Sets the 'visible' flag of the runtime instance as well as the persistent representation.
|
|
244
|
+
* This results in setting the definition as well as flagging the entity as 'dirty'.
|
|
245
|
+
* @param {boolean} bVisible - Boolean to which the 'visible' flag should be set
|
|
246
|
+
* @private
|
|
247
|
+
* @ui5-restricted sap.ui.fl
|
|
248
|
+
*/
|
|
249
|
+
CompVariant.prototype.storeVisible = function(bVisible) {
|
|
250
|
+
if (bVisible !== this.getVisible()) {
|
|
251
|
+
this.setState(States.LifecycleState.DIRTY);
|
|
252
|
+
this.setVisible(bVisible);
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
|
|
242
256
|
/**
|
|
243
257
|
* Retrieves the owner ID (user)
|
|
244
258
|
* @returns {string} User ID
|
|
@@ -254,7 +268,7 @@ sap.ui.define([
|
|
|
254
268
|
* @private
|
|
255
269
|
* @ui5-restricted sap.ui.fl
|
|
256
270
|
*/
|
|
257
|
-
CompVariant.prototype.storeContent = function
|
|
271
|
+
CompVariant.prototype.storeContent = function(oContent) {
|
|
258
272
|
// setContent() already sets the dirty state by default
|
|
259
273
|
this.setContent(oContent);
|
|
260
274
|
};
|
|
@@ -266,7 +280,7 @@ sap.ui.define([
|
|
|
266
280
|
* @private
|
|
267
281
|
* @ui5-restricted sap.ui.fl
|
|
268
282
|
*/
|
|
269
|
-
CompVariant.prototype.storeExecuteOnSelection = function
|
|
283
|
+
CompVariant.prototype.storeExecuteOnSelection = function(bExecuteOnSelection) {
|
|
270
284
|
if (bExecuteOnSelection !== this.getExecuteOnSelection()) {
|
|
271
285
|
this.setState(States.LifecycleState.DIRTY);
|
|
272
286
|
this.setExecuteOnSelection(bExecuteOnSelection);
|
|
@@ -280,7 +294,7 @@ sap.ui.define([
|
|
|
280
294
|
* @private
|
|
281
295
|
* @ui5-restricted sap.ui.fl
|
|
282
296
|
*/
|
|
283
|
-
CompVariant.prototype.storeName = function
|
|
297
|
+
CompVariant.prototype.storeName = function(sName) {
|
|
284
298
|
// setName() already sets the dirty state by default
|
|
285
299
|
this.setName(sName);
|
|
286
300
|
};
|
|
@@ -291,10 +305,16 @@ sap.ui.define([
|
|
|
291
305
|
* @private
|
|
292
306
|
* @ui5-restricted sap.ui.fl
|
|
293
307
|
*/
|
|
294
|
-
CompVariant.prototype.storeContexts = function
|
|
308
|
+
CompVariant.prototype.storeContexts = function(mContexts) {
|
|
295
309
|
this.setContexts(mContexts);
|
|
296
310
|
this.setState(States.LifecycleState.DIRTY);
|
|
297
311
|
};
|
|
298
312
|
|
|
313
|
+
CompVariant.prototype.cloneFileContentWithNewId = function() {
|
|
314
|
+
var mFileContent = Variant.prototype.cloneFileContentWithNewId.apply(this, arguments);
|
|
315
|
+
mFileContent.variantId = mFileContent.fileName;
|
|
316
|
+
return mFileContent;
|
|
317
|
+
};
|
|
318
|
+
|
|
299
319
|
return CompVariant;
|
|
300
320
|
});
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
21
21
|
* @alias sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange
|
|
22
22
|
* @since 1.105
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.114.1
|
|
24
24
|
* @private
|
|
25
25
|
* @ui5-restricted sap.ui.fl
|
|
26
26
|
*/
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @extends sap.ui.fl.apply._internal.flexObjects.Variant
|
|
25
25
|
* @alias sap.ui.fl.apply._internal.flexObjects.FlVariant
|
|
26
26
|
* @since 1.104
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.114.1
|
|
28
28
|
* @private
|
|
29
29
|
* @ui5-restricted sap.ui.fl
|
|
30
30
|
*/
|
|
@@ -43,13 +43,6 @@ sap.ui.define([
|
|
|
43
43
|
*/
|
|
44
44
|
variantManagementReference: {
|
|
45
45
|
type: "string"
|
|
46
|
-
},
|
|
47
|
-
/**
|
|
48
|
-
* Indicates if the variant should be shown to the user.
|
|
49
|
-
*/
|
|
50
|
-
visible: {
|
|
51
|
-
type: "boolean",
|
|
52
|
-
defaultValue: true
|
|
53
46
|
}
|
|
54
47
|
}
|
|
55
48
|
},
|
|
@@ -69,11 +62,6 @@ sap.ui.define([
|
|
|
69
62
|
this.setName(mSettings.content.title);
|
|
70
63
|
}
|
|
71
64
|
|
|
72
|
-
var aTitleKeyMatch = this.getName().match(/.i18n>(\w+)./);
|
|
73
|
-
if (aTitleKeyMatch) {
|
|
74
|
-
this.setName(Core.getLibraryResourceBundle("sap.ui.fl").getText(aTitleKeyMatch[1]));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
65
|
var oSupportInfo = this.getSupportInformation();
|
|
78
66
|
if (this.getId() === this.getVariantManagementReference()) {
|
|
79
67
|
this.setStandardVariant(true);
|
|
@@ -90,7 +78,7 @@ sap.ui.define([
|
|
|
90
78
|
* @returns {object} Mapping information
|
|
91
79
|
* @static
|
|
92
80
|
*/
|
|
93
|
-
FlVariant.getMappingInfo = function
|
|
81
|
+
FlVariant.getMappingInfo = function() {
|
|
94
82
|
return Object.assign(Variant.getMappingInfo(), {
|
|
95
83
|
variantReference: "variantReference",
|
|
96
84
|
variantManagementReference: "variantManagementReference"
|
|
@@ -102,9 +90,14 @@ sap.ui.define([
|
|
|
102
90
|
* Can be overridden to avoid access of static mapping within base methods.
|
|
103
91
|
* @returns {object} Mapping information
|
|
104
92
|
*/
|
|
105
|
-
FlVariant.prototype.getMappingInfo = function
|
|
93
|
+
FlVariant.prototype.getMappingInfo = function() {
|
|
106
94
|
return FlVariant.getMappingInfo();
|
|
107
95
|
};
|
|
108
96
|
|
|
97
|
+
FlVariant.prototype.cloneFileContentWithNewId = function() {
|
|
98
|
+
var mFileContent = Variant.prototype.cloneFileContentWithNewId.apply(this, arguments);
|
|
99
|
+
return mFileContent;
|
|
100
|
+
};
|
|
101
|
+
|
|
109
102
|
return FlVariant;
|
|
110
103
|
});
|
|
@@ -69,13 +69,19 @@ sap.ui.define([
|
|
|
69
69
|
* @extends sap.ui.base.ManagedObject
|
|
70
70
|
* @alias sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
71
71
|
* @since 1.100
|
|
72
|
-
* @version 1.
|
|
72
|
+
* @version 1.114.1
|
|
73
73
|
* @private
|
|
74
74
|
* @ui5-restricted sap.ui.fl
|
|
75
75
|
*/
|
|
76
76
|
var FlexObject = ManagedObject.extend("sap.ui.fl.apply._internal.flexObjects.FlexObject", /* @lends sap.ui.fl.apply._internal.flexObjects.FlexObject.prototype */ {
|
|
77
77
|
metadata: {
|
|
78
78
|
properties: {
|
|
79
|
+
/**
|
|
80
|
+
* AdaptationId of the flex object
|
|
81
|
+
*/
|
|
82
|
+
adaptationId: {
|
|
83
|
+
type: "string"
|
|
84
|
+
},
|
|
79
85
|
/**
|
|
80
86
|
* Current state of the flex object regarding the persistence.
|
|
81
87
|
* See {@link sap.ui.fl.apply._internal.flexObjects.States.LifecycleState}.
|
|
@@ -154,7 +160,7 @@ sap.ui.define([
|
|
|
154
160
|
* @returns {object} Mapping information
|
|
155
161
|
* @static
|
|
156
162
|
*/
|
|
157
|
-
FlexObject.getMappingInfo = function
|
|
163
|
+
FlexObject.getMappingInfo = function() {
|
|
158
164
|
return Object.assign({}, {
|
|
159
165
|
"flexObjectMetadata.changeType": "changeType",
|
|
160
166
|
"flexObjectMetadata.reference": "reference",
|
|
@@ -164,6 +170,7 @@ sap.ui.define([
|
|
|
164
170
|
"flexObjectMetadata.packageName": "packageName",
|
|
165
171
|
"flexObjectMetadata.moduleName": "moduleName",
|
|
166
172
|
"supportInformation.generator": "support.generator",
|
|
173
|
+
"supportInformation.clonedFrom": "support.clonedFrom",
|
|
167
174
|
"supportInformation.service": "support.service",
|
|
168
175
|
"supportInformation.sourceSystem": "sourceSystem",
|
|
169
176
|
"supportInformation.sourceClient": "sourceClient",
|
|
@@ -174,6 +181,7 @@ sap.ui.define([
|
|
|
174
181
|
"supportInformation.command": "support.command",
|
|
175
182
|
"supportInformation.oDataInformation": "oDataInformation",
|
|
176
183
|
"supportInformation.originalLanguage": "originalLanguage",
|
|
184
|
+
adaptationId: "adaptationId",
|
|
177
185
|
layer: "layer",
|
|
178
186
|
fileType: "fileType",
|
|
179
187
|
id: "fileName",
|
|
@@ -187,7 +195,7 @@ sap.ui.define([
|
|
|
187
195
|
* Can be overridden to avoid access of static mapping within base methods.
|
|
188
196
|
* @returns {object} Mapping information
|
|
189
197
|
*/
|
|
190
|
-
FlexObject.prototype.getMappingInfo = function
|
|
198
|
+
FlexObject.prototype.getMappingInfo = function() {
|
|
191
199
|
return FlexObject.getMappingInfo();
|
|
192
200
|
};
|
|
193
201
|
|
|
@@ -197,7 +205,7 @@ sap.ui.define([
|
|
|
197
205
|
* @param {boolean} [bSkipStateChange] - If set to true, doesn't set the state to dirty
|
|
198
206
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} <code>this</code> for chaining
|
|
199
207
|
*/
|
|
200
|
-
FlexObject.prototype.setContent = function
|
|
208
|
+
FlexObject.prototype.setContent = function(oContent, bSkipStateChange) {
|
|
201
209
|
this.setProperty("content", oContent);
|
|
202
210
|
if (!bSkipStateChange) {
|
|
203
211
|
this.setState(States.LifecycleState.DIRTY);
|
|
@@ -209,7 +217,7 @@ sap.ui.define([
|
|
|
209
217
|
* Getter for additional flex object metadata.
|
|
210
218
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject.FlexObjectMetadata} Additional metadata
|
|
211
219
|
*/
|
|
212
|
-
FlexObject.prototype.getFlexObjectMetadata = function
|
|
220
|
+
FlexObject.prototype.getFlexObjectMetadata = function() {
|
|
213
221
|
return Object.assign({}, this.getProperty("flexObjectMetadata"));
|
|
214
222
|
};
|
|
215
223
|
|
|
@@ -217,7 +225,7 @@ sap.ui.define([
|
|
|
217
225
|
* Getter for flex object support information.
|
|
218
226
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject.SupportInformation} Support information
|
|
219
227
|
*/
|
|
220
|
-
FlexObject.prototype.getSupportInformation = function
|
|
228
|
+
FlexObject.prototype.getSupportInformation = function() {
|
|
221
229
|
return Object.assign({}, this.getProperty("supportInformation"));
|
|
222
230
|
};
|
|
223
231
|
|
|
@@ -240,7 +248,7 @@ sap.ui.define([
|
|
|
240
248
|
* @param {sap.ui.fl.apply._internal.flexObjects.States.LifecycleState} sState - New state
|
|
241
249
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} <code>this</code> for chaining
|
|
242
250
|
*/
|
|
243
|
-
FlexObject.prototype.setState = function
|
|
251
|
+
FlexObject.prototype.setState = function(sState) {
|
|
244
252
|
var sCurrentState = this.getState();
|
|
245
253
|
if (sCurrentState !== sState && isValidStateChange(sState, sCurrentState)) {
|
|
246
254
|
this._sPreviousState = sCurrentState;
|
|
@@ -256,7 +264,7 @@ sap.ui.define([
|
|
|
256
264
|
/**
|
|
257
265
|
* Changes the state of the flex object to DELETED.
|
|
258
266
|
*/
|
|
259
|
-
FlexObject.prototype.markForDeletion = function
|
|
267
|
+
FlexObject.prototype.markForDeletion = function() {
|
|
260
268
|
this.setState(States.LifecycleState.DELETED);
|
|
261
269
|
};
|
|
262
270
|
|
|
@@ -264,7 +272,7 @@ sap.ui.define([
|
|
|
264
272
|
* Restores the state before the last state change.
|
|
265
273
|
* Cannot go back further than the previous state.
|
|
266
274
|
*/
|
|
267
|
-
FlexObject.prototype.restorePreviousState = function
|
|
275
|
+
FlexObject.prototype.restorePreviousState = function() {
|
|
268
276
|
if (this._sPreviousState) {
|
|
269
277
|
this.setState(this._sPreviousState);
|
|
270
278
|
delete this._sPreviousState;
|
|
@@ -275,7 +283,7 @@ sap.ui.define([
|
|
|
275
283
|
* Checks if flex object is read only because of its source system.
|
|
276
284
|
* @returns {boolean} <code>true</code> if the flex object is from another system
|
|
277
285
|
*/
|
|
278
|
-
FlexObject.prototype.isChangeFromOtherSystem = function
|
|
286
|
+
FlexObject.prototype.isChangeFromOtherSystem = function() {
|
|
279
287
|
var sSourceSystem = this.getSupportInformation().sourceSystem;
|
|
280
288
|
var sSourceClient = this.getSupportInformation().sourceClient;
|
|
281
289
|
if (!sSourceSystem || !sSourceClient) {
|
|
@@ -313,7 +321,7 @@ sap.ui.define([
|
|
|
313
321
|
* Returns <code>true</code> if the flex object is user dependent.
|
|
314
322
|
* @returns {boolean} <code>true</code> if the flex object is only relevant for the current user
|
|
315
323
|
*/
|
|
316
|
-
FlexObject.prototype.isUserDependent = function
|
|
324
|
+
FlexObject.prototype.isUserDependent = function() {
|
|
317
325
|
return this.getLayer() === Layer.USER;
|
|
318
326
|
};
|
|
319
327
|
|
|
@@ -322,7 +330,7 @@ sap.ui.define([
|
|
|
322
330
|
* @param {string} sTextId - Text ID which was used as part of the <code>texts</code> property
|
|
323
331
|
* @returns {string} The text for the given text ID
|
|
324
332
|
*/
|
|
325
|
-
FlexObject.prototype.getText = function
|
|
333
|
+
FlexObject.prototype.getText = function(sTextId) {
|
|
326
334
|
var oText = this.getTexts()[sTextId] || {};
|
|
327
335
|
return oText.value || "";
|
|
328
336
|
};
|
|
@@ -335,7 +343,7 @@ sap.ui.define([
|
|
|
335
343
|
* @param {boolean} [bSkipStateChange] - If set to <code>true</code>, doesn't set the state to dirty
|
|
336
344
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject} <code>this</code> context for chaining
|
|
337
345
|
*/
|
|
338
|
-
FlexObject.prototype.setText = function
|
|
346
|
+
FlexObject.prototype.setText = function(sTextId, sNewText, sType, bSkipStateChange) {
|
|
339
347
|
var oTexts = Object.assign({}, this.getTexts());
|
|
340
348
|
var oNewText = {
|
|
341
349
|
value: sNewText
|
|
@@ -358,7 +366,7 @@ sap.ui.define([
|
|
|
358
366
|
* Also used by the SmartVariantManagement control.
|
|
359
367
|
* @param {string} sRequest - Transport request
|
|
360
368
|
*/
|
|
361
|
-
FlexObject.prototype.setRequest = function
|
|
369
|
+
FlexObject.prototype.setRequest = function(sRequest) {
|
|
362
370
|
this._sRequest = sRequest;
|
|
363
371
|
};
|
|
364
372
|
|
|
@@ -367,7 +375,7 @@ sap.ui.define([
|
|
|
367
375
|
* Also used by the SmartVariantManagement control.
|
|
368
376
|
* @returns {string} Transport request
|
|
369
377
|
*/
|
|
370
|
-
FlexObject.prototype.getRequest = function
|
|
378
|
+
FlexObject.prototype.getRequest = function() {
|
|
371
379
|
return this._sRequest || "";
|
|
372
380
|
};
|
|
373
381
|
|
|
@@ -380,6 +388,7 @@ sap.ui.define([
|
|
|
380
388
|
* calling this function with e.g. Variants
|
|
381
389
|
* Should be removed after all consumers are adjusted.
|
|
382
390
|
* @returns {object} file content as JSON object
|
|
391
|
+
* @deprecated As of version 1.100
|
|
383
392
|
*/
|
|
384
393
|
FlexObject.prototype.getDefinition = function() {
|
|
385
394
|
return this.convertToFileContent();
|
|
@@ -404,7 +413,7 @@ sap.ui.define([
|
|
|
404
413
|
function getOriginalMutator(sFunctionName) {
|
|
405
414
|
return typeof this[sFunctionName] === "function"
|
|
406
415
|
? this[sFunctionName].bind(this)
|
|
407
|
-
: function
|
|
416
|
+
: function() {
|
|
408
417
|
throw new Error(sFunctionName + " is not a valid mutator");
|
|
409
418
|
};
|
|
410
419
|
}
|
|
@@ -416,14 +425,14 @@ sap.ui.define([
|
|
|
416
425
|
var fnGetter = getOriginalMutator.call(this, "get" + sFunctionName);
|
|
417
426
|
var fnSetter = getOriginalMutator.call(this, "set" + sFunctionName);
|
|
418
427
|
return {
|
|
419
|
-
getValue: function
|
|
428
|
+
getValue: function() {
|
|
420
429
|
var vCurrentValue = deepClone(fnGetter());
|
|
421
430
|
if (aInstanceParts.length > 0) {
|
|
422
431
|
return ObjectPath.get(aInstanceParts, vCurrentValue);
|
|
423
432
|
}
|
|
424
433
|
return vCurrentValue;
|
|
425
434
|
},
|
|
426
|
-
setValue: function
|
|
435
|
+
setValue: function(vValue) {
|
|
427
436
|
var vPropertyValue = deepClone(fnGetter());
|
|
428
437
|
if (aInstanceParts.length > 0) {
|
|
429
438
|
ObjectPath.set(aInstanceParts, vValue, vPropertyValue);
|
|
@@ -442,7 +451,7 @@ sap.ui.define([
|
|
|
442
451
|
*/
|
|
443
452
|
FlexObject.prototype.convertToFileContent = function() {
|
|
444
453
|
var oFileContent = {};
|
|
445
|
-
Object.entries(this.getMappingInfo()).forEach(function
|
|
454
|
+
Object.entries(this.getMappingInfo()).forEach(function(aProperty) {
|
|
446
455
|
var oValueToSet = getMutators.call(this, aProperty[0]).getValue();
|
|
447
456
|
if (oValueToSet !== undefined) {
|
|
448
457
|
ObjectPath.set(aProperty[1], oValueToSet, oFileContent);
|
|
@@ -466,11 +475,11 @@ sap.ui.define([
|
|
|
466
475
|
* @returns {object} Properties map to create a new flex object
|
|
467
476
|
* @static
|
|
468
477
|
*/
|
|
469
|
-
FlexObject.mapFileContent = function
|
|
478
|
+
FlexObject.mapFileContent = function(oFileContent, oMappingInfo) {
|
|
470
479
|
var aValidFileProperties = Object.values(oMappingInfo);
|
|
471
480
|
var mPropertyMap = {};
|
|
472
481
|
|
|
473
|
-
var fnMapProperty = function
|
|
482
|
+
var fnMapProperty = function(sKey, vValue, sPath) {
|
|
474
483
|
var sNewPath = sPath ? sPath + "." + sKey : sKey;
|
|
475
484
|
var iIndex = aValidFileProperties.indexOf(sNewPath);
|
|
476
485
|
if (iIndex >= 0) {
|
|
@@ -483,7 +492,7 @@ sap.ui.define([
|
|
|
483
492
|
}
|
|
484
493
|
};
|
|
485
494
|
|
|
486
|
-
Object.entries(deepClone(oFileContent, 15)).forEach(function
|
|
495
|
+
Object.entries(deepClone(oFileContent, 15)).forEach(function(aEntry) {
|
|
487
496
|
fnMapProperty(aEntry[0], aEntry[1]);
|
|
488
497
|
});
|
|
489
498
|
return mPropertyMap;
|
|
@@ -493,11 +502,11 @@ sap.ui.define([
|
|
|
493
502
|
* Updates the flex object with a file content delta.
|
|
494
503
|
* @param {object} oFileContent - File content of the flex object
|
|
495
504
|
*/
|
|
496
|
-
FlexObject.prototype.update = function
|
|
505
|
+
FlexObject.prototype.update = function(oFileContent) {
|
|
497
506
|
// filename is mapped to id and this is not updatable
|
|
498
507
|
var oNewFileContent = _omit(oFileContent, ["fileName"]);
|
|
499
508
|
var mProperties = FlexObject.mapFileContent(oNewFileContent, this.getMappingInfo());
|
|
500
|
-
Object.entries(mProperties).forEach(function
|
|
509
|
+
Object.entries(mProperties).forEach(function(aProperty) {
|
|
501
510
|
updateProperty.call(this, aProperty[0], aProperty[1]);
|
|
502
511
|
}.bind(this));
|
|
503
512
|
};
|
|
@@ -506,7 +515,7 @@ sap.ui.define([
|
|
|
506
515
|
* Sets the response from the back end after the flex object is saved.
|
|
507
516
|
* @param {object} oResponse - File content
|
|
508
517
|
*/
|
|
509
|
-
FlexObject.prototype.setResponse = function
|
|
518
|
+
FlexObject.prototype.setResponse = function(oResponse) {
|
|
510
519
|
if (!oResponse || isEmptyObject(oResponse)) {
|
|
511
520
|
return;
|
|
512
521
|
}
|
|
@@ -514,5 +523,15 @@ sap.ui.define([
|
|
|
514
523
|
this.setState(States.LifecycleState.PERSISTED);
|
|
515
524
|
};
|
|
516
525
|
|
|
526
|
+
/**
|
|
527
|
+
* Converts properties of the flex object to the file content format and updates the fileName.
|
|
528
|
+
* @returns {object} File content of the flex object that contains the new fileName
|
|
529
|
+
*/
|
|
530
|
+
FlexObject.prototype.cloneFileContentWithNewId = function() {
|
|
531
|
+
var mFileContent = this.convertToFileContent();
|
|
532
|
+
mFileContent.fileName = Utils.createDefaultFileName(mFileContent.fileName.split("_").pop());
|
|
533
|
+
mFileContent.support.clonedFrom = this.getId();
|
|
534
|
+
return mFileContent;
|
|
535
|
+
};
|
|
517
536
|
return FlexObject;
|
|
518
537
|
});
|
|
@@ -61,6 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
var sFileName = mProperties.fileName || mProperties.id || Utils.createDefaultFileName(sChangeType);
|
|
62
62
|
return {
|
|
63
63
|
id: sFileName,
|
|
64
|
+
adaptationId: mProperties.adaptationId,
|
|
64
65
|
layer: mProperties.layer,
|
|
65
66
|
content: mProperties.content,
|
|
66
67
|
texts: mProperties.texts,
|
|
@@ -91,7 +92,7 @@ sap.ui.define([
|
|
|
91
92
|
*
|
|
92
93
|
* @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
|
|
93
94
|
* @since 1.100
|
|
94
|
-
* @version 1.
|
|
95
|
+
* @version 1.114.1
|
|
95
96
|
* @private
|
|
96
97
|
* @ui5-restricted sap.ui.fl
|
|
97
98
|
*/
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
18
18
|
* @alias sap.ui.fl.apply._internal.flexObjects.Variant
|
|
19
19
|
* @since 1.103
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.114.1
|
|
21
21
|
* @private
|
|
22
22
|
* @ui5-restricted sap.ui.fl
|
|
23
23
|
*/
|
|
@@ -25,12 +25,19 @@ sap.ui.define([
|
|
|
25
25
|
metadata: {
|
|
26
26
|
properties: {
|
|
27
27
|
/**
|
|
28
|
-
* Indicates whether
|
|
28
|
+
* Indicates whether variant is shown as favorite in the variants list.
|
|
29
29
|
*/
|
|
30
30
|
favorite: {
|
|
31
31
|
type: "boolean",
|
|
32
32
|
defaultValue: false
|
|
33
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* Indicates whether variant is shown in the variant list.
|
|
36
|
+
*/
|
|
37
|
+
visible: {
|
|
38
|
+
type: "boolean",
|
|
39
|
+
defaultValue: true
|
|
40
|
+
},
|
|
34
41
|
/**
|
|
35
42
|
* Indicates whether the variant is automatically executed.
|
|
36
43
|
*/
|
|
@@ -109,5 +116,16 @@ sap.ui.define([
|
|
|
109
116
|
this.setText("variantName", sName, "XFLD", bSkipStateChange);
|
|
110
117
|
};
|
|
111
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Retrieves information whether the variant has at least one context.
|
|
121
|
+
* @returns {boolean} true if variant has at least one context else false
|
|
122
|
+
*/
|
|
123
|
+
Variant.prototype.hasContexts = function() {
|
|
124
|
+
var oContexts = this.getContexts();
|
|
125
|
+
var aContextKeys = Object.keys(oContexts);
|
|
126
|
+
return aContextKeys.some(function (sContextKey) {
|
|
127
|
+
return oContexts[sContextKey].length > 0;
|
|
128
|
+
});
|
|
129
|
+
};
|
|
112
130
|
return Variant;
|
|
113
131
|
});
|