@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
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @namespace sap.ui.fl.write._internal.Storage
|
|
24
24
|
* @since 1.67
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.100.0
|
|
26
26
|
* @private
|
|
27
27
|
* @ui5-restricted sap.ui.fl
|
|
28
28
|
*/
|
|
@@ -414,5 +414,51 @@ sap.ui.define([
|
|
|
414
414
|
}
|
|
415
415
|
};
|
|
416
416
|
|
|
417
|
+
Storage.translation = {
|
|
418
|
+
/**
|
|
419
|
+
* Gets the source languages for the given application.
|
|
420
|
+
*
|
|
421
|
+
* @param {object} mPropertyBag - Property bag
|
|
422
|
+
* @param {sap.ui.fl.Layer} mPropertyBag.layer - Layer
|
|
423
|
+
* @param {string} mPropertyBag.reference - Flexibility reference
|
|
424
|
+
* @returns {Promise} Resolving after the languages are retrieved;
|
|
425
|
+
* rejects if an error occurs
|
|
426
|
+
*/
|
|
427
|
+
getSourceLanguages: function (mPropertyBag) {
|
|
428
|
+
return _getWriteConnectors()
|
|
429
|
+
.then(_executeActionByName.bind(undefined, "translation.getSourceLanguages", mPropertyBag));
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Gets the translatable texts for the given source & target language for the given application
|
|
434
|
+
*
|
|
435
|
+
* @param {object} mPropertyBag - Property bag
|
|
436
|
+
* @param {sap.ui.fl.Layer} mPropertyBag.layer - Layer
|
|
437
|
+
* @param {string} mPropertyBag.sourceLanguage - Source language for for which the request should be made
|
|
438
|
+
* @param {string} mPropertyBag.targetLanguage - Target language for for which the request should be made
|
|
439
|
+
* @param {string} mPropertyBag.reference - Flexibility reference
|
|
440
|
+
* @returns {Promise} Resolving after the languages are retrieved;
|
|
441
|
+
* rejects if an error occurs
|
|
442
|
+
*/
|
|
443
|
+
getTexts: function (mPropertyBag) {
|
|
444
|
+
return _getWriteConnectors()
|
|
445
|
+
.then(_executeActionByName.bind(undefined, "translation.getTexts", mPropertyBag));
|
|
446
|
+
},
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Uploads an XLIFF file.
|
|
450
|
+
*
|
|
451
|
+
* @param {object} mPropertyBag - Property bag
|
|
452
|
+
* @param {sap.ui.fl.Layer} mPropertyBag.layer - Layer
|
|
453
|
+
* @param {object} mPropertyBag.payload - The file to be uploaded
|
|
454
|
+
* @returns {Promise} Resolves after the file was uploaded;
|
|
455
|
+
* rejects if an error occurs or the parameter is missing
|
|
456
|
+
*/
|
|
457
|
+
postTranslationTexts: function (mPropertyBag) {
|
|
458
|
+
return _getWriteConnectors()
|
|
459
|
+
.then(_executeActionByName.bind(undefined, "translation.postTranslationTexts", mPropertyBag));
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
|
|
417
463
|
return Storage;
|
|
418
464
|
});
|
|
@@ -30,14 +30,14 @@ sap.ui.define([
|
|
|
30
30
|
function createModel(mPropertyBag, bVersioningEnabled, aVersions) {
|
|
31
31
|
var bBackendDraft = _doesDraftExistInVersions(aVersions);
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var sActiveVersion = sap.ui.fl.Versions.Original;
|
|
34
34
|
aVersions.forEach(function (oVersion) {
|
|
35
35
|
if (oVersion.version === sap.ui.fl.Versions.Draft) {
|
|
36
36
|
oVersion.type = "draft";
|
|
37
|
-
} else if (
|
|
37
|
+
} else if (sActiveVersion === sap.ui.fl.Versions.Original) {
|
|
38
38
|
// no active version found yet; the first non-draft version is always the active version
|
|
39
39
|
oVersion.type = "active";
|
|
40
|
-
|
|
40
|
+
sActiveVersion = oVersion.version;
|
|
41
41
|
} else {
|
|
42
42
|
oVersion.type = "inactive";
|
|
43
43
|
}
|
|
@@ -49,25 +49,24 @@ sap.ui.define([
|
|
|
49
49
|
sap.ui.fl.Versions.UrlParameter,
|
|
50
50
|
oURLParsingService
|
|
51
51
|
);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
nPersistedBasisForDisplayedVersion = sap.ui.fl.Versions.Original;
|
|
52
|
+
if (!sPersistedBasisForDisplayedVersion) {
|
|
53
|
+
if (aVersions.length > 0) {
|
|
54
|
+
sPersistedBasisForDisplayedVersion = aVersions[0].version;
|
|
55
|
+
} else {
|
|
56
|
+
sPersistedBasisForDisplayedVersion = sap.ui.fl.Versions.Original;
|
|
57
|
+
}
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
var oModel = new JSONModel({
|
|
62
61
|
versioningEnabled: bVersioningEnabled,
|
|
63
62
|
versions: aVersions,
|
|
64
|
-
activeVersion:
|
|
63
|
+
activeVersion: sActiveVersion,
|
|
65
64
|
backendDraft: bBackendDraft,
|
|
66
65
|
dirtyChanges: false,
|
|
67
66
|
draftAvailable: bBackendDraft,
|
|
68
67
|
activateEnabled: bBackendDraft,
|
|
69
|
-
persistedVersion:
|
|
70
|
-
displayedVersion:
|
|
68
|
+
persistedVersion: sPersistedBasisForDisplayedVersion,
|
|
69
|
+
displayedVersion: sPersistedBasisForDisplayedVersion
|
|
71
70
|
});
|
|
72
71
|
|
|
73
72
|
oModel.setDefaultBindingMode(BindingMode.OneWay);
|
|
@@ -88,12 +87,12 @@ sap.ui.define([
|
|
|
88
87
|
var bDraftAvailable = bVersioningEnabled && (bDirtyChanges || bBackendDraft);
|
|
89
88
|
oModel.setProperty("/draftAvailable", bDraftAvailable);
|
|
90
89
|
|
|
91
|
-
var
|
|
92
|
-
oModel.setProperty("/displayedVersion",
|
|
90
|
+
var sDisplayedVersion = bDirtyChanges ? sap.ui.fl.Versions.Draft : oModel.getProperty("/persistedVersion");
|
|
91
|
+
oModel.setProperty("/displayedVersion", sDisplayedVersion);
|
|
93
92
|
|
|
94
93
|
// add draft
|
|
95
94
|
if (!_doesDraftExistInVersions(aVersions) && bDraftAvailable) {
|
|
96
|
-
aVersions.splice(0, 0, {version: sap.ui.fl.Versions.Draft, type: "draft"});
|
|
95
|
+
aVersions.splice(0, 0, {version: sap.ui.fl.Versions.Draft, type: "draft", filenames: []});
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
// remove draft
|
|
@@ -158,7 +157,7 @@ sap.ui.define([
|
|
|
158
157
|
*
|
|
159
158
|
* @namespace sap.ui.fl.write._internal.Versions
|
|
160
159
|
* @since 1.74
|
|
161
|
-
* @version 1.
|
|
160
|
+
* @version 1.100.0
|
|
162
161
|
* @private
|
|
163
162
|
* @ui5-restricted sap.ui.fl
|
|
164
163
|
*/
|
|
@@ -258,7 +257,7 @@ sap.ui.define([
|
|
|
258
257
|
var bDraftExists = _doesDraftExistInVersions(aVersions);
|
|
259
258
|
var sDisplayedVersion = oModel.getProperty("/displayedVersion");
|
|
260
259
|
var sActiveVersion = oModel.getProperty("/activeVersion");
|
|
261
|
-
var
|
|
260
|
+
var sParentVersion = oModel.getProperty("/persistedVersion");
|
|
262
261
|
if (sDisplayedVersion === sActiveVersion) {
|
|
263
262
|
return Promise.reject("Version is already active");
|
|
264
263
|
}
|
|
@@ -270,7 +269,7 @@ sap.ui.define([
|
|
|
270
269
|
var oDirtyChangeInfo = _getDirtyChangesInfo(mPropertyBag);
|
|
271
270
|
var aChangePersistences = oDirtyChangeInfo.changePersistences;
|
|
272
271
|
aSaveDirtyChangesPromise = aChangePersistences.map(function (oChangePersistence) {
|
|
273
|
-
return oChangePersistence.saveDirtyChanges(mPropertyBag.appComponent, false, undefined,
|
|
272
|
+
return oChangePersistence.saveDirtyChanges(mPropertyBag.appComponent, false, undefined, sParentVersion);
|
|
274
273
|
});
|
|
275
274
|
}
|
|
276
275
|
return Promise.all(aSaveDirtyChangesPromise)
|
|
@@ -35,7 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
* @constructor
|
|
36
36
|
* @alias sap.ui.fl.write._internal.appVariant.AppVariant
|
|
37
37
|
* @author SAP SE
|
|
38
|
-
* @version 1.
|
|
38
|
+
* @version 1.100.0
|
|
39
39
|
* @private
|
|
40
40
|
* @ui5-restricted sap.ui.rta, smart business
|
|
41
41
|
*/
|
|
@@ -301,6 +301,10 @@ sap.ui.define([
|
|
|
301
301
|
mPropertyBag.isForSmartBusiness = this._oDefinition.isForSmartBusiness;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
+
if (this._oDefinition.parentVersion) {
|
|
305
|
+
mPropertyBag.parentVersion = this._oDefinition.parentVersion;
|
|
306
|
+
}
|
|
307
|
+
|
|
304
308
|
if (mMap.layer) {
|
|
305
309
|
mPropertyBag.layer = mMap.layer;
|
|
306
310
|
}
|
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/write/_internal/appVariant/AppVariant",
|
|
9
9
|
"sap/ui/thirdparty/jquery",
|
|
10
|
+
"sap/ui/fl/Layer",
|
|
10
11
|
"sap/ui/fl/descriptorRelated/internal/Utils",
|
|
11
12
|
"sap/ui/fl/write/_internal/connectors/LrepConnector",
|
|
12
13
|
"sap/base/util/merge"
|
|
13
14
|
], function(
|
|
14
15
|
AppVariant,
|
|
15
16
|
jQuery,
|
|
17
|
+
Layer,
|
|
16
18
|
Utils,
|
|
17
19
|
LrepConnector,
|
|
18
20
|
merge
|
|
@@ -32,7 +34,7 @@ sap.ui.define([
|
|
|
32
34
|
* @namespace
|
|
33
35
|
* @alias sap.ui.fl.write._internal.appVariant.AppVariantFactory
|
|
34
36
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
37
|
+
* @version 1.100.0
|
|
36
38
|
* @private
|
|
37
39
|
* @ui5-restricted sap.ui.rta, smart business
|
|
38
40
|
*/
|
|
@@ -102,7 +104,7 @@ sap.ui.define([
|
|
|
102
104
|
|
|
103
105
|
//default layer to CUSTOMER
|
|
104
106
|
if (!mPropertyBag.layer) {
|
|
105
|
-
mPropertyBag.layer =
|
|
107
|
+
mPropertyBag.layer = Layer.CUSTOMER;
|
|
106
108
|
} else {
|
|
107
109
|
Utils.checkParameterAndType(mPropertyBag, "layer", "string");
|
|
108
110
|
}
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @namespace
|
|
34
34
|
* @alias sap.ui.fl.write._internal.appVariant.AppVariantInlineChangeFactory
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.100.0
|
|
37
37
|
* @private
|
|
38
38
|
* @ui5-restricted sap.ui.rta, smart business
|
|
39
39
|
*/
|
|
@@ -926,6 +926,29 @@ sap.ui.define([
|
|
|
926
926
|
return _createAppVariantInlineChange(mPropertyBag);
|
|
927
927
|
};
|
|
928
928
|
|
|
929
|
+
/**
|
|
930
|
+
* Creates an inline change of change type <code>appdescr_ui5_changeModel</code>.
|
|
931
|
+
*
|
|
932
|
+
* @param {object} mPropertyBag - Parameters of the change type
|
|
933
|
+
* @param {string} mPropertyBag.changeType - Inline change type of an app variant
|
|
934
|
+
* @param {object} mPropertyBag.content - Content of an inline change
|
|
935
|
+
* @param {string} mPropertyBag.content.modelId - ID of the data source to be changed
|
|
936
|
+
* @param {object|array} mPropertyBag.content.entityPropertyChange - Entity property change or an array of multiple changes
|
|
937
|
+
* @param {object} mPropertyBag.content.entityPropertyChange.propertyPath - Property path inside the model (currently chaning settings/* is supported)
|
|
938
|
+
* @param {object} mPropertyBag.content.entityPropertyChange.operation - Operation (INSERT, UPDATE, UPSERT, DELETE)
|
|
939
|
+
* @param {object} mPropertyBag.content.entityPropertyChange.propertyValue - New property value
|
|
940
|
+
*
|
|
941
|
+
* @return {Promise} Resolving when creating the app variant inline change was successful (without back end access)
|
|
942
|
+
*
|
|
943
|
+
* @private
|
|
944
|
+
* @ui5-restricted sap.ui.rta, smart business
|
|
945
|
+
*/
|
|
946
|
+
AppVariantInlineChangeFactory.create_ui5_changeModel = function(mPropertyBag) {
|
|
947
|
+
Utils.checkParameterAndType(mPropertyBag.content, "modelId", "string");
|
|
948
|
+
Utils.checkEntityPropertyChange(mPropertyBag.content);
|
|
949
|
+
return _createAppVariantInlineChange(mPropertyBag);
|
|
950
|
+
};
|
|
951
|
+
|
|
929
952
|
/**
|
|
930
953
|
* Creates an inline change of change type <code>appdescr_fiori_setAbstract</code>.
|
|
931
954
|
*
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
* @namespace
|
|
42
42
|
* @alias sap.ui.fl.write._internal.condenser.Condenser
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.100.0
|
|
45
45
|
*/
|
|
46
46
|
var Condenser = {};
|
|
47
47
|
|
|
@@ -475,7 +475,7 @@ sap.ui.define([
|
|
|
475
475
|
var aNotCondensableChanges = [];
|
|
476
476
|
var aCondensableChanges = [];
|
|
477
477
|
aChanges.slice(0).reverse().forEach(function(oChange) {
|
|
478
|
-
if (oChange instanceof Change && oChange.
|
|
478
|
+
if (oChange instanceof Change && oChange.isSuccessfullyApplied()) {
|
|
479
479
|
aCondensableChanges.push(oChange);
|
|
480
480
|
} else {
|
|
481
481
|
aNotCondensableChanges.push(oChange);
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @param {object[]} [mPropertyBag.flexObjects] - Objects to be written (i.e. change definitions, variant definitions etc.)
|
|
30
30
|
* @param {object} [mPropertyBag.flexObject] - Object to be updated
|
|
31
31
|
* @param {string} mPropertyBag.url Configured - url for the connector
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {string} [mPropertyBag.parentVersion] - Indicates if changes should be written as a draft and on which version the changes should be based on
|
|
33
33
|
* @returns {Promise} Promise resolves as soon as the writing was completed
|
|
34
34
|
*/
|
|
35
35
|
function _doWrite(mPropertyBag) {
|
|
@@ -74,7 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
*
|
|
75
75
|
* @namespace sap.ui.fl.write._internal.connectors.BackendConnector
|
|
76
76
|
* @since 1.72
|
|
77
|
-
* @version 1.
|
|
77
|
+
* @version 1.100.0
|
|
78
78
|
* @private
|
|
79
79
|
* @ui5-restricted sap.ui.fl.write._internal.connectors
|
|
80
80
|
*/
|
|
@@ -122,7 +122,7 @@ sap.ui.define([
|
|
|
122
122
|
* @param {object} mPropertyBag - Property bag
|
|
123
123
|
* @param {object[]} mPropertyBag.flexObjects - Objects to be written (i.e. change definitions, variant definitions etc.)
|
|
124
124
|
* @param {string} mPropertyBag.url - Configured url for the connector
|
|
125
|
-
* @param {
|
|
125
|
+
* @param {string} [mPropertyBag.parentVersion] - Indicates if changes should be written as a draft and on which version the changes should be based on
|
|
126
126
|
* @returns {Promise} Promise resolves as soon as the writing was completed
|
|
127
127
|
*/
|
|
128
128
|
write: function (mPropertyBag) {
|
|
@@ -9,13 +9,15 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/fl/write/_internal/connectors/BackendConnector",
|
|
10
10
|
"sap/ui/fl/initial/_internal/connectors/KeyUserConnector",
|
|
11
11
|
"sap/ui/fl/initial/_internal/connectors/Utils",
|
|
12
|
-
"sap/ui/fl/write/_internal/connectors/Utils"
|
|
12
|
+
"sap/ui/fl/write/_internal/connectors/Utils",
|
|
13
|
+
"sap/base/util/restricted/_pick"
|
|
13
14
|
], function(
|
|
14
15
|
merge,
|
|
15
16
|
BackendConnector,
|
|
16
17
|
InitialConnector,
|
|
17
18
|
InitialUtils,
|
|
18
|
-
WriteUtils
|
|
19
|
+
WriteUtils,
|
|
20
|
+
_pick
|
|
19
21
|
) {
|
|
20
22
|
"use strict";
|
|
21
23
|
|
|
@@ -27,11 +29,11 @@ sap.ui.define([
|
|
|
27
29
|
*
|
|
28
30
|
* @namespace sap.ui.fl.write._internal.connectors.KeyUserConnector
|
|
29
31
|
* @since 1.70
|
|
30
|
-
* @version 1.
|
|
32
|
+
* @version 1.100.0
|
|
31
33
|
* @private
|
|
32
34
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
33
35
|
*/
|
|
34
|
-
|
|
36
|
+
var KeyUserConnector = merge({}, BackendConnector, /** @lends sap.ui.fl.write._internal.connectors.KeyUserConnector */ {
|
|
35
37
|
layers: InitialConnector.layers,
|
|
36
38
|
|
|
37
39
|
ROUTES: {
|
|
@@ -42,7 +44,13 @@ sap.ui.define([
|
|
|
42
44
|
GET: PREFIX + API_VERSION + "/versions/",
|
|
43
45
|
ACTIVATE: PREFIX + API_VERSION + "/versions/activate/",
|
|
44
46
|
DISCARD: PREFIX + API_VERSION + "/versions/draft/"
|
|
45
|
-
}
|
|
47
|
+
},
|
|
48
|
+
TRANSLATION: {
|
|
49
|
+
UPLOAD: PREFIX + API_VERSION + "/translation/texts",
|
|
50
|
+
DOWNLOAD: PREFIX + API_VERSION + "/translation/texts/",
|
|
51
|
+
GET_SOURCELANGUAGE: PREFIX + API_VERSION + "/translation/sourcelanguages/"
|
|
52
|
+
},
|
|
53
|
+
CONTEXTS: PREFIX + API_VERSION + "/contexts/"
|
|
46
54
|
},
|
|
47
55
|
isLanguageInfoRequired: true,
|
|
48
56
|
loadFeatures: function (mPropertyBag) {
|
|
@@ -51,6 +59,27 @@ sap.ui.define([
|
|
|
51
59
|
oFeatures.isPublicLayerAvailable = oFeatures.isPublicLayerAvailable && !oFeatures.isVariantAdaptationEnabled;
|
|
52
60
|
return oFeatures;
|
|
53
61
|
});
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
getContexts: function (mPropertyBag) {
|
|
65
|
+
var aParameters = ["type", "$skip", "$filter"];
|
|
66
|
+
var mParameters = _pick(mPropertyBag, aParameters);
|
|
67
|
+
|
|
68
|
+
var sContextsUrl = InitialUtils.getUrl(KeyUserConnector.ROUTES.CONTEXTS, mPropertyBag, mParameters);
|
|
69
|
+
return InitialUtils.sendRequest(sContextsUrl).then(function (oResult) {
|
|
70
|
+
return oResult.response;
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
loadContextDescriptions: function (mPropertyBag) {
|
|
75
|
+
var mParameters = {};
|
|
76
|
+
InitialUtils.addLanguageInfo(mParameters);
|
|
77
|
+
_enhancePropertyBagWithTokenInfo(mPropertyBag);
|
|
78
|
+
var sContextsUrl = InitialUtils.getUrl(KeyUserConnector.ROUTES.CONTEXTS, mPropertyBag, mParameters);
|
|
79
|
+
mPropertyBag.payload = JSON.stringify(mPropertyBag.flexObjects);
|
|
80
|
+
mPropertyBag.dataType = "json";
|
|
81
|
+
mPropertyBag.contentType = "application/json; charset=utf-8";
|
|
82
|
+
return WriteUtils.sendRequest(sContextsUrl, "POST", mPropertyBag);
|
|
54
83
|
}
|
|
55
84
|
});
|
|
56
85
|
|
|
@@ -70,7 +99,7 @@ sap.ui.define([
|
|
|
70
99
|
}
|
|
71
100
|
|
|
72
101
|
function renameVersionNumberProperty(oVersion) {
|
|
73
|
-
oVersion.version = oVersion.versionNumber;
|
|
102
|
+
oVersion.version = oVersion.versionNumber.toString();
|
|
74
103
|
delete oVersion.versionNumber;
|
|
75
104
|
return oVersion;
|
|
76
105
|
}
|
|
@@ -106,6 +135,31 @@ sap.ui.define([
|
|
|
106
135
|
}
|
|
107
136
|
};
|
|
108
137
|
|
|
138
|
+
KeyUserConnector.translation = {
|
|
139
|
+
getTexts: function (mPropertyBag) {
|
|
140
|
+
var mParameters = _pick(mPropertyBag, ["sourceLanguage", "targetLanguage"]);
|
|
141
|
+
var sTranslationUrl = InitialUtils.getUrl(KeyUserConnector.ROUTES.TRANSLATION.DOWNLOAD, mPropertyBag, mParameters);
|
|
142
|
+
return InitialUtils.sendRequest(sTranslationUrl, "GET", mPropertyBag).then(function(oResult) {
|
|
143
|
+
return oResult.response;
|
|
144
|
+
});
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
getSourceLanguages: function (mPropertyBag) {
|
|
148
|
+
var mParameters = {};
|
|
149
|
+
var sTranslationUrl = InitialUtils.getUrl(KeyUserConnector.ROUTES.TRANSLATION.GET_SOURCELANGUAGE, mPropertyBag, mParameters);
|
|
150
|
+
return InitialUtils.sendRequest(sTranslationUrl, "GET", mPropertyBag).then(function(oResult) {
|
|
151
|
+
return oResult.response;
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
postTranslationTexts: function (mPropertyBag) {
|
|
156
|
+
_enhancePropertyBagWithTokenInfo(mPropertyBag);
|
|
157
|
+
var sTranslationUrl = InitialUtils.getUrl(KeyUserConnector.ROUTES.TRANSLATION.UPLOAD, mPropertyBag, {});
|
|
158
|
+
return InitialUtils.sendRequest(sTranslationUrl, "POST", mPropertyBag);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
|
|
109
163
|
KeyUserConnector.initialConnector = InitialConnector;
|
|
110
164
|
return KeyUserConnector;
|
|
111
165
|
});
|
|
@@ -52,7 +52,12 @@ sap.ui.define([
|
|
|
52
52
|
APPVARIANTS: "/appdescr_variants/",
|
|
53
53
|
APPVARIANTS_OVERVIEW: "/app_variant_overview/",
|
|
54
54
|
UI2PERSONALIZATION: "/ui2personalization/",
|
|
55
|
-
CONTEXTS: "/flex/contexts/"
|
|
55
|
+
CONTEXTS: "/flex/contexts/",
|
|
56
|
+
VERSIONS: {
|
|
57
|
+
GET: "/flex/versions/",
|
|
58
|
+
ACTIVATE: "/flex/versions/activate/",
|
|
59
|
+
DISCARD: "/flex/versions/draft/"
|
|
60
|
+
}
|
|
56
61
|
};
|
|
57
62
|
|
|
58
63
|
/**
|
|
@@ -68,6 +73,8 @@ sap.ui.define([
|
|
|
68
73
|
* @param {boolean} [mPropertyBag.isAppVariant] Indicator whether this is an app variant
|
|
69
74
|
* @param {boolean} [mPropertyBag.isContextSharing] Indicator whether this is a request for context sharing
|
|
70
75
|
* @param {boolean} [mPropertyBag.skipIam=false] - Indicates whether the default IAM item creation and registration is skipped. This is S4/Hana specific flag passed by only Smart Business
|
|
76
|
+
* @param {boolean} [mPropertyBag.isCondensingEnabled] Indicator whether this is a request for condensing
|
|
77
|
+
* @param {boolean} [mPropertyBag.parentVersion] Indicates if changes should be written as a draft and on which version the changes should be based on
|
|
71
78
|
* @private
|
|
72
79
|
* @returns {Promise} Promise resolves as soon as the writing was completed
|
|
73
80
|
*/
|
|
@@ -88,6 +95,9 @@ sap.ui.define([
|
|
|
88
95
|
if (mPropertyBag.skipIam) {
|
|
89
96
|
mParameters.skipIam = mPropertyBag.skipIam;
|
|
90
97
|
}
|
|
98
|
+
if (mPropertyBag.parentVersion) {
|
|
99
|
+
mParameters.parentVersion = mPropertyBag.parentVersion;
|
|
100
|
+
}
|
|
91
101
|
InitialUtils.addLanguageInfo(mParameters);
|
|
92
102
|
InitialConnector._addClientInfo(mParameters);
|
|
93
103
|
//single update --> fileName needs to be in the url
|
|
@@ -141,12 +151,18 @@ sap.ui.define([
|
|
|
141
151
|
});
|
|
142
152
|
};
|
|
143
153
|
|
|
154
|
+
function renameVersionNumberProperty(oVersion) {
|
|
155
|
+
oVersion.version = oVersion.versionId;
|
|
156
|
+
delete oVersion.versionId;
|
|
157
|
+
return oVersion;
|
|
158
|
+
}
|
|
159
|
+
|
|
144
160
|
/**
|
|
145
161
|
* Connector for requesting data from an LRep-based back end.
|
|
146
162
|
*
|
|
147
163
|
* @namespace sap.ui.fl.write._internal.connectors.LrepConnector
|
|
148
164
|
* @since 1.67
|
|
149
|
-
* @version 1.
|
|
165
|
+
* @version 1.100.0
|
|
150
166
|
* @private
|
|
151
167
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
152
168
|
*/
|
|
@@ -364,7 +380,6 @@ sap.ui.define([
|
|
|
364
380
|
*/
|
|
365
381
|
loadFeatures: function (mPropertyBag) {
|
|
366
382
|
if (InitialConnector.settings) {
|
|
367
|
-
InitialConnector.settings.isVersioningEnabled = false;
|
|
368
383
|
return Promise.resolve(InitialConnector.settings);
|
|
369
384
|
}
|
|
370
385
|
var mParameters = {};
|
|
@@ -373,8 +388,6 @@ sap.ui.define([
|
|
|
373
388
|
|
|
374
389
|
var sFeaturesUrl = InitialUtils.getUrl(ROUTES.SETTINGS, mPropertyBag, mParameters);
|
|
375
390
|
return InitialUtils.sendRequest(sFeaturesUrl).then(function (oResult) {
|
|
376
|
-
// ensure that even an enabled back end is not consumed in this version
|
|
377
|
-
oResult.response.isVersioningEnabled = false;
|
|
378
391
|
oResult.response.isVariantAdaptationEnabled = !!oResult.response.isPublicLayerAvailable;
|
|
379
392
|
return oResult.response;
|
|
380
393
|
});
|
|
@@ -601,6 +614,47 @@ sap.ui.define([
|
|
|
601
614
|
});
|
|
602
615
|
return WriteUtils.sendRequest(sUrl, "DELETE");
|
|
603
616
|
}
|
|
617
|
+
},
|
|
618
|
+
versions: {
|
|
619
|
+
load: function (mPropertyBag) {
|
|
620
|
+
var oRequestOption = WriteUtils.getRequestOptions(
|
|
621
|
+
InitialConnector,
|
|
622
|
+
ROUTES.TOKEN
|
|
623
|
+
);
|
|
624
|
+
var mParameters = {};
|
|
625
|
+
InitialUtils.addLanguageInfo(mParameters);
|
|
626
|
+
mParameters.limit = mPropertyBag.limit;
|
|
627
|
+
var sVersionsUrl = InitialUtils.getUrl(ROUTES.VERSIONS.GET, mPropertyBag, mParameters);
|
|
628
|
+
return WriteUtils.sendRequest(sVersionsUrl, "GET", oRequestOption).then(function (oResult) {
|
|
629
|
+
return oResult.response.versions.map(function (oVersion) {
|
|
630
|
+
return renameVersionNumberProperty(oVersion);
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
},
|
|
634
|
+
activate: function (mPropertyBag) {
|
|
635
|
+
var oRequestOption = WriteUtils.getRequestOptions(
|
|
636
|
+
InitialConnector,
|
|
637
|
+
ROUTES.TOKEN,
|
|
638
|
+
{title: mPropertyBag.title},
|
|
639
|
+
"application/json; charset=utf-8",
|
|
640
|
+
"json"
|
|
641
|
+
);
|
|
642
|
+
var mParameters = {version: mPropertyBag.version};
|
|
643
|
+
InitialUtils.addLanguageInfo(mParameters);
|
|
644
|
+
var sVersionsUrl = InitialUtils.getUrl(ROUTES.VERSIONS.ACTIVATE, mPropertyBag, mParameters);
|
|
645
|
+
return WriteUtils.sendRequest(sVersionsUrl, "POST", oRequestOption).then(function (oResult) {
|
|
646
|
+
var oVersion = oResult.response;
|
|
647
|
+
return renameVersionNumberProperty(oVersion);
|
|
648
|
+
});
|
|
649
|
+
},
|
|
650
|
+
discardDraft: function (mPropertyBag) {
|
|
651
|
+
var oRequestOption = WriteUtils.getRequestOptions(
|
|
652
|
+
InitialConnector,
|
|
653
|
+
ROUTES.TOKEN
|
|
654
|
+
);
|
|
655
|
+
var sVersionsUrl = InitialUtils.getUrl(ROUTES.VERSIONS.DISCARD, mPropertyBag);
|
|
656
|
+
return WriteUtils.sendRequest(sVersionsUrl, "DELETE", oRequestOption);
|
|
657
|
+
}
|
|
604
658
|
}
|
|
605
659
|
});
|
|
606
660
|
});
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/registry/Settings",
|
|
9
|
-
"sap/ui/fl/
|
|
9
|
+
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
10
10
|
"sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory",
|
|
11
11
|
"sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation"
|
|
12
12
|
], function(
|
|
13
13
|
Settings,
|
|
14
|
-
|
|
14
|
+
ManifestUtils,
|
|
15
15
|
ABAPExtensibilityVariantFactory,
|
|
16
16
|
ServiceValidation
|
|
17
17
|
) {
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPAccess
|
|
43
43
|
* @experimental Since 1.87.0
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.100.0
|
|
46
46
|
*/
|
|
47
47
|
var ABAPAccess = {};
|
|
48
48
|
|
|
@@ -61,7 +61,7 @@ sap.ui.define([
|
|
|
61
61
|
* @inheritDoc
|
|
62
62
|
*/
|
|
63
63
|
ABAPAccess.isExtensibilityEnabled = function(oControl) {
|
|
64
|
-
var sComponentName =
|
|
64
|
+
var sComponentName = ManifestUtils.getFlexReferenceForControl(oControl);
|
|
65
65
|
if (!sComponentName) {
|
|
66
66
|
return Promise.resolve(false);
|
|
67
67
|
}
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @class
|
|
18
18
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariant
|
|
19
19
|
* @since 1.87
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.100.0
|
|
21
21
|
* @public
|
|
22
22
|
* @param {sap.ui.base.ManagedObject} oControl - Control to add extensions
|
|
23
23
|
*/
|
|
@@ -117,7 +117,7 @@ sap.ui.define([
|
|
|
117
117
|
* @namespace sap.ui.fl.write._internal.fieldExtensibility.ABAPExtensibilityVariantFactory
|
|
118
118
|
* @experimental Since 1.87.0
|
|
119
119
|
* @author SAP SE
|
|
120
|
-
* @version 1.
|
|
120
|
+
* @version 1.100.0
|
|
121
121
|
*/
|
|
122
122
|
var ABAPExtensibilityVariantFactory = {};
|
|
123
123
|
|