@openui5/sap.ui.fl 1.97.1 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +25 -30
- package/THIRDPARTY.txt +15 -22
- 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 +38 -230
- package/src/sap/ui/fl/ChangePersistence.js +113 -163
- package/src/sap/ui/fl/ChangePersistenceFactory.js +5 -3
- 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 +57 -71
- package/src/sap/ui/fl/FlexControllerFactory.js +6 -4
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +39 -313
- package/src/sap/ui/fl/Variant.js +5 -119
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +10 -8
- 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 +3 -2
- 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/controlVariants/URLHandler.js +6 -4
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +15 -10
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData.js +1 -1
- 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/flexObjects/RevertData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +47 -23
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +9 -5
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +21 -22
- 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 +17 -45
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/prepareVariantsMap.js +6 -0
- package/src/sap/ui/fl/{PreprocessorImpl.js → apply/_internal/preprocessors/ControllerExtension.js} +43 -50
- 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} +10 -8
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +13 -0
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +13 -2
- 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 +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/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/designtime/variants/VariantManagement.designtime.js +9 -2
- 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/BackendConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +16 -6
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +4 -3
- 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 +12 -12
- package/src/sap/ui/fl/messagebundle_ro.properties +1 -1
- package/src/sap/ui/fl/registry/Settings.js +52 -3
- package/src/sap/ui/fl/support/Flexibility.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +59 -0
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +34 -0
- package/src/sap/ui/fl/support/api/SupportAPI.js +31 -0
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +2 -2
- 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/apps/uiFlexibilityDiagnostics/helper/Extractor.js +3 -14
- package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -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 +7 -1
- package/src/sap/ui/fl/variants/VariantModel.js +32 -75
- 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 +47 -1
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +18 -19
- 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 +24 -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 +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +60 -6
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +59 -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 +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +4 -4
- 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 +19 -5
- 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 +139 -39
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +8 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +87 -4
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +4 -4
- package/src/sap/ui/fl/write/api/TranslationAPI.js +123 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +1 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +2 -1
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +43 -0
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -5,48 +5,39 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/thirdparty/jquery",
|
|
9
|
-
"sap/ui/core/Component",
|
|
10
|
-
"sap/ui/core/util/reflection/BaseTreeModifier",
|
|
11
|
-
"sap/ui/thirdparty/hasher",
|
|
12
|
-
"sap/base/Log",
|
|
13
|
-
"sap/base/util/UriParameters",
|
|
14
|
-
"sap/base/util/uid",
|
|
15
8
|
"sap/base/strings/formatMessage",
|
|
16
|
-
"sap/ui/base/ManagedObject",
|
|
17
|
-
"sap/ui/core/mvc/View",
|
|
18
9
|
"sap/base/util/isPlainObject",
|
|
19
|
-
"sap/
|
|
10
|
+
"sap/base/util/uid",
|
|
11
|
+
"sap/base/util/UriParameters",
|
|
12
|
+
"sap/base/Log",
|
|
13
|
+
"sap/ui/base/SyncPromise",
|
|
14
|
+
"sap/ui/base/ManagedObject",
|
|
15
|
+
"sap/ui/core/util/reflection/BaseTreeModifier",
|
|
16
|
+
"sap/ui/core/Component",
|
|
17
|
+
"sap/ui/thirdparty/hasher",
|
|
18
|
+
"sap/ui/thirdparty/jquery"
|
|
20
19
|
], function(
|
|
21
|
-
jQuery,
|
|
22
|
-
Component,
|
|
23
|
-
BaseTreeModifier,
|
|
24
|
-
hasher,
|
|
25
|
-
Log,
|
|
26
|
-
UriParameters,
|
|
27
|
-
uid,
|
|
28
20
|
formatMessage,
|
|
29
|
-
ManagedObject,
|
|
30
|
-
View,
|
|
31
21
|
isPlainObject,
|
|
32
|
-
|
|
22
|
+
uid,
|
|
23
|
+
UriParameters,
|
|
24
|
+
Log,
|
|
25
|
+
SyncPromise,
|
|
26
|
+
ManagedObject,
|
|
27
|
+
BaseTreeModifier,
|
|
28
|
+
Component,
|
|
29
|
+
hasher,
|
|
30
|
+
jQuery
|
|
33
31
|
) {
|
|
34
32
|
"use strict";
|
|
35
33
|
|
|
36
|
-
function appendComponentToString(sComponentName) {
|
|
37
|
-
if (sComponentName.length > 0 && sComponentName.indexOf(".Component") < 0) {
|
|
38
|
-
sComponentName += ".Component";
|
|
39
|
-
}
|
|
40
|
-
return sComponentName;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
34
|
/**
|
|
44
35
|
* Provides utility functions for the SAPUI5 flexibility library
|
|
45
36
|
*
|
|
46
37
|
* @namespace
|
|
47
38
|
* @alias sap.ui.fl.Utils
|
|
48
39
|
* @author SAP SE
|
|
49
|
-
* @version 1.
|
|
40
|
+
* @version 1.100.0
|
|
50
41
|
* @experimental Since 1.25.0
|
|
51
42
|
*/
|
|
52
43
|
var Utils = {
|
|
@@ -67,85 +58,6 @@ sap.ui.define([
|
|
|
67
58
|
Log[sLogType](sLogMessage, sCallStack || "");
|
|
68
59
|
},
|
|
69
60
|
|
|
70
|
-
/**
|
|
71
|
-
* Tries to retrieve the xsrf token from the controls OData Model. Returns empty string if retrieval failed.
|
|
72
|
-
*
|
|
73
|
-
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
74
|
-
* @returns {String} XSRF Token
|
|
75
|
-
* @public
|
|
76
|
-
* @function
|
|
77
|
-
* @name sap.ui.fl.Utils.getXSRFTokenFromControl
|
|
78
|
-
*/
|
|
79
|
-
getXSRFTokenFromControl: function(oControl) {
|
|
80
|
-
var oModel;
|
|
81
|
-
if (!oControl) {
|
|
82
|
-
return "";
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Get Model
|
|
86
|
-
if (oControl && typeof oControl.getModel === "function") {
|
|
87
|
-
oModel = oControl.getModel();
|
|
88
|
-
return Utils._getXSRFTokenFromModel(oModel);
|
|
89
|
-
}
|
|
90
|
-
return "";
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Returns XSRF Token from the Odata Model. Returns empty string if retrieval failed
|
|
95
|
-
*
|
|
96
|
-
* @param {sap.ui.model.odata.ODataModel} oModel - OData Model
|
|
97
|
-
* @returns {String} XSRF Token
|
|
98
|
-
* @private
|
|
99
|
-
*/
|
|
100
|
-
_getXSRFTokenFromModel: function(oModel) {
|
|
101
|
-
var mHeaders;
|
|
102
|
-
if (!oModel) {
|
|
103
|
-
return "";
|
|
104
|
-
}
|
|
105
|
-
if (typeof oModel.getHeaders === "function") {
|
|
106
|
-
mHeaders = oModel.getHeaders();
|
|
107
|
-
if (mHeaders) {
|
|
108
|
-
return mHeaders["x-csrf-token"];
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return "";
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Returns the class name of the component the given control belongs to.
|
|
116
|
-
*
|
|
117
|
-
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
118
|
-
*
|
|
119
|
-
* @returns {String} The component class name, ending with ".Component"
|
|
120
|
-
* @see sap.ui.core.Component.getOwnerIdFor
|
|
121
|
-
* @public
|
|
122
|
-
* @function
|
|
123
|
-
* @name sap.ui.fl.Utils.getComponentClassName
|
|
124
|
-
*/
|
|
125
|
-
getComponentClassName: function(oControl) {
|
|
126
|
-
var oAppComponent;
|
|
127
|
-
|
|
128
|
-
// determine UI5 component out of given control
|
|
129
|
-
if (oControl) {
|
|
130
|
-
// always return the app component
|
|
131
|
-
oAppComponent = this.getAppComponentForControl(oControl);
|
|
132
|
-
|
|
133
|
-
// check if the component is an application variant and assigned an application descriptor then use this as reference
|
|
134
|
-
if (oAppComponent) {
|
|
135
|
-
var sVariantId = this._getComponentStartUpParameter(oAppComponent, "sap-app-id");
|
|
136
|
-
if (sVariantId) {
|
|
137
|
-
return sVariantId;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (oAppComponent.getManifestEntry("sap.ui5") && oAppComponent.getManifestEntry("sap.ui5").appVariantId) {
|
|
141
|
-
return oAppComponent.getManifestEntry("sap.ui5").appVariantId;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return Utils.getComponentName(oAppComponent);
|
|
147
|
-
},
|
|
148
|
-
|
|
149
61
|
isVariantByStartupParameter: function(oControl) {
|
|
150
62
|
// determine UI5 component out of given control
|
|
151
63
|
if (oControl) {
|
|
@@ -158,22 +70,6 @@ sap.ui.define([
|
|
|
158
70
|
return false;
|
|
159
71
|
},
|
|
160
72
|
|
|
161
|
-
/**
|
|
162
|
-
* Returns the class name of the application component owning the passed component or the component name itself if
|
|
163
|
-
* this is already an application component.
|
|
164
|
-
*
|
|
165
|
-
* @param {sap.ui.core.Component} oComponent - SAPUI5 component
|
|
166
|
-
* @returns {String} The component class name, ending with ".Component"
|
|
167
|
-
* @see sap.ui.core.Component.getOwnerIdFor
|
|
168
|
-
* @public
|
|
169
|
-
* @since 1.40
|
|
170
|
-
* @function
|
|
171
|
-
* @name getAppComponentClassNameForComponent
|
|
172
|
-
*/
|
|
173
|
-
getAppComponentClassNameForComponent: function(oComponent) {
|
|
174
|
-
return Utils.getComponentClassName(oComponent);
|
|
175
|
-
},
|
|
176
|
-
|
|
177
73
|
/**
|
|
178
74
|
* Returns the appDescriptor of the component for the given control
|
|
179
75
|
*
|
|
@@ -204,37 +100,6 @@ sap.ui.define([
|
|
|
204
100
|
return oManifest;
|
|
205
101
|
},
|
|
206
102
|
|
|
207
|
-
/**
|
|
208
|
-
* Returns the siteId of a component
|
|
209
|
-
*
|
|
210
|
-
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
211
|
-
* @returns {string} siteId - that represent the found siteId
|
|
212
|
-
* @public
|
|
213
|
-
* @function
|
|
214
|
-
* @name sap.ui.fl.Utils.getSiteId
|
|
215
|
-
*/
|
|
216
|
-
getSiteId: function(oControl) {
|
|
217
|
-
var sSiteId = null;
|
|
218
|
-
var oAppComponent = null;
|
|
219
|
-
|
|
220
|
-
// determine UI5 component out of given control
|
|
221
|
-
if (oControl) {
|
|
222
|
-
oAppComponent = this.getAppComponentForControl(oControl);
|
|
223
|
-
|
|
224
|
-
// determine siteId from ComponentData
|
|
225
|
-
if (oAppComponent) {
|
|
226
|
-
//Workaround for back-end check: isApplicationPermitted
|
|
227
|
-
//As long as FLP does not know about appDescriptorId we have to pass siteID and applicationID.
|
|
228
|
-
//With startUpParameter hcpApplicationId we will get a concatenation of “siteId:applicationId”
|
|
229
|
-
|
|
230
|
-
//sSiteId = this._getComponentStartUpParameter(oComponent, "scopeId");
|
|
231
|
-
sSiteId = this._getComponentStartUpParameter(oAppComponent, "hcpApplicationId");
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
return sSiteId;
|
|
236
|
-
},
|
|
237
|
-
|
|
238
103
|
/**
|
|
239
104
|
* Returns the siteId of a component when you already have the component data.
|
|
240
105
|
*
|
|
@@ -276,22 +141,6 @@ sap.ui.define([
|
|
|
276
141
|
);
|
|
277
142
|
},
|
|
278
143
|
|
|
279
|
-
/**
|
|
280
|
-
* Indicates if the current application is a variant of an existing one
|
|
281
|
-
*
|
|
282
|
-
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
283
|
-
* @returns {boolean} true if it's an application variant
|
|
284
|
-
* @public
|
|
285
|
-
* @function
|
|
286
|
-
* @name sap.ui.fl.Utils.isApplicationVariant
|
|
287
|
-
*/
|
|
288
|
-
isApplicationVariant: function(oControl) {
|
|
289
|
-
var sFlexReference = Utils.getComponentClassName(oControl);
|
|
290
|
-
var oAppComponent = Utils.getAppComponentForControl(oControl);
|
|
291
|
-
var sComponentName = Utils.getComponentName(oAppComponent);
|
|
292
|
-
return sFlexReference !== sComponentName;
|
|
293
|
-
},
|
|
294
|
-
|
|
295
144
|
/**
|
|
296
145
|
* Determines if the passed change is related to control variants.
|
|
297
146
|
* @see sap.ui.fl.variants.VariantManagement
|
|
@@ -311,8 +160,8 @@ sap.ui.define([
|
|
|
311
160
|
* Determines the content for a given startUpParameter name
|
|
312
161
|
*
|
|
313
162
|
* @param {sap.ui.core.Component} oComponent - component instance
|
|
314
|
-
* @param {
|
|
315
|
-
* @returns {
|
|
163
|
+
* @param {string} sParameterName - startUpParameterName that shall be determined
|
|
164
|
+
* @returns {string} content of found startUpParameter
|
|
316
165
|
* @private
|
|
317
166
|
*/
|
|
318
167
|
_getComponentStartUpParameter: function(oComponent, sParameterName) {
|
|
@@ -335,25 +184,10 @@ sap.ui.define([
|
|
|
335
184
|
}
|
|
336
185
|
},
|
|
337
186
|
|
|
338
|
-
/**
|
|
339
|
-
* Gets the component name for a component instance.
|
|
340
|
-
*
|
|
341
|
-
* @param {sap.ui.core.Component} oComponent component instance
|
|
342
|
-
* @returns {String} component name
|
|
343
|
-
* @public
|
|
344
|
-
*/
|
|
345
|
-
getComponentName: function(oComponent) {
|
|
346
|
-
var sComponentName = "";
|
|
347
|
-
if (oComponent) {
|
|
348
|
-
sComponentName = oComponent.getMetadata().getName();
|
|
349
|
-
}
|
|
350
|
-
return appendComponentToString(sComponentName);
|
|
351
|
-
},
|
|
352
|
-
|
|
353
187
|
/**
|
|
354
188
|
* Gets the component instance for a component ID.
|
|
355
189
|
*
|
|
356
|
-
* @param {
|
|
190
|
+
* @param {string} sComponentId component ID
|
|
357
191
|
* @returns {sap.ui.core.Component} component for the component ID
|
|
358
192
|
* @private
|
|
359
193
|
*/
|
|
@@ -369,7 +203,7 @@ sap.ui.define([
|
|
|
369
203
|
* Returns ComponentId of the control. If the control has no component, it walks up the control tree in order to find a control having one
|
|
370
204
|
*
|
|
371
205
|
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
372
|
-
* @returns {
|
|
206
|
+
* @returns {string} The component id or empty string if component id couldn't be found
|
|
373
207
|
* @see sap.ui.core.Component.getOwnerIdFor
|
|
374
208
|
* @private
|
|
375
209
|
*/
|
|
@@ -510,46 +344,11 @@ sap.ui.define([
|
|
|
510
344
|
}
|
|
511
345
|
},
|
|
512
346
|
|
|
513
|
-
hasControlAncestorWithId: function(sControlId, sAncestorControlId) {
|
|
514
|
-
var oControl;
|
|
515
|
-
|
|
516
|
-
if (sControlId === sAncestorControlId) {
|
|
517
|
-
return true;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
oControl = sap.ui.getCore().byId(sControlId);
|
|
521
|
-
while (oControl) {
|
|
522
|
-
if (oControl.getId() === sAncestorControlId) {
|
|
523
|
-
return true;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
if (typeof oControl.getParent === "function") {
|
|
527
|
-
oControl = oControl.getParent();
|
|
528
|
-
} else {
|
|
529
|
-
return false;
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
return false;
|
|
534
|
-
},
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Checks whether the provided control is a view
|
|
538
|
-
*
|
|
539
|
-
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
540
|
-
* @returns {boolean} Flag
|
|
541
|
-
* @see sap.ui.core.Component.getOwnerIdFor
|
|
542
|
-
* @private
|
|
543
|
-
*/
|
|
544
|
-
_isView: function(oControl) {
|
|
545
|
-
return oControl instanceof View;
|
|
546
|
-
},
|
|
547
|
-
|
|
548
347
|
/**
|
|
549
348
|
* Returns OwnerId of the control
|
|
550
349
|
*
|
|
551
350
|
* @param {sap.ui.core.Control} oControl - SAPUI5 control
|
|
552
|
-
* @returns {
|
|
351
|
+
* @returns {string} The owner id
|
|
553
352
|
* @see sap.ui.core.Component.getOwnerIdFor
|
|
554
353
|
* @private
|
|
555
354
|
*/
|
|
@@ -595,8 +394,8 @@ sap.ui.define([
|
|
|
595
394
|
* used: For example en-us will be converted to EN. If the browser language already is in ISO 639-1, it will be returned after an upper case
|
|
596
395
|
* conversion: For example de will be converted to DE.
|
|
597
396
|
*
|
|
598
|
-
* @param {
|
|
599
|
-
* @returns {
|
|
397
|
+
* @param {string} sBrowserLanguage - Language in RFC4646
|
|
398
|
+
* @returns {string} Language in ISO 639-1. Empty string if conversion was not successful
|
|
600
399
|
* @public
|
|
601
400
|
* @function
|
|
602
401
|
* @name sap.ui.fl.Utils.convertBrowserLanguageToISO639_1
|
|
@@ -629,7 +428,7 @@ sap.ui.define([
|
|
|
629
428
|
/**
|
|
630
429
|
* Returns the current language in ISO 639-1 format.
|
|
631
430
|
*
|
|
632
|
-
* @returns {
|
|
431
|
+
* @returns {string} Language in ISO 639-1. Empty string if language cannot be determined
|
|
633
432
|
* @public
|
|
634
433
|
*/
|
|
635
434
|
getCurrentLanguage: function() {
|
|
@@ -657,8 +456,8 @@ sap.ui.define([
|
|
|
657
456
|
/**
|
|
658
457
|
* Converts ASCII coding into a string. Required for restoring stored code extensions
|
|
659
458
|
*
|
|
660
|
-
* @param {
|
|
661
|
-
* @returns {
|
|
459
|
+
* @param {string} ascii string containing ascii code valid numbers separated by ','
|
|
460
|
+
* @returns {string} parsedString parsed string
|
|
662
461
|
*/
|
|
663
462
|
asciiToString: function(ascii) {
|
|
664
463
|
var asciiArray = ascii.split(",");
|
|
@@ -674,8 +473,8 @@ sap.ui.define([
|
|
|
674
473
|
/**
|
|
675
474
|
* Converts a string into ASCII coding. Required for restoring stored code extensions
|
|
676
475
|
*
|
|
677
|
-
* @param {
|
|
678
|
-
* @returns {
|
|
476
|
+
* @param {string} string string which has to be encoded
|
|
477
|
+
* @returns {string} ascii imput parsed to ascii numbers separated by ','
|
|
679
478
|
*/
|
|
680
479
|
stringToAscii: function(string) {
|
|
681
480
|
var ascii = "";
|
|
@@ -716,19 +515,6 @@ sap.ui.define([
|
|
|
716
515
|
return window.location.search.substring(1);
|
|
717
516
|
},
|
|
718
517
|
|
|
719
|
-
/**
|
|
720
|
-
* Returns a map of technical parameters for the passed component.
|
|
721
|
-
*
|
|
722
|
-
* @param {object} oComponent - Component instance used to get the technical parameters
|
|
723
|
-
* @returns {object|undefined} Returns the requested technical parameter object or undefined if unavailable
|
|
724
|
-
*/
|
|
725
|
-
getTechnicalParametersForComponent: function(oComponent) {
|
|
726
|
-
return oComponent
|
|
727
|
-
&& oComponent.getComponentData
|
|
728
|
-
&& oComponent.getComponentData()
|
|
729
|
-
&& oComponent.getComponentData().technicalParameters;
|
|
730
|
-
},
|
|
731
|
-
|
|
732
518
|
/**
|
|
733
519
|
* Returns URL hash when ushell container is available synchronously.
|
|
734
520
|
*
|
|
@@ -742,25 +528,6 @@ sap.ui.define([
|
|
|
742
528
|
return {};
|
|
743
529
|
},
|
|
744
530
|
|
|
745
|
-
/**
|
|
746
|
-
* Checks the SAPUI5 debug settings to determine whether all or at least the <code>sap.ui.fl</code> library is debugged.
|
|
747
|
-
*
|
|
748
|
-
* @returns {boolean} Returns a flag if the flexibility library is debugged
|
|
749
|
-
* @public
|
|
750
|
-
*/
|
|
751
|
-
isDebugEnabled: function() {
|
|
752
|
-
var oUriParams = this._getUriParameters();
|
|
753
|
-
var sDebugParameters = oUriParams.get("sap-ui-debug") || "";
|
|
754
|
-
|
|
755
|
-
// true if SAPUI5 is in complete debug mode
|
|
756
|
-
if (sap.ui.getCore().getConfiguration().getDebug() || sDebugParameters === "true") {
|
|
757
|
-
return true;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
var aDebugParameters = sDebugParameters.split(",");
|
|
761
|
-
return aDebugParameters.indexOf("sap/ui/fl") !== -1 || aDebugParameters.indexOf("sap/ui/fl/") !== -1;
|
|
762
|
-
},
|
|
763
|
-
|
|
764
531
|
/**
|
|
765
532
|
* Returns the value of the specified url parameter of the current url
|
|
766
533
|
*
|
|
@@ -894,36 +661,10 @@ sap.ui.define([
|
|
|
894
661
|
return oComponent instanceof Component && Utils._getComponentTypeFromManifest(oComponent.getManifestObject()) === "component";
|
|
895
662
|
},
|
|
896
663
|
|
|
897
|
-
/**
|
|
898
|
-
* Returns the reference of a component, according to the following logic:
|
|
899
|
-
* First appVariantId, if not, componentName + ".Component", if not appId + ".Component" (unless they already have ".Component" at the end).
|
|
900
|
-
*
|
|
901
|
-
* @param {object} oManifest - Manifest of the component
|
|
902
|
-
* @returns {string} flex reference
|
|
903
|
-
* @public
|
|
904
|
-
*/
|
|
905
|
-
getFlexReference: function(oManifest) {
|
|
906
|
-
if (oManifest) {
|
|
907
|
-
if (oManifest.getEntry("sap.ui5")) {
|
|
908
|
-
if (oManifest.getEntry("sap.ui5").appVariantId) {
|
|
909
|
-
return oManifest.getEntry("sap.ui5").appVariantId;
|
|
910
|
-
}
|
|
911
|
-
if (oManifest.getEntry("sap.ui5").componentName) {
|
|
912
|
-
return appendComponentToString(oManifest.getEntry("sap.ui5").componentName);
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
if (oManifest.getEntry("sap.app") && oManifest.getEntry("sap.app").id) {
|
|
916
|
-
return appendComponentToString(Utils.getAppIdFromManifest(oManifest));
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
Log.warning("No Manifest received.");
|
|
920
|
-
return "";
|
|
921
|
-
},
|
|
922
|
-
|
|
923
664
|
/**
|
|
924
665
|
* Returns the descriptor Id, which is always the reference for descriptor changes
|
|
925
666
|
*
|
|
926
|
-
* @param {object} oManifest - Manifest of the component
|
|
667
|
+
* @param {object|sap.ui.core.Manifest} oManifest - Manifest of the component
|
|
927
668
|
* @returns {string} Version of application if it is available in the manifest, otherwise an empty string
|
|
928
669
|
* @public
|
|
929
670
|
*/
|
|
@@ -931,8 +672,13 @@ sap.ui.define([
|
|
|
931
672
|
if (oManifest) {
|
|
932
673
|
var oSapApp = (oManifest.getEntry) ? oManifest.getEntry("sap.app") : oManifest["sap.app"];
|
|
933
674
|
var sAppId = oSapApp && oSapApp.id;
|
|
934
|
-
if (sAppId === Utils.APP_ID_AT_DESIGN_TIME
|
|
935
|
-
|
|
675
|
+
if (sAppId === Utils.APP_ID_AT_DESIGN_TIME) {
|
|
676
|
+
if (oManifest.getComponentName) {
|
|
677
|
+
return oManifest.getComponentName();
|
|
678
|
+
}
|
|
679
|
+
if (oManifest.name) {
|
|
680
|
+
return oManifest.name;
|
|
681
|
+
}
|
|
936
682
|
}
|
|
937
683
|
return sAppId;
|
|
938
684
|
}
|
|
@@ -940,26 +686,6 @@ sap.ui.define([
|
|
|
940
686
|
throw new Error("No Manifest received, descriptor changes are not possible");
|
|
941
687
|
},
|
|
942
688
|
|
|
943
|
-
/**
|
|
944
|
-
* Returns the uri of the main service specified in the app manifest
|
|
945
|
-
*
|
|
946
|
-
* @param {object} oManifest - Manifest of the component
|
|
947
|
-
* @returns {string} Returns the uri if the manifest is available, otherwise an empty string
|
|
948
|
-
* @public
|
|
949
|
-
*/
|
|
950
|
-
getODataServiceUriFromManifest: function(oManifest) {
|
|
951
|
-
var sUri = "";
|
|
952
|
-
if (oManifest) {
|
|
953
|
-
var oSapApp = (oManifest.getEntry) ? oManifest.getEntry("sap.app") : oManifest["sap.app"];
|
|
954
|
-
if (oSapApp && oSapApp.dataSources && oSapApp.dataSources.mainService && oSapApp.dataSources.mainService.uri) {
|
|
955
|
-
sUri = oSapApp.dataSources.mainService.uri;
|
|
956
|
-
}
|
|
957
|
-
} else {
|
|
958
|
-
Log.warning("No Manifest received.");
|
|
959
|
-
}
|
|
960
|
-
return sUri;
|
|
961
|
-
},
|
|
962
|
-
|
|
963
689
|
/**
|
|
964
690
|
* Checks if an object is in an array or not and returns the index or -1
|
|
965
691
|
*
|
package/src/sap/ui/fl/Variant.js
CHANGED
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @class Variant class.
|
|
34
34
|
* @extends sap.ui.base.ManagedObject
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.100.0
|
|
37
37
|
* @alias sap.ui.fl.Variant
|
|
38
38
|
* @experimental Since 1.52.0
|
|
39
39
|
*/
|
|
@@ -157,7 +157,7 @@ sap.ui.define([
|
|
|
157
157
|
/**
|
|
158
158
|
* Returns the title
|
|
159
159
|
*
|
|
160
|
-
* @returns {
|
|
160
|
+
* @returns {string} Title of the variant
|
|
161
161
|
* @public
|
|
162
162
|
*/
|
|
163
163
|
Variant.prototype.getTitle = function () {
|
|
@@ -169,7 +169,7 @@ sap.ui.define([
|
|
|
169
169
|
/**
|
|
170
170
|
* Returns the file type
|
|
171
171
|
*
|
|
172
|
-
* @returns {
|
|
172
|
+
* @returns {string} fileType of the variant
|
|
173
173
|
* @public
|
|
174
174
|
*/
|
|
175
175
|
Variant.prototype.getFileType = function () {
|
|
@@ -188,20 +188,6 @@ sap.ui.define([
|
|
|
188
188
|
return this._oDefinition.controlChanges;
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
-
/**
|
|
192
|
-
* Returns the original language in ISO 639-1 format
|
|
193
|
-
*
|
|
194
|
-
* @returns {String} Original language
|
|
195
|
-
*
|
|
196
|
-
* @public
|
|
197
|
-
*/
|
|
198
|
-
Variant.prototype.getOriginalLanguage = function () {
|
|
199
|
-
if (this._oDefinition && this._oDefinition.content.originalLanguage) {
|
|
200
|
-
return this._oDefinition.content.originalLanguage;
|
|
201
|
-
}
|
|
202
|
-
return "";
|
|
203
|
-
};
|
|
204
|
-
|
|
205
191
|
/**
|
|
206
192
|
* Returns the abap package name
|
|
207
193
|
* @returns {string} ABAP package where the variant is assigned to
|
|
@@ -216,7 +202,7 @@ sap.ui.define([
|
|
|
216
202
|
* Returns the namespace. The variants' namespace is
|
|
217
203
|
* also the namespace of the change file in the repository.
|
|
218
204
|
*
|
|
219
|
-
* @returns {
|
|
205
|
+
* @returns {string} Namespace of the variants document
|
|
220
206
|
*
|
|
221
207
|
* @public
|
|
222
208
|
*/
|
|
@@ -287,16 +273,6 @@ sap.ui.define([
|
|
|
287
273
|
return this._oDefinition.content.variantReference;
|
|
288
274
|
};
|
|
289
275
|
|
|
290
|
-
/**
|
|
291
|
-
* Returns the user ID of the owner
|
|
292
|
-
* @returns {string} ID of the owner
|
|
293
|
-
*
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
Variant.prototype.getOwnerId = function () {
|
|
297
|
-
return this._oDefinition.content.support ? this._oDefinition.content.support.user : "";
|
|
298
|
-
};
|
|
299
|
-
|
|
300
276
|
/**
|
|
301
277
|
* Returns the text in the current language for a given id
|
|
302
278
|
*
|
|
@@ -340,77 +316,6 @@ sap.ui.define([
|
|
|
340
316
|
}
|
|
341
317
|
};
|
|
342
318
|
|
|
343
|
-
/**
|
|
344
|
-
* Returns true if the current layer is the same as the layer
|
|
345
|
-
* in which the variant was created or the variant is from the
|
|
346
|
-
* end-user layer and for this user created.
|
|
347
|
-
* @returns {boolean} is the variant read only
|
|
348
|
-
*
|
|
349
|
-
* @public
|
|
350
|
-
*/
|
|
351
|
-
Variant.prototype.isReadOnly = function () {
|
|
352
|
-
return this._isReadOnlyDueToLayer() || this._isReadOnlyWhenNotKeyUser();
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Checks if the variant is read-only
|
|
357
|
-
* because the current user is not a key user and the change is "shared"
|
|
358
|
-
* @returns {boolean} Flag whether variant is read only
|
|
359
|
-
*
|
|
360
|
-
* @private
|
|
361
|
-
*/
|
|
362
|
-
Variant.prototype._isReadOnlyWhenNotKeyUser = function () {
|
|
363
|
-
if (this.isUserDependent()) {
|
|
364
|
-
return false; // the user always can edit its own variants
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
var sReference = this.getDefinition().reference;
|
|
368
|
-
if (!sReference) {
|
|
369
|
-
return true; // without a reference the right to edit or delete a variant cannot be determined
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
var oSettings = Settings.getInstanceOrUndef();
|
|
373
|
-
if (!oSettings) {
|
|
374
|
-
return true; // without settings the right to edit or delete a variant cannot be determined
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
return !oSettings.isKeyUser(); // a key user can edit changes
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Checks if the layer allows modifying the file
|
|
382
|
-
* @returns {boolean} Flag whether variant is read only
|
|
383
|
-
*
|
|
384
|
-
* @private
|
|
385
|
-
*/
|
|
386
|
-
Variant.prototype._isReadOnlyDueToLayer = function () {
|
|
387
|
-
var sCurrentLayer;
|
|
388
|
-
sCurrentLayer = this._bUserDependent ? Layer.USER : LayerUtils.getCurrentLayer();
|
|
389
|
-
return (this._oDefinition.content.layer !== sCurrentLayer);
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* A variant can only be modified if the current language equals the original language.
|
|
394
|
-
* Returns false if the current language does not equal the original language of the variant's change file.
|
|
395
|
-
* Returns false if the original language is initial.
|
|
396
|
-
*
|
|
397
|
-
* @returns {boolean} flag whether the current logon language differs from the original language of the variant's change document
|
|
398
|
-
*
|
|
399
|
-
* @private
|
|
400
|
-
*/
|
|
401
|
-
Variant.prototype._isReadOnlyDueToOriginalLanguage = function () {
|
|
402
|
-
var sCurrentLanguage;
|
|
403
|
-
var sOriginalLanguage;
|
|
404
|
-
|
|
405
|
-
sOriginalLanguage = this.getOriginalLanguage();
|
|
406
|
-
if (!sOriginalLanguage) {
|
|
407
|
-
return false;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
sCurrentLanguage = Utils.getCurrentLanguage();
|
|
411
|
-
return (sCurrentLanguage !== sOriginalLanguage);
|
|
412
|
-
};
|
|
413
|
-
|
|
414
319
|
/**
|
|
415
320
|
* Marks the current variant to be deleted persistently
|
|
416
321
|
*
|
|
@@ -477,7 +382,7 @@ sap.ui.define([
|
|
|
477
382
|
/**
|
|
478
383
|
* Gets the creation timestamp
|
|
479
384
|
*
|
|
480
|
-
* @returns {
|
|
385
|
+
* @returns {string} creation timestamp
|
|
481
386
|
*
|
|
482
387
|
* @public
|
|
483
388
|
*/
|
|
@@ -485,16 +390,6 @@ sap.ui.define([
|
|
|
485
390
|
return this._oDefinition.content.creation;
|
|
486
391
|
};
|
|
487
392
|
|
|
488
|
-
/**
|
|
489
|
-
* Returns true if the variant is user dependent
|
|
490
|
-
* @returns {boolean} Variant is only relevant for the current user
|
|
491
|
-
*
|
|
492
|
-
* @public
|
|
493
|
-
*/
|
|
494
|
-
Variant.prototype.isUserDependent = function () {
|
|
495
|
-
return (this._bUserDependent);
|
|
496
|
-
};
|
|
497
|
-
|
|
498
393
|
/**
|
|
499
394
|
* Gets the JSON definition of the variant
|
|
500
395
|
* @returns {object} the content of the variant
|
|
@@ -520,15 +415,6 @@ sap.ui.define([
|
|
|
520
415
|
}
|
|
521
416
|
};
|
|
522
417
|
|
|
523
|
-
Variant.prototype.getFullFileIdentifier = function () {
|
|
524
|
-
var sLayer = this.getLayer();
|
|
525
|
-
var sNamespace = this.getNamespace();
|
|
526
|
-
var sFileName = this.getDefinition().content.fileName;
|
|
527
|
-
var sFileType = this.getDefinition().content.fileType;
|
|
528
|
-
|
|
529
|
-
return sLayer + "/" + sNamespace + "/" + sFileName + "." + sFileType;
|
|
530
|
-
};
|
|
531
|
-
|
|
532
418
|
/**
|
|
533
419
|
* Returns the revert specific data
|
|
534
420
|
*
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
*
|
|
26
26
|
* @private
|
|
27
27
|
* @author SAP SE
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.100.0
|
|
29
29
|
*
|
|
30
30
|
* @experimental Since 1.80 This class is experimental and provides only limited functionality. Also the API might be
|
|
31
31
|
* changed in future.
|
|
@@ -303,4 +303,4 @@ sap.ui.define([
|
|
|
303
303
|
};
|
|
304
304
|
|
|
305
305
|
return DelegateMediator;
|
|
306
|
-
}
|
|
306
|
+
});
|