@openui5/sap.ui.fl 1.127.0 → 1.128.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/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +37 -47
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +11 -9
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +17 -12
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +3 -1
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +3 -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/AddTechnicalAttributes.js +75 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +76 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +44 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetCloudDevAdaptationStatus.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +56 -9
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +66 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +12 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +41 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +39 -39
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +3 -0
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +9 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/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 +13 -4
- 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/descriptorRelated/Utils.js +19 -0
- 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/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageResultMerger.js +1 -0
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -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/support/_internal/getAllUIChanges.js +9 -59
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +53 -0
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +56 -5
- 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/changePropertyValueByPath.js +13 -2
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +23 -14
- package/src/sap/ui/fl/variants/VariantModel.js +7 -6
- package/src/sap/ui/fl/variants/context/i18n/i18n_en_US_saptrc.properties +12 -12
- package/src/sap/ui/fl/write/_internal/SaveAs.js +11 -12
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +8 -68
- 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 +65 -16
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
- 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/SessionStorageConnector.js +1 -0
- 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/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 → FlexObjectManager.js} +26 -56
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +9 -6
- 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/ContextBasedAdaptationsAPI.js +6 -6
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +4 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +3 -4
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +8 -8
- package/src/sap/ui/fl/write/api/TranslationAPI.js +6 -6
- package/src/sap/ui/fl/write/api/VersionsAPI.js +34 -9
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* OpenUI5
|
|
4
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/ui/fl/util/changePropertyValueByPath",
|
|
10
|
+
"sap/ui/fl/util/DescriptorChangeCheck"
|
|
11
|
+
], function(
|
|
12
|
+
changePropertyValueByPath,
|
|
13
|
+
DescriptorChangeCheck
|
|
14
|
+
) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
const SUPPORTED_OPERATIONS = ["UPDATE", "UPSERT"];
|
|
18
|
+
const SUPPORTED_PROPERTIES = ["semanticObject", "action", "additionalParameters", "parameters/*"];
|
|
19
|
+
|
|
20
|
+
// Only list properties with limitation
|
|
21
|
+
const PROPERTIES_PATTERNS = {
|
|
22
|
+
semanticObject: "^[\\w\\*]{0,30}$",
|
|
23
|
+
action: "^[\\w\\*]{0,60}$",
|
|
24
|
+
additionalParameters: "^(ignored|allowed|notallowed)$"
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Descriptor change merger for change type <code>appdescr_app_changeOutbound</code>.
|
|
29
|
+
* Changes the outbound object of the app by changing the manifest value <code>sap.app/crossNavigation/outbounds</code>.
|
|
30
|
+
*
|
|
31
|
+
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.RegistrationBuild}.
|
|
32
|
+
*
|
|
33
|
+
* @namespace
|
|
34
|
+
* @alias sap.ui.fl.apply._internal.changes.descriptor.app.ChangeOutbound
|
|
35
|
+
* @version 1.128.0
|
|
36
|
+
* @private
|
|
37
|
+
* @ui5-restricted sap.ui.fl.apply._internal
|
|
38
|
+
*/
|
|
39
|
+
const ChangeOutbound = /** @lends sap.ui.fl.apply._internal.changes.descriptor.app.ChangeOutbound */ {
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Applies the <code>appdescr_app_changeOutbound</code> change to the manifest.
|
|
43
|
+
*
|
|
44
|
+
* @param {object} oManifest - Original manifest
|
|
45
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange} oChange - Change with type <code>appdescr_app_changeOutbound</code>
|
|
46
|
+
* @param {object} oChange.content - Details of the change
|
|
47
|
+
* @param {string} oChange.content.outboundId - ID of <code>sap.app/crossNavigation/outbounds/outbound</code> that is being changed
|
|
48
|
+
* @param {object|array} oChange.content.entityPropertyChange - Entity property change or an array of multiple entity property changes
|
|
49
|
+
* @param {string} oChange.content.entityPropertyChange.propertyPath - Path to the property which should be changed. Supported properties: <code>semanticObject</code>,<code>action</code> and <code>additionalParameters</code>
|
|
50
|
+
* @param {string} oChange.content.entityPropertyChange.operation - Operation that is performed on the property defined under propertyPath. Possible values: <code>UPDATE</code> and <code>UPSERT</code>
|
|
51
|
+
* @param {string} oChange.content.entityPropertyChange.propertyValue - New value of the <code>outbound</code> property defined under propertyPath
|
|
52
|
+
* @returns {object} Updated manifest with changed <code>sap.app/crossNavigation/outbounds/outbound</code>
|
|
53
|
+
*
|
|
54
|
+
* @private
|
|
55
|
+
* @ui5-restricted sap.ui.fl.apply._internal
|
|
56
|
+
*/
|
|
57
|
+
applyChange(oManifest, oChange) {
|
|
58
|
+
const oCrossNavigation = oManifest["sap.app"].crossNavigation;
|
|
59
|
+
const oChangeContent = oChange.getContent();
|
|
60
|
+
DescriptorChangeCheck.checkEntityPropertyChange(oChangeContent, SUPPORTED_PROPERTIES, SUPPORTED_OPERATIONS, PROPERTIES_PATTERNS);
|
|
61
|
+
if (oCrossNavigation && oCrossNavigation.outbounds) {
|
|
62
|
+
const oOutbound = oCrossNavigation.outbounds[oChangeContent.outboundId];
|
|
63
|
+
if (oOutbound) {
|
|
64
|
+
changePropertyValueByPath(oChangeContent.entityPropertyChange, oOutbound);
|
|
65
|
+
} else {
|
|
66
|
+
throw new Error(`Nothing to update. outbound with ID "${oChangeContent.outboundId}" does not exist.`);
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
throw new Error("sap.app/crossNavigation or sap.app/crossNavigation/outbounds sections have not been found in manifest.json");
|
|
70
|
+
}
|
|
71
|
+
return oManifest;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return ChangeOutbound;
|
|
76
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
/*!
|
|
3
|
+
* OpenUI5
|
|
4
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
|
|
10
|
+
], function(
|
|
11
|
+
|
|
12
|
+
) {
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Descriptor change merger for change type <code>appdescr_app_setDescription</code>.
|
|
17
|
+
* Sets the description of the app by changing the manifest value <code>sap.app/description</code>.
|
|
18
|
+
*
|
|
19
|
+
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
20
|
+
*
|
|
21
|
+
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.SetDescription
|
|
22
|
+
* @version 1.128.0
|
|
23
|
+
* @private
|
|
24
|
+
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
|
+
*/
|
|
26
|
+
const SetDescription = {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Applies the <code>appdescr_app_setDescription</code> change to the manifest.
|
|
30
|
+
* @param {object} oManifest - Original manifest
|
|
31
|
+
* @returns {object} Updated manifest with changed description used as a placeholder for postprocessing
|
|
32
|
+
*
|
|
33
|
+
* @private
|
|
34
|
+
* @ui5-restricted sap.ui.fl.apply._internal
|
|
35
|
+
*/
|
|
36
|
+
applyChange(oManifest) {
|
|
37
|
+
oManifest["sap.app"].description = `{{${oManifest["sap.app"].id}_sap.app.description}}`;
|
|
38
|
+
return oManifest;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return SetDescription;
|
|
44
|
+
});
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
20
20
|
*
|
|
21
21
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.SetTitle
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.128.0
|
|
23
23
|
* @private
|
|
24
24
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
25
25
|
*/
|
|
@@ -18,7 +18,7 @@ sap.ui.define([
|
|
|
18
18
|
* Available for both runtime and build {@link sap.ui.fl.apply._internal.changes.descriptor.Registration}.
|
|
19
19
|
*
|
|
20
20
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.ovp.DeleteCard
|
|
21
|
-
* @version 1.
|
|
21
|
+
* @version 1.128.0
|
|
22
22
|
* @private
|
|
23
23
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
24
24
|
*/
|
|
@@ -14,6 +14,41 @@ sap.ui.define([
|
|
|
14
14
|
) {
|
|
15
15
|
"use strict";
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Checks if condition is met to convert bundleUrl to bundleName, which is the case if
|
|
19
|
+
* no bundleName is present but an bundleUrl
|
|
20
|
+
* @param {object} oChangeContent - Details of the change
|
|
21
|
+
* @param {sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange} oChange - Change with type <code>appdescr_ui5_addNewModelEnhanceWith</code>
|
|
22
|
+
* @returns {boolean} - Indicator if bundleUrl can be converted to bundleName
|
|
23
|
+
*/
|
|
24
|
+
function hasBundleUrlAndNotBundleName(oChangeContent) {
|
|
25
|
+
const sErrorMessage = "A schema violation has been identified. Either bundleName or bundleUrl property must be used.";
|
|
26
|
+
if (oChangeContent.bundleUrl) {
|
|
27
|
+
if (oChangeContent.bundleName) {
|
|
28
|
+
throw Error(sErrorMessage);
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Process terminologies to convert bundleUrl to bundleName
|
|
37
|
+
* @param {object} oChangeContent - Details of the change
|
|
38
|
+
* @param {string} sAppId - ID of the application
|
|
39
|
+
*/
|
|
40
|
+
function processTerminologies(oChangeContent, sAppId) {
|
|
41
|
+
const aTermoinologiesKeys = Object.keys(oChangeContent.terminologies || {});
|
|
42
|
+
if (aTermoinologiesKeys.length > 0) {
|
|
43
|
+
aTermoinologiesKeys.forEach((sTerminology) => {
|
|
44
|
+
const oTerminologyObject = oChangeContent.terminologies[sTerminology];
|
|
45
|
+
if (hasBundleUrlAndNotBundleName(oTerminologyObject)) {
|
|
46
|
+
oTerminologyObject.bundleName = ApplyUtil.formatBundleName(sAppId, oTerminologyObject.bundleUrl);
|
|
47
|
+
delete oTerminologyObject.bundleUrl;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
17
52
|
/**
|
|
18
53
|
* Descriptor change merger for change type <code>appdescr_ui5_addNewModelEnhanceWith</code>.
|
|
19
54
|
* Adds a <code>settings/enhanceWith</code> node of an existing model with a path to an i18n properties file relative to the location of the manifest.
|
|
@@ -23,11 +58,11 @@ sap.ui.define([
|
|
|
23
58
|
*
|
|
24
59
|
* @namespace
|
|
25
60
|
* @alias sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith
|
|
26
|
-
* @version 1.
|
|
61
|
+
* @version 1.128.0
|
|
27
62
|
* @private
|
|
28
63
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
29
64
|
*/
|
|
30
|
-
|
|
65
|
+
const AddNewModelEnhanceWith = /** @lends sap.ui.fl.apply._internal.changes.descriptor.ui5.AddNewModelEnhanceWith */ {
|
|
31
66
|
|
|
32
67
|
/**
|
|
33
68
|
* Method to apply the <code>appdescr_ui5_addNewModelEnhanceWith</code> change to the manifest.
|
|
@@ -42,17 +77,30 @@ sap.ui.define([
|
|
|
42
77
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
43
78
|
*/
|
|
44
79
|
applyChange(oManifest, oChange) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var oModel = oManifest["sap.ui5"].models[sModelId];
|
|
80
|
+
const oChangeContent = oChange.getContent();
|
|
81
|
+
const sModelId = oChangeContent.modelId;
|
|
82
|
+
const oModel = oManifest["sap.ui5"].models[sModelId];
|
|
49
83
|
if (oModel) {
|
|
50
84
|
if (oModel.type && oModel.type === "sap.ui.model.resource.ResourceModel") {
|
|
51
85
|
if (!(oModel.settings && oModel.settings.enhanceWith)) {
|
|
52
86
|
ObjectPath.set("settings.enhanceWith", [], oModel);
|
|
53
87
|
}
|
|
54
|
-
|
|
55
|
-
|
|
88
|
+
const sAppId = oManifest["sap.app"].id;
|
|
89
|
+
const sI18n = oChange.getTexts()?.i18n;
|
|
90
|
+
const oEnhanceWith = oModel.settings.enhanceWith;
|
|
91
|
+
if (sI18n) {
|
|
92
|
+
oEnhanceWith.push({bundleName: ApplyUtil.formatBundleName(sAppId, sI18n)});
|
|
93
|
+
return oManifest;
|
|
94
|
+
}
|
|
95
|
+
if (hasBundleUrlAndNotBundleName(oChangeContent)) {
|
|
96
|
+
oChangeContent.bundleName = ApplyUtil.formatBundleName(sAppId, oChangeContent.bundleUrl);
|
|
97
|
+
delete oChangeContent.bundleUrl;
|
|
98
|
+
}
|
|
99
|
+
processTerminologies(oChangeContent, sAppId);
|
|
100
|
+
delete oChangeContent.modelId;
|
|
101
|
+
if (Object.keys(oChangeContent).length > 0) {
|
|
102
|
+
oEnhanceWith.push(oChangeContent);
|
|
103
|
+
}
|
|
56
104
|
}
|
|
57
105
|
}
|
|
58
106
|
return oManifest;
|
|
@@ -60,6 +108,5 @@ sap.ui.define([
|
|
|
60
108
|
skipPostprocessing: true
|
|
61
109
|
|
|
62
110
|
};
|
|
63
|
-
|
|
64
111
|
return AddNewModelEnhanceWith;
|
|
65
112
|
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/fl/apply/_internal/flexObjects/FlexObject"
|
|
9
|
+
], function(
|
|
10
|
+
FlexObject
|
|
11
|
+
) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Flexibility AnnotationChange Class. Changes annotations on underlying V2 and V4 models.
|
|
16
|
+
*
|
|
17
|
+
* @class Flexibility Annotation Change Class.
|
|
18
|
+
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
19
|
+
* @alias sap.ui.fl.apply._internal.flexObjects.AnnotationChange
|
|
20
|
+
* @since 1.128
|
|
21
|
+
* @version 1.128.0
|
|
22
|
+
* @private
|
|
23
|
+
* @ui5-restricted
|
|
24
|
+
*/
|
|
25
|
+
var AnnotationChange = FlexObject.extend("sap.ui.fl.apply._internal.flexObjects.AnnotationChange", {
|
|
26
|
+
|
|
27
|
+
metadata: {
|
|
28
|
+
properties: {
|
|
29
|
+
/**
|
|
30
|
+
* The selector is required to enable the FlexCommand.
|
|
31
|
+
*/
|
|
32
|
+
selector: {
|
|
33
|
+
type: "object",
|
|
34
|
+
defaultValue: {}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line object-shorthand
|
|
40
|
+
constructor: function(...aArgs) {
|
|
41
|
+
FlexObject.apply(this, aArgs);
|
|
42
|
+
this.setFileType("annotation_change");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
49
|
+
* @returns {object} Mapping information
|
|
50
|
+
* @static
|
|
51
|
+
*/
|
|
52
|
+
AnnotationChange.getMappingInfo = function() {
|
|
53
|
+
return Object.assign(FlexObject.getMappingInfo(), {});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
58
|
+
* Can be overridden to avoid access of static mapping within base methods.
|
|
59
|
+
* @returns {object} Mapping information
|
|
60
|
+
*/
|
|
61
|
+
AnnotationChange.prototype.getMappingInfo = function() {
|
|
62
|
+
return AnnotationChange.getMappingInfo();
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return AnnotationChange;
|
|
66
|
+
});
|
|
@@ -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.128.0
|
|
36
36
|
* @private
|
|
37
37
|
* @ui5-restricted sap.ui.fl, sap.ui.comp
|
|
38
38
|
*/
|
|
@@ -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.128.0
|
|
24
24
|
* @private
|
|
25
25
|
* @ui5-restricted sap.ui.fl
|
|
26
26
|
*/
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/util/restricted/_pick",
|
|
8
8
|
"sap/base/util/ObjectPath",
|
|
9
|
+
"sap/ui/fl/apply/_internal/flexObjects/AnnotationChange",
|
|
9
10
|
"sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange",
|
|
10
11
|
"sap/ui/fl/apply/_internal/flexObjects/CompVariant",
|
|
11
12
|
"sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange",
|
|
@@ -21,6 +22,7 @@ sap.ui.define([
|
|
|
21
22
|
], function(
|
|
22
23
|
_pick,
|
|
23
24
|
ObjectPath,
|
|
25
|
+
AnnotationChange,
|
|
24
26
|
AppDescriptorChange,
|
|
25
27
|
CompVariant,
|
|
26
28
|
ControllerExtensionChange,
|
|
@@ -42,6 +44,7 @@ sap.ui.define([
|
|
|
42
44
|
FL_VARIANT_OBJECT: FlVariant,
|
|
43
45
|
CONTROLLER_EXTENSION: ControllerExtensionChange,
|
|
44
46
|
APP_DESCRIPTOR_CHANGE: AppDescriptorChange,
|
|
47
|
+
ANNOTATION_CHANGE: AnnotationChange,
|
|
45
48
|
UI_CHANGE: UIChange
|
|
46
49
|
};
|
|
47
50
|
|
|
@@ -54,6 +57,8 @@ sap.ui.define([
|
|
|
54
57
|
return FLEX_OBJECT_TYPES.CONTROLLER_EXTENSION;
|
|
55
58
|
} else if (oNewFileContent.appDescriptorChange) {
|
|
56
59
|
return FLEX_OBJECT_TYPES.APP_DESCRIPTOR_CHANGE;
|
|
60
|
+
} else if (oNewFileContent.fileType === "annotation_change") {
|
|
61
|
+
return FLEX_OBJECT_TYPES.ANNOTATION_CHANGE;
|
|
57
62
|
}
|
|
58
63
|
return FLEX_OBJECT_TYPES.UI_CHANGE;
|
|
59
64
|
}
|
|
@@ -97,7 +102,7 @@ sap.ui.define([
|
|
|
97
102
|
*
|
|
98
103
|
* @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
|
|
99
104
|
* @since 1.100
|
|
100
|
-
* @version 1.
|
|
105
|
+
* @version 1.128.0
|
|
101
106
|
* @private
|
|
102
107
|
* @ui5-restricted sap.ui.fl
|
|
103
108
|
*/
|
|
@@ -155,6 +160,12 @@ sap.ui.define([
|
|
|
155
160
|
return new AppDescriptorChange(mProperties);
|
|
156
161
|
};
|
|
157
162
|
|
|
163
|
+
FlexObjectFactory.createAnnotationChange = function(mPropertyBag) {
|
|
164
|
+
mPropertyBag.compositeCommand ||= mPropertyBag.support && mPropertyBag.support.compositeCommand;
|
|
165
|
+
var mProperties = createBasePropertyBag(mPropertyBag);
|
|
166
|
+
return new AnnotationChange(mProperties);
|
|
167
|
+
};
|
|
168
|
+
|
|
158
169
|
/**
|
|
159
170
|
* Creates a new ControllerExtensionChange.
|
|
160
171
|
*
|