@openui5/sap.ui.fl 1.141.2 → 1.143.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/.eslintrc.json +3 -2
- package/README.md +2 -2
- package/REUSE.toml +39 -1
- package/THIRDPARTY.txt +36 -3
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/FakeLrepConnector.js +3 -3
- 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/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +1 -2
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +1 -0
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +16 -10
- 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/Applier.js +31 -22
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RawApplier.js +48 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +2 -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/AddNewDataSource.js +10 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +9 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +9 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.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/ChangeOutbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetInbounds.js +73 -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 +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/ChangeModel.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 +2 -2
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +21 -10
- package/src/sap/ui/fl/apply/_internal/controlVariants/Utils.js +14 -0
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +2 -2
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariantRevertData.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 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +13 -4
- package/src/sap/ui/fl/apply/_internal/flexObjects/RevertData.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/VariantChange.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange.js +1 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +0 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +28 -27
- 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 +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +8 -7
- package/src/sap/ui/fl/apply/_internal/init.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +196 -100
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +11 -14
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.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 +2 -2
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +2 -2
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/ChangeAnnotation.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/api/DescriptorChange.js +14 -13
- 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 +1 -1
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Loader.js +62 -29
- package/src/sap/ui/fl/initial/_internal/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Settings.js +99 -2
- package/src/sap/ui/fl/initial/_internal/Storage.js +2 -2
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +2 -2
- 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/BackendConnector.js +3 -3
- package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +2 -2
- package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +7 -2
- package/src/sap/ui/fl/initial/_internal/preprocessors/ControllerExtension.js +19 -5
- package/src/sap/ui/fl/initial/_internal/preprocessors/RegistrationDelegator.js +2 -4
- package/src/sap/ui/fl/initial/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/initial/api/InitialFlexAPI.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 +46 -43
- package/src/sap/ui/fl/library.support.js +1 -1
- package/src/sap/ui/fl/messagebundle.properties +0 -21
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +0 -14
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +7 -13
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +7 -13
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +7 -13
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +7 -12
- package/src/sap/ui/fl/support/api/SupportAPI.js +72 -21
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +5 -5
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +5 -5
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +3 -3
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +2 -2
- 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/support/diagnostics/Flexibility.controller.js +29 -0
- package/src/sap/ui/fl/support/diagnostics/Flexibility.view.xml +29 -0
- package/src/sap/ui/fl/support/diagnostics/FlexibilityDataExtractor.js +110 -0
- package/src/sap/ui/fl/support/diagnostics/FlexibilityPlugin.js +153 -0
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +53 -13
- package/src/sap/ui/fl/util/IFrame.js +26 -65
- package/src/sap/ui/fl/util/IFrameRenderer.js +15 -9
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -2
- package/src/sap/ui/fl/variants/VariantManagement.js +18 -7
- package/src/sap/ui/fl/variants/VariantManager.js +132 -59
- package/src/sap/ui/fl/variants/VariantModel.js +57 -155
- package/src/sap/ui/fl/variants/context/Component.js +1 -1
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +4 -4
- package/src/sap/ui/fl/write/_internal/SaveAs.js +5 -3
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +4 -4
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +11 -11
- 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 +2 -2
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +2 -2
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -2
- 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/flexState/FlexObjectManager.js +11 -10
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +2 -2
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantManager.js +2 -2
- package/src/sap/ui/fl/write/_internal/init.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/TransportDialog.js +6 -6
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +2 -2
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +5 -5
- package/src/sap/ui/fl/write/api/BusinessNetworkAPI.js +2 -2
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +4 -4
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +3 -3
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +8 -8
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +8 -27
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +6 -6
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +1 -1
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +72 -30
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/InlineApplier.js +0 -47
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +0 -96
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +0 -129
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.fragment.xml +0 -34
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +0 -193
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +0 -246
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.fragment.xml +0 -6
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +0 -40
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.fragment.xml +0 -22
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +0 -85
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.fragment.xml +0 -10
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +0 -60
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/validators/IsRequired.js +0 -20
|
@@ -120,7 +120,7 @@ sap.ui.define([
|
|
|
120
120
|
|| mPropertyBag.changes[0].selectorControl
|
|
121
121
|
);
|
|
122
122
|
const oAppComponent = Utils.getAppComponentForControl(oReferenceControl);
|
|
123
|
-
const sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oReferenceControl});
|
|
123
|
+
const sFlexReference = FlexRuntimeInfoAPI.getFlexReference({ element: oReferenceControl });
|
|
124
124
|
const oVariantModel = oAppComponent.getModel(ControlVariantApplyAPI.getVariantModelName());
|
|
125
125
|
const sLayer = Layer.USER;
|
|
126
126
|
const aSuccessfulChanges = [];
|
|
@@ -299,8 +299,8 @@ sap.ui.define([
|
|
|
299
299
|
return Promise.reject("App Component could not be determined");
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
const sReference = FlexRuntimeInfoAPI.getFlexReference({element: mPropertyBag.selector});
|
|
303
|
-
if (FlexState.isInitialized({control: oAppComponent})) {
|
|
302
|
+
const sReference = FlexRuntimeInfoAPI.getFlexReference({ element: mPropertyBag.selector });
|
|
303
|
+
if (FlexState.isInitialized({ control: oAppComponent })) {
|
|
304
304
|
// limit the deletion to the passed selector control only
|
|
305
305
|
const aRemovedChanges = FlexObjectManager.removeDirtyFlexObjects({
|
|
306
306
|
reference: sReference,
|
|
@@ -344,7 +344,7 @@ sap.ui.define([
|
|
|
344
344
|
throw Error("App Component could not be determined");
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
const sReference = FlexRuntimeInfoAPI.getFlexReference({element: mPropertyBag.selector});
|
|
347
|
+
const sReference = FlexRuntimeInfoAPI.getFlexReference({ element: mPropertyBag.selector });
|
|
348
348
|
var aDirtyFlexObjects = FlexObjectState.getDirtyFlexObjects(sReference);
|
|
349
349
|
|
|
350
350
|
return aDirtyFlexObjects.some(function(oFlexObject) {
|
|
@@ -383,7 +383,7 @@ sap.ui.define([
|
|
|
383
383
|
return logAndReject("App Component could not be determined");
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
if (FlexState.isInitialized({control: oAppComponent})) {
|
|
386
|
+
if (FlexState.isInitialized({ control: oAppComponent })) {
|
|
387
387
|
return FlexObjectManager.saveFlexObjects({ flexObjects: mPropertyBag.changes, selector: oAppComponent });
|
|
388
388
|
}
|
|
389
389
|
return Promise.resolve();
|
|
@@ -437,7 +437,7 @@ sap.ui.define([
|
|
|
437
437
|
* @sapui5-restricted sap.ui.rta
|
|
438
438
|
*/
|
|
439
439
|
attachChangeCreation(oControl, fnCallback) {
|
|
440
|
-
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oControl});
|
|
440
|
+
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({ element: oControl });
|
|
441
441
|
mChangeCreationListeners[sFlexReference] = (mChangeCreationListeners[sFlexReference] || []).concat(fnCallback);
|
|
442
442
|
},
|
|
443
443
|
|
|
@@ -450,7 +450,7 @@ sap.ui.define([
|
|
|
450
450
|
* @sapui5-restricted sap.ui.rta
|
|
451
451
|
*/
|
|
452
452
|
detachChangeCreation(oControl, fnCallback) {
|
|
453
|
-
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oControl});
|
|
453
|
+
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({ element: oControl });
|
|
454
454
|
if (Array.isArray(mChangeCreationListeners[sFlexReference])) {
|
|
455
455
|
mChangeCreationListeners[sFlexReference] = mChangeCreationListeners[sFlexReference].filter(function(fnRegisteredCallback) {
|
|
456
456
|
return fnRegisteredCallback !== fnCallback;
|
|
@@ -467,7 +467,7 @@ sap.ui.define([
|
|
|
467
467
|
*/
|
|
468
468
|
detachAllChangeCreationListeners(oControl) {
|
|
469
469
|
if (oControl) {
|
|
470
|
-
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({element: oControl});
|
|
470
|
+
var sFlexReference = FlexRuntimeInfoAPI.getFlexReference({ element: oControl });
|
|
471
471
|
delete mChangeCreationListeners[sFlexReference];
|
|
472
472
|
} else {
|
|
473
473
|
mChangeCreationListeners = {};
|
|
@@ -6,15 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess",
|
|
9
|
-
"sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess",
|
|
10
|
-
"sap/ui/base/ManagedObject",
|
|
11
|
-
"sap/ui/fl/Utils",
|
|
12
9
|
"sap/ui/fl/write/_internal/init"
|
|
13
10
|
], function(
|
|
14
|
-
ABAPAccess
|
|
15
|
-
CAPAccess,
|
|
16
|
-
ManagedObject,
|
|
17
|
-
FlUtils
|
|
11
|
+
ABAPAccess
|
|
18
12
|
) {
|
|
19
13
|
"use strict";
|
|
20
14
|
|
|
@@ -23,7 +17,7 @@ sap.ui.define([
|
|
|
23
17
|
*
|
|
24
18
|
* @namespace sap.ui.fl.write.api.FieldExtensibility
|
|
25
19
|
* @since 1.87
|
|
26
|
-
* @version 1.
|
|
20
|
+
* @version 1.143.0
|
|
27
21
|
* @private
|
|
28
22
|
* @ui5-restricted sap.ui.fl, sap.ui.rta, sap.ui.mdc
|
|
29
23
|
*/
|
|
@@ -32,29 +26,16 @@ sap.ui.define([
|
|
|
32
26
|
|
|
33
27
|
var _oCurrentScenario;
|
|
34
28
|
|
|
35
|
-
function getImplementationForCurrentScenario(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
var oAppComponent = FlUtils.getAppComponentForControl(oControl);
|
|
41
|
-
var oManifestConfig = (oAppComponent && oAppComponent.getManifestEntry("/sap.ui5/config")) || {};
|
|
42
|
-
var oUriParams = new URLSearchParams(window.location.search);
|
|
43
|
-
if (
|
|
44
|
-
oManifestConfig.experimentalCAPScenario
|
|
45
|
-
|| oUriParams.get("sap-ui-fl-xx-capScenario") === "true"
|
|
46
|
-
) {
|
|
47
|
-
_oCurrentScenario = CAPAccess;
|
|
48
|
-
} else {
|
|
49
|
-
_oCurrentScenario = ABAPAccess;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
29
|
+
function getImplementationForCurrentScenario() {
|
|
30
|
+
// currently there is only one case, but here would be the differentiation between the scenarios (CAP, ABAP, ...)
|
|
31
|
+
_oCurrentScenario ||= ABAPAccess;
|
|
32
|
+
|
|
52
33
|
return _oCurrentScenario;
|
|
53
34
|
}
|
|
54
35
|
|
|
55
36
|
function callFunctionInImplementation(...aArgs) {
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
const sFunctionName = aArgs.shift();
|
|
38
|
+
const oImplementation = getImplementationForCurrentScenario();
|
|
58
39
|
if (!oImplementation) {
|
|
59
40
|
return Promise.reject("Could not determine field extensibility scenario");
|
|
60
41
|
}
|
|
@@ -82,7 +82,7 @@ sap.ui.define([
|
|
|
82
82
|
* @returns {Promise<boolean>} Promise that resolves to a boolean indicating if changes exist
|
|
83
83
|
*/
|
|
84
84
|
function hasChanges(mPropertyBag) {
|
|
85
|
-
return PersistenceWriteAPI._getUIChanges({...mPropertyBag, includeCtrlVariants: true})
|
|
85
|
+
return PersistenceWriteAPI._getUIChanges({ ...mPropertyBag, includeCtrlVariants: true })
|
|
86
86
|
.then(function(aChanges) {
|
|
87
87
|
return aChanges.length > 0;
|
|
88
88
|
});
|
|
@@ -289,7 +289,7 @@ sap.ui.define([
|
|
|
289
289
|
if (oFlexObject instanceof UIChange) {
|
|
290
290
|
return UIChangeManager.addDirtyChanges(sFlexReference, [oFlexObject], oAppComponent)?.[0];
|
|
291
291
|
}
|
|
292
|
-
return FlexObjectManager.addDirtyFlexObjects(sFlexReference, [oFlexObject])?.[0];
|
|
292
|
+
return FlexObjectManager.addDirtyFlexObjects(sFlexReference, oAppComponent.getId(), [oFlexObject])?.[0];
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
if (mPropertyBag.change && mPropertyBag.flexObjects) {
|
|
@@ -320,7 +320,7 @@ sap.ui.define([
|
|
|
320
320
|
}
|
|
321
321
|
});
|
|
322
322
|
|
|
323
|
-
const aAddedFlexObjects = FlexObjectManager.addDirtyFlexObjects(sFlexReference, aFlexObjects);
|
|
323
|
+
const aAddedFlexObjects = FlexObjectManager.addDirtyFlexObjects(sFlexReference, oAppComponent.getId(), aFlexObjects);
|
|
324
324
|
const aAddedUIChanges = UIChangeManager.addDirtyChanges(sFlexReference, aUIChanges, oAppComponent);
|
|
325
325
|
|
|
326
326
|
// Ensure that the added changes are returned in the same order as they were passed
|
|
@@ -404,14 +404,14 @@ sap.ui.define([
|
|
|
404
404
|
&& oSettingsInstance.getSystem()
|
|
405
405
|
&& oSettingsInstance.getClient();
|
|
406
406
|
const bHasNoChanges = aChanges.length === 0;
|
|
407
|
-
let oChangesWarning = {showWarning: false};
|
|
407
|
+
let oChangesWarning = { showWarning: false };
|
|
408
408
|
|
|
409
409
|
if (bHasChangesFromOtherSystem) {
|
|
410
|
-
oChangesWarning = {showWarning: true, warningType: "mixedChangesWarning"};
|
|
410
|
+
oChangesWarning = { showWarning: true, warningType: "mixedChangesWarning" };
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
if (isProductiveSystemWithTransports && bHasNoChanges) {
|
|
414
|
-
oChangesWarning = {showWarning: true, warningType: "noChangesAndPSystemWarning"};
|
|
414
|
+
oChangesWarning = { showWarning: true, warningType: "noChangesAndPSystemWarning" };
|
|
415
415
|
}
|
|
416
416
|
return oChangesWarning;
|
|
417
417
|
});
|
|
@@ -289,7 +289,7 @@ sap.ui.define([
|
|
|
289
289
|
*/
|
|
290
290
|
initialDraftGotActivated(oReloadInfo) {
|
|
291
291
|
if (oReloadInfo.versioningEnabled) {
|
|
292
|
-
var bHasVersionParameter = this.hasVersionStorage({value: Version.Number.Draft}, oReloadInfo.selector);
|
|
292
|
+
var bHasVersionParameter = this.hasVersionStorage({ value: Version.Number.Draft }, oReloadInfo.selector);
|
|
293
293
|
return !VersionsAPI.isDraftAvailable({
|
|
294
294
|
control: oReloadInfo.selector,
|
|
295
295
|
layer: oReloadInfo.layer
|
|
@@ -382,7 +382,7 @@ sap.ui.define([
|
|
|
382
382
|
// of non-PUBLIC enabled back end and UI5 version. Therefore, only a layer parameter set in the url leads to a transport selection
|
|
383
383
|
oTransportSelection.selectTransport = function(oObjectInfo, fOkay, fError, bCompactMode, oControl, sStyleClass) {
|
|
384
384
|
if (!transportSelectionRequired()) {
|
|
385
|
-
fOkay(oTransportSelection._createEventObject(oObjectInfo, {transportId: ""}));
|
|
385
|
+
fOkay(oTransportSelection._createEventObject(oObjectInfo, { transportId: "" }));
|
|
386
386
|
return;
|
|
387
387
|
}
|
|
388
388
|
TransportSelection.prototype.selectTransport.call(this, oObjectInfo, fOkay, fError, bCompactMode, oControl, sStyleClass);
|
|
@@ -126,7 +126,7 @@ sap.ui.define([
|
|
|
126
126
|
iCounter++;
|
|
127
127
|
oFlexObject.setCreation(new Date(nCreationTimestamp).toISOString());
|
|
128
128
|
}
|
|
129
|
-
aReturn.push({key: sKey, value: oFlexObject});
|
|
129
|
+
aReturn.push({ key: sKey, value: oFlexObject });
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
return aReturn;
|
|
@@ -144,7 +144,7 @@ sap.ui.define([
|
|
|
144
144
|
return true;
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
|
-
aReturn.push({key: sKey, value: oUpdatedFlexObject});
|
|
147
|
+
aReturn.push({ key: sKey, value: oUpdatedFlexObject });
|
|
148
148
|
});
|
|
149
149
|
|
|
150
150
|
return aReturn;
|
|
@@ -175,7 +175,7 @@ sap.ui.define([
|
|
|
175
175
|
var oNewDateTime = oCurrentDate.getTime() + 1;
|
|
176
176
|
oNextFlexObject.setCreation(new Date(oNewDateTime).toISOString());
|
|
177
177
|
var sKey = ObjectStorageUtils.createFlexKey(oNextFlexObject.getId());
|
|
178
|
-
aReturn.push({key: sKey, value: oNextFlexObject});
|
|
178
|
+
aReturn.push({ key: sKey, value: oNextFlexObject });
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
});
|
|
@@ -184,18 +184,31 @@ sap.ui.define([
|
|
|
184
184
|
return aReturn;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
function handleCondenseDelete(oDeleteInformation) {
|
|
188
|
-
|
|
187
|
+
function handleCondenseDelete(oDeleteInformation, aFlexObjects) {
|
|
188
|
+
const aReturn = [];
|
|
189
189
|
if (oDeleteInformation) {
|
|
190
190
|
Object.values(oDeleteInformation).forEach(function(aChangeIds) {
|
|
191
191
|
aChangeIds.forEach(function(sChangeId) {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
const sKey = ObjectStorageUtils.createFlexKey(sChangeId);
|
|
193
|
+
aFlexObjects.forEach(function(oFlexObject) {
|
|
194
|
+
if (oFlexObject.fileType !== "version" && oFlexObject.fileName === sChangeId) {
|
|
195
|
+
const oChangeDeleteVersion = aFlexObjects.find(
|
|
196
|
+
(oFlexObjectVersion) => oFlexObjectVersion.fileType === "version" && oFlexObjectVersion.id === oFlexObject.version);
|
|
197
|
+
if (oChangeDeleteVersion === undefined || oChangeDeleteVersion.isDraft) {
|
|
198
|
+
aReturn.push({ key: sKey, value: "delete" });
|
|
199
|
+
} else {
|
|
200
|
+
const oFlexObjectNew = { ...oFlexObject };
|
|
201
|
+
oFlexObjectNew.fileName += "_hide";
|
|
202
|
+
delete (oFlexObjectNew.content);
|
|
203
|
+
aReturn.push({ key: `${sKey}_hide`, value: oFlexObjectNew });
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
});
|
|
196
209
|
}
|
|
197
210
|
|
|
198
|
-
return
|
|
211
|
+
return aReturn;
|
|
199
212
|
}
|
|
200
213
|
|
|
201
214
|
/**
|
|
@@ -237,9 +250,24 @@ sap.ui.define([
|
|
|
237
250
|
});
|
|
238
251
|
|
|
239
252
|
const aVersionChain = await this.versions.getVersionChain.call(this, mPropertyBag, mPropertyBag.version);
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
253
|
+
var aHiddenChanges = [];
|
|
254
|
+
let aFilteredFlexObjects = aFlexObjects.filter(function(oFlexObject) {
|
|
255
|
+
if (oFlexObject.version === undefined || aVersionChain.includes(oFlexObject.version)) {
|
|
256
|
+
if (oFlexObject.fileName !== undefined && oFlexObject.fileName.endsWith("_hide")) {
|
|
257
|
+
aHiddenChanges.push(oFlexObject.fileName.replace("_hide", ""));
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
return false;
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
if (aHiddenChanges.length) {
|
|
266
|
+
aFilteredFlexObjects = aFilteredFlexObjects.filter((oFlexObject) =>
|
|
267
|
+
oFlexObject.fileName === undefined || !aHiddenChanges.includes(oFlexObject.fileName)
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
243
271
|
const aSortedFilteredFlexObjects = StorageUtils.sortFlexObjects(aFilteredFlexObjects);
|
|
244
272
|
const mGroupedFlexObjects = StorageUtils.getGroupedFlexObjects(aSortedFilteredFlexObjects);
|
|
245
273
|
const aResponses = StorageUtils.filterAndSortResponses(mGroupedFlexObjects);
|
|
@@ -374,33 +402,40 @@ sap.ui.define([
|
|
|
374
402
|
aObjectsToSet = aObjectsToSet.concat(handleCondenseCreate(oCondenseInformation.create, mPropertyBag));
|
|
375
403
|
aObjectsToSet = aObjectsToSet.concat(handleCondenseUpdate(oCondenseInformation.update, mPropertyBag.condensedChanges));
|
|
376
404
|
aObjectsToSet = aObjectsToSet.concat(handleCondenseReorder(oCondenseInformation.reorder, mPropertyBag.condensedChanges));
|
|
405
|
+
if (oCondenseInformation.delete) {
|
|
406
|
+
const aFlexObjects = await loadDataFromStorage({
|
|
407
|
+
storage: this.storage,
|
|
408
|
+
reference: mPropertyBag.reference
|
|
409
|
+
});
|
|
410
|
+
aObjectsToSet = aObjectsToSet.concat(handleCondenseDelete(oCondenseInformation.delete, aFlexObjects));
|
|
411
|
+
}
|
|
412
|
+
|
|
377
413
|
aObjectsToSet = _uniqBy(aObjectsToSet, "key");
|
|
378
414
|
|
|
379
415
|
var aPromises = [];
|
|
380
416
|
var aResponse = [];
|
|
381
|
-
aPromises = aPromises.concat(handleCondenseDelete.call(this, oCondenseInformation.delete));
|
|
382
417
|
|
|
383
418
|
const mFeatures = await this.loadFeatures();
|
|
384
419
|
let sDraftVersionId;
|
|
385
|
-
if (
|
|
386
|
-
mFeatures.isVersioningEnabled
|
|
387
|
-
&& mPropertyBag.layer === Layer.CUSTOMER
|
|
388
|
-
&& ((oCondenseInformation.create && Object.keys(oCondenseInformation.create).length !== 0)
|
|
389
|
-
|| (oCondenseInformation.update && Object.keys(oCondenseInformation.update).length !== 0)
|
|
390
|
-
|| (oCondenseInformation.reorder && Object.keys(oCondenseInformation.reorder).length !== 0))
|
|
391
|
-
) {
|
|
420
|
+
if (mFeatures.isVersioningEnabled && mPropertyBag.layer === Layer.CUSTOMER) {
|
|
392
421
|
// the reference for the versions have to be determined by a flex object
|
|
393
|
-
sDraftVersionId = await this.versions.getDraftId.call(this, mPropertyBag);
|
|
422
|
+
sDraftVersionId = await this.versions.getDraftId.call(this, mPropertyBag, aObjectsToSet);
|
|
394
423
|
}
|
|
395
424
|
|
|
396
425
|
aObjectsToSet.forEach(function(oItemToSet) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
426
|
+
if (oItemToSet.value === "delete") {
|
|
427
|
+
aPromises.push(this.storage.removeItem(oItemToSet.key));
|
|
428
|
+
} else {
|
|
429
|
+
const oFileContent = oItemToSet.key.endsWith("_hide") ? oItemToSet.value : oItemToSet.value.convertToFileContent();
|
|
430
|
+
if (sDraftVersionId) {
|
|
431
|
+
oFileContent.version = sDraftVersionId;
|
|
432
|
+
}
|
|
433
|
+
if (!oItemToSet.key.endsWith("_hide")) {
|
|
434
|
+
aResponse.push(oFileContent);
|
|
435
|
+
}
|
|
436
|
+
var vFlexObject = this.storage._itemsStoredAsObjects ? oFileContent : JSON.stringify(oFileContent);
|
|
437
|
+
aPromises.push(this.storage.setItem(oItemToSet.key, vFlexObject));
|
|
400
438
|
}
|
|
401
|
-
aResponse.push(oFileContent);
|
|
402
|
-
var vFlexObject = this.storage._itemsStoredAsObjects ? oFileContent : JSON.stringify(oFileContent);
|
|
403
|
-
aPromises.push(this.storage.setItem(oItemToSet.key, vFlexObject));
|
|
404
439
|
}.bind(this));
|
|
405
440
|
// discard draft when last draft change is delete
|
|
406
441
|
if (mFeatures.isVersioningEnabled && mPropertyBag.layer === Layer.CUSTOMER
|
|
@@ -419,7 +454,7 @@ sap.ui.define([
|
|
|
419
454
|
}
|
|
420
455
|
}
|
|
421
456
|
return Promise.all(aPromises).then(function() {
|
|
422
|
-
return Promise.resolve({response: aResponse});
|
|
457
|
+
return Promise.resolve({ response: aResponse });
|
|
423
458
|
});
|
|
424
459
|
},
|
|
425
460
|
|
|
@@ -427,13 +462,20 @@ sap.ui.define([
|
|
|
427
462
|
* @inheritDoc
|
|
428
463
|
*/
|
|
429
464
|
versions: {
|
|
430
|
-
async getDraftId(mPropertyBag) {
|
|
465
|
+
async getDraftId(mPropertyBag, aObjectsToSet) {
|
|
431
466
|
let aDraftFilenames = [];
|
|
432
467
|
if (mPropertyBag.condensedChanges) {
|
|
433
468
|
aDraftFilenames = mPropertyBag.condensedChanges.map((change) => {return change.sId;});
|
|
434
469
|
} else {
|
|
435
470
|
aDraftFilenames = mPropertyBag.flexObjects.map((flexObject) => {return flexObject.fileName;});
|
|
436
471
|
}
|
|
472
|
+
if (aObjectsToSet) {
|
|
473
|
+
aObjectsToSet.forEach(function(oObjectChange) {
|
|
474
|
+
if (oObjectChange.key.endsWith("_hide")) {
|
|
475
|
+
aDraftFilenames.push(oObjectChange.value.fileName);
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
}
|
|
437
479
|
|
|
438
480
|
const aVersions = await this.versions.load.call(this, mPropertyBag);
|
|
439
481
|
let oDraftVersion = aVersions.find((oVersion) => oVersion.isDraft);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2025 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/changes/descriptor/Applier",
|
|
9
|
-
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory"
|
|
10
|
-
], function(
|
|
11
|
-
Applier,
|
|
12
|
-
FlexObjectFactory
|
|
13
|
-
) {
|
|
14
|
-
"use strict";
|
|
15
|
-
|
|
16
|
-
const CHANGES_NAMESPACE = "$sap.ui.fl.changes";
|
|
17
|
-
/**
|
|
18
|
-
* Gets the <code>$sap.ui.fl.changes</code> section from the Manifest and returns it converted
|
|
19
|
-
* into <code>sap.ui.fl.apply._internal.flexObjects.FlexObject</code>
|
|
20
|
-
* @param {sap.ui.core.Manifest} oManifest - Manifest provided by sap.ui.core.Component
|
|
21
|
-
* @returns {sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange[]} Array of <code>sap.ui.fl.apply._internal.flexObjects.AppDescriptorChange</code>
|
|
22
|
-
*/
|
|
23
|
-
function getDescriptorChanges(oManifest) {
|
|
24
|
-
const aAppDescriptorChangesRaw = oManifest && oManifest.getEntry && oManifest.getEntry(CHANGES_NAMESPACE) && oManifest.getEntry(CHANGES_NAMESPACE).descriptor || [];
|
|
25
|
-
return aAppDescriptorChangesRaw.map(function(oChange) {
|
|
26
|
-
return FlexObjectFactory.createAppDescriptorChange(oChange);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
const InlineApplier = {
|
|
30
|
-
/**
|
|
31
|
-
* Applies inline manifest changes found in the <code>$sap.ui.fl.changes</code> section in the LOAD version of the manifest.
|
|
32
|
-
* @param {sap.ui.core.Manifest} oManifest - The manifest provided by sap.ui.core.Component.
|
|
33
|
-
* @param {object} mStrategy - The strategy for runtime or buildtime merging.
|
|
34
|
-
* @param {object} mStrategy.registry - The change handler registry.
|
|
35
|
-
* @param {function} mStrategy.handleError - The error handling strategy.
|
|
36
|
-
* @param {function} mStrategy.processTexts - The text postprocessing strategy.
|
|
37
|
-
* @returns {Promise} Resolves as soon as the changes are applied.
|
|
38
|
-
*/
|
|
39
|
-
applyChanges(oManifest, mStrategy) {
|
|
40
|
-
const aDescriptorChanges = getDescriptorChanges(oManifest);
|
|
41
|
-
const oManifestJSON = oManifest.getJson();
|
|
42
|
-
delete oManifestJSON[CHANGES_NAMESPACE];
|
|
43
|
-
return aDescriptorChanges.length ? Applier.applyChanges(oManifestJSON, aDescriptorChanges, mStrategy) : Promise.resolve();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
return InlineApplier;
|
|
47
|
-
});
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*!
|
|
3
|
-
* OpenUI5
|
|
4
|
-
* (c) Copyright 2025 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/apply/_internal/changes/descriptor/Applier",
|
|
10
|
-
"sap/ui/fl/apply/_internal/changes/descriptor/ApplyStrategyFactory",
|
|
11
|
-
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
12
|
-
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
13
|
-
"sap/ui/performance/Measurement",
|
|
14
|
-
"sap/ui/fl/Utils"
|
|
15
|
-
], function(
|
|
16
|
-
Applier,
|
|
17
|
-
ApplyStrategyFactory,
|
|
18
|
-
FlexState,
|
|
19
|
-
ManifestUtils,
|
|
20
|
-
Measurement,
|
|
21
|
-
Utils
|
|
22
|
-
) {
|
|
23
|
-
"use strict";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Flex hook for preprocessing manifest early. Merges descriptor changes if needed.
|
|
27
|
-
*
|
|
28
|
-
* @namespace sap.ui.fl.apply._internal.changes.descriptor.Preprocessor
|
|
29
|
-
* @since 1.74
|
|
30
|
-
* @version 1.141.2
|
|
31
|
-
* @private
|
|
32
|
-
* @ui5-restricted sap.ui.fl.apply._internal
|
|
33
|
-
*/
|
|
34
|
-
var Preprocessor = {
|
|
35
|
-
/**
|
|
36
|
-
* Preprocesses the manifest by applying descriptor changes.
|
|
37
|
-
* The processing is only done for components of the type "application".
|
|
38
|
-
*
|
|
39
|
-
* @param {object} oManifest - Raw manifest provided by core Component
|
|
40
|
-
* @param {object} oConfig - Copy of the configuration of loaded component
|
|
41
|
-
* @param {object} oConfig.asyncHints - Async hints passed from the app index to the core Component processing
|
|
42
|
-
* @param {object} oConfig.componentData - Component Data from the Component processing
|
|
43
|
-
* @returns {Promise<object>} - Processed manifest
|
|
44
|
-
*/
|
|
45
|
-
preprocessManifest(oManifest, oConfig) {
|
|
46
|
-
// stop processing if the component is not of the type application or component ID is missing
|
|
47
|
-
if (!Utils.isApplication(oManifest, true) || !oConfig.id) {
|
|
48
|
-
return Promise.resolve(oManifest);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
Measurement.start("flexStateInitialize", "Initialization of flex state", ["sap.ui.fl"]);
|
|
52
|
-
|
|
53
|
-
const oComponentData = oConfig.componentData || {};
|
|
54
|
-
const sReference = ManifestUtils.getFlexReference({
|
|
55
|
-
manifest: oManifest,
|
|
56
|
-
componentData: oComponentData
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// in case the asyncHints already mention that there is no change for the manifest, just trigger the loading
|
|
60
|
-
// skipLoadBundle has to be true as there is no guarantee that the flex bundle is already available at this point
|
|
61
|
-
if (!ManifestUtils.getChangeManifestFromAsyncHints(oConfig.asyncHints, sReference)) {
|
|
62
|
-
FlexState.initialize({
|
|
63
|
-
componentData: oComponentData,
|
|
64
|
-
asyncHints: oConfig.asyncHints,
|
|
65
|
-
rawManifest: oManifest,
|
|
66
|
-
componentId: oConfig.id,
|
|
67
|
-
reference: sReference,
|
|
68
|
-
skipLoadBundle: true
|
|
69
|
-
}).then(Measurement.end.bind(undefined, "flexStateInitialize"));
|
|
70
|
-
|
|
71
|
-
return Promise.resolve(oManifest);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// skipLoadBundle has to be true as there is no guarantee that the flex bundle is already available at this point
|
|
75
|
-
return FlexState.initialize({
|
|
76
|
-
componentData: oComponentData,
|
|
77
|
-
asyncHints: oConfig.asyncHints,
|
|
78
|
-
rawManifest: oManifest,
|
|
79
|
-
componentId: oConfig.id,
|
|
80
|
-
reference: sReference,
|
|
81
|
-
skipLoadBundle: true
|
|
82
|
-
}).then(function() {
|
|
83
|
-
Measurement.end("flexStateInitialize");
|
|
84
|
-
Measurement.start("flexAppDescriptorMerger", "Client side app descriptor merger", ["sap.ui.fl"]);
|
|
85
|
-
const oUpdatedManifest = { ...oManifest };
|
|
86
|
-
const aAppDescriptorChanges = FlexState.getAppDescriptorChanges(sReference);
|
|
87
|
-
return Applier.applyChanges(oUpdatedManifest, aAppDescriptorChanges, ApplyStrategyFactory.getRuntimeStrategy());
|
|
88
|
-
}).then(function(oManifest) {
|
|
89
|
-
Measurement.end("flexAppDescriptorMerger");
|
|
90
|
-
return oManifest;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
return Preprocessor;
|
|
96
|
-
});
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2025 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/core/Lib",
|
|
9
|
-
"sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation",
|
|
10
|
-
"sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog"
|
|
11
|
-
], function(
|
|
12
|
-
Lib,
|
|
13
|
-
ServiceValidation,
|
|
14
|
-
CustomFieldCAPDialog
|
|
15
|
-
) {
|
|
16
|
-
"use strict";
|
|
17
|
-
|
|
18
|
-
var oCurrentControl = null;
|
|
19
|
-
var oCAPDialog = null;
|
|
20
|
-
var oTextBundle = Lib.getResourceBundleFor("sap.ui.fl");
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @namespace sap.ui.fl.write._internal.fieldExtensibility.CAPAccess
|
|
24
|
-
* @since 1.93
|
|
25
|
-
* @private
|
|
26
|
-
* @author SAP SE
|
|
27
|
-
* @version 1.141.2
|
|
28
|
-
*/
|
|
29
|
-
var CAPAccess = {};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @inheritDoc
|
|
33
|
-
*/
|
|
34
|
-
CAPAccess.getTexts = function() {
|
|
35
|
-
return {
|
|
36
|
-
headerText: oTextBundle.getText("BUSINESS_CONTEXT_TITLE"),
|
|
37
|
-
tooltip: oTextBundle.getText("BTN_ADD_FIELD")
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @inheritDoc
|
|
43
|
-
*/
|
|
44
|
-
CAPAccess.isExtensibilityEnabled = function() {
|
|
45
|
-
// For now, always enable CAP extensibility as it is controlled
|
|
46
|
-
// via the parameter in FieldExtensibility
|
|
47
|
-
return true;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @inheritDoc
|
|
52
|
-
*/
|
|
53
|
-
CAPAccess.getExtensionData = function() {
|
|
54
|
-
// For now collect all info here
|
|
55
|
-
// Should reuse existing utils, e.g. getBoundEntitySet in the future
|
|
56
|
-
var oModel = oCurrentControl.getModel();
|
|
57
|
-
var sPath = oCurrentControl.getBindingContext().getPath();
|
|
58
|
-
|
|
59
|
-
if (oModel.isA("sap.ui.model.odata.v2.ODataModel")) {
|
|
60
|
-
// v2 Models not supported yet
|
|
61
|
-
return Promise.reject();
|
|
62
|
-
} else if (oModel.isA("sap.ui.model.odata.v4.ODataModel")) {
|
|
63
|
-
var oMetaModel = oModel.getMetaModel();
|
|
64
|
-
var sMetaPath = oMetaModel.getMetaPath(sPath);
|
|
65
|
-
|
|
66
|
-
return oMetaModel.requestObject(sMetaPath).then(function(oEntitySet) {
|
|
67
|
-
var mScope = oMetaModel.fetchEntityContainer().getResult();
|
|
68
|
-
var mEntityContainer = mScope[mScope.$EntityContainer];
|
|
69
|
-
return {
|
|
70
|
-
boundEntitySet: oEntitySet,
|
|
71
|
-
entityTypes: Object.values(mEntityContainer).map(function(oEntitySet) {
|
|
72
|
-
return oEntitySet.$Type;
|
|
73
|
-
}).filter(Boolean)
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return Promise.reject();
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @inheritDoc
|
|
82
|
-
*/
|
|
83
|
-
CAPAccess.onControlSelected = function(oControl) {
|
|
84
|
-
oCurrentControl = oControl;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @inheritDoc
|
|
89
|
-
*/
|
|
90
|
-
CAPAccess.onTriggerCreateExtensionData = function(aBusinessContextInfos, sRtaStyleClassName) {
|
|
91
|
-
oCAPDialog ||= new CustomFieldCAPDialog();
|
|
92
|
-
oCAPDialog.open(aBusinessContextInfos, sRtaStyleClassName);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Checks if a given service is outdated
|
|
97
|
-
*
|
|
98
|
-
* @public
|
|
99
|
-
* @param {string|map} vServiceInfo - service uri or service info map containing <code>serviceName</code>, <code>serviceVersion</code> and <code>serviceType</code>
|
|
100
|
-
* @return {boolean} returns true if the service is outdated
|
|
101
|
-
*/
|
|
102
|
-
CAPAccess.isServiceOutdated = function(vServiceInfo) {
|
|
103
|
-
return ServiceValidation.isServiceOutdated(vServiceInfo);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Sets a given service valid.
|
|
108
|
-
*
|
|
109
|
-
* @public
|
|
110
|
-
* @param {string|map} vServiceInfo - service uri or service info map containing <code>serviceName</code>, <code>serviceVersion</code> and <code>serviceType</code>
|
|
111
|
-
* @return {void}
|
|
112
|
-
*/
|
|
113
|
-
CAPAccess.setServiceValid = function(vServiceInfo) {
|
|
114
|
-
ServiceValidation.setServiceValid(vServiceInfo);
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Invalidates a given service. Once a service has been validated or invalidation period is over the service becomes valid again
|
|
119
|
-
*
|
|
120
|
-
* @public
|
|
121
|
-
* @param {string|map} vServiceInfo - service uri or service info map containing <code>serviceName</code>, <code>serviceVersion</code> and <code>serviceType</code>
|
|
122
|
-
* @return {void}
|
|
123
|
-
*/
|
|
124
|
-
CAPAccess.setServiceInvalid = function(vServiceInfo) {
|
|
125
|
-
ServiceValidation.setServiceInvalid(vServiceInfo);
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
return CAPAccess;
|
|
129
|
-
});
|