@sapui5/sap.fe.core 1.127.2 → 1.129.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 +1 -1
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/ActionRuntime.js +3 -9
- package/src/sap/fe/core/ActionRuntime.ts +3 -7
- package/src/sap/fe/core/AppComponent.js +9 -19
- package/src/sap/fe/core/AppComponent.ts +2 -12
- package/src/sap/fe/core/AppStateHandler.js +3 -11
- package/src/sap/fe/core/AppStateHandler.ts +0 -7
- package/src/sap/fe/core/BaseController.js +4 -8
- package/src/sap/fe/core/BaseController.ts +0 -5
- package/src/sap/fe/core/CommonUtils.js +1 -9
- package/src/sap/fe/core/CommonUtils.ts +4 -8
- package/src/sap/fe/core/ExtensionAPI.js +10 -25
- package/src/sap/fe/core/ExtensionAPI.ts +4 -19
- package/src/sap/fe/core/InsightsFormattersExtension.js +5 -3
- package/src/sap/fe/core/PageController.js +7 -10
- package/src/sap/fe/core/PageController.ts +0 -3
- package/src/sap/fe/core/ResourceModel.js +3 -5
- package/src/sap/fe/core/ResourceModel.ts +0 -2
- package/src/sap/fe/core/ReuseComponent.js +8 -14
- package/src/sap/fe/core/ReuseComponent.ts +0 -6
- package/src/sap/fe/core/TemplateComponent.js +37 -9
- package/src/sap/fe/core/TemplateComponent.ts +3 -2
- package/src/sap/fe/core/TemplateModel.js +5 -5
- package/src/sap/fe/core/TemplateModel.ts +0 -1
- package/src/sap/fe/core/UIProvider.js +1 -1
- package/src/sap/fe/core/UIProvider.ts +44 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.js +7 -12
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.ts +0 -5
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +61 -65
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +60 -63
- package/src/sap/fe/core/buildingBlocks/templating/AttributeModel.js +3 -3
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockFormatter.js +1 -1
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockSupport.js +21 -5
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockSupport.ts +0 -4
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplateProcessor.js +6 -18
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplateProcessor.ts +3 -20
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplatingBase.js +5 -11
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplatingBase.ts +0 -6
- package/src/sap/fe/core/buildingBlocks/templating/RuntimeBuildingBlock.js +3 -3
- package/src/sap/fe/core/buildingBlocks/templating/RuntimeBuildingBlockFragment.js +11 -10
- package/src/sap/fe/core/buildingBlocks/templating/RuntimeBuildingBlockFragment.ts +0 -1
- package/src/sap/fe/core/controllerextensions/BaseControllerExtension.js +5 -7
- package/src/sap/fe/core/controllerextensions/BaseControllerExtension.ts +0 -1
- package/src/sap/fe/core/controllerextensions/BusyLocker.js +1 -1
- package/src/sap/fe/core/controllerextensions/CollaborativeDraft.js +3 -10
- package/src/sap/fe/core/controllerextensions/CollaborativeDraft.ts +0 -7
- package/src/sap/fe/core/controllerextensions/ContextSharing.js +5 -8
- package/src/sap/fe/core/controllerextensions/ContextSharing.ts +0 -2
- package/src/sap/fe/core/controllerextensions/EditFlow.js +225 -155
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +248 -164
- package/src/sap/fe/core/controllerextensions/Feedback.js +1 -3
- package/src/sap/fe/core/controllerextensions/Feedback.ts +0 -2
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +4 -7
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +0 -3
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +8 -25
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +2 -21
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +22 -34
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +25 -31
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +8 -21
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +4 -15
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +68 -31
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +78 -32
- package/src/sap/fe/core/controllerextensions/PageReady.js +4 -4
- package/src/sap/fe/core/controllerextensions/Paginator.js +4 -8
- package/src/sap/fe/core/controllerextensions/Paginator.ts +0 -4
- package/src/sap/fe/core/controllerextensions/Placeholder.js +4 -4
- package/src/sap/fe/core/controllerextensions/Recommendations.js +15 -24
- package/src/sap/fe/core/controllerextensions/Recommendations.ts +13 -20
- package/src/sap/fe/core/controllerextensions/Routing.js +4 -10
- package/src/sap/fe/core/controllerextensions/Routing.ts +0 -6
- package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
- package/src/sap/fe/core/controllerextensions/Share.js +17 -11
- package/src/sap/fe/core/controllerextensions/Share.ts +10 -5
- package/src/sap/fe/core/controllerextensions/SideEffects.js +49 -45
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +54 -41
- package/src/sap/fe/core/controllerextensions/Telemetry.js +4 -4
- package/src/sap/fe/core/controllerextensions/ViewState.js +10 -34
- package/src/sap/fe/core/controllerextensions/ViewState.ts +3 -49
- package/src/sap/fe/core/controllerextensions/cards/CollaborationManager.js +6 -8
- package/src/sap/fe/core/controllerextensions/cards/CollaborationManager.ts +0 -1
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +1 -2
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +0 -1
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +4 -3
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +1 -1
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.block.js +16 -12
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.block.tsx +4 -1
- package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +126 -74
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +158 -91
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +1 -22
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +0 -20
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js +10 -20
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.ts +11 -17
- package/src/sap/fe/core/controllerextensions/editFlow/editFlowConstants.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.js +191 -767
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.ts +277 -1024
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +1 -6
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +0 -5
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +381 -250
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +467 -301
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher.js +2 -6
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher.ts +0 -5
- package/src/sap/fe/core/controllerextensions/recommendations/Telemetry.js +2 -6
- package/src/sap/fe/core/controllerextensions/recommendations/Telemetry.ts +4 -6
- package/src/sap/fe/core/controllerextensions/routing/ContextPathHelper.js +1 -6
- package/src/sap/fe/core/controllerextensions/routing/ContextPathHelper.ts +0 -4
- package/src/sap/fe/core/controllerextensions/routing/NavigationReason.js +1 -1
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +4 -41
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +1 -37
- package/src/sap/fe/core/controllerextensions/viewState/IViewStateContributor.js +1 -1
- package/src/sap/fe/core/controllerextensions/viewState/IViewStateContributor.ts +0 -1
- package/src/sap/fe/core/controls/Any.js +1 -2
- package/src/sap/fe/core/controls/Any.ts +0 -1
- package/src/sap/fe/core/controls/AnyElement.js +1 -2
- package/src/sap/fe/core/controls/AnyElement.ts +0 -1
- package/src/sap/fe/core/controls/CommandExecution.js +3 -3
- package/src/sap/fe/core/controls/ComponentLoader.js +23 -10
- package/src/sap/fe/core/controls/ComponentLoader.ts +0 -1
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.block.js +10 -13
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.block.tsx +0 -6
- package/src/sap/fe/core/controls/EventDelegateHook.js +8 -9
- package/src/sap/fe/core/controls/FormElementWrapper.js +7 -7
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +3 -1
- package/src/sap/fe/core/controls/Recommendations/ConfirmRecommendationDialog.block.js +140 -24
- package/src/sap/fe/core/controls/Recommendations/ConfirmRecommendationDialog.block.tsx +141 -10
- package/src/sap/fe/core/converters/ConverterContext.js +8 -30
- package/src/sap/fe/core/converters/ConverterContext.ts +7 -29
- package/src/sap/fe/core/converters/ManifestSettings.js +37 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +12 -3
- package/src/sap/fe/core/converters/ManifestWrapper.js +12 -40
- package/src/sap/fe/core/converters/ManifestWrapper.ts +13 -46
- package/src/sap/fe/core/converters/MetaModelConverter.js +44 -48
- package/src/sap/fe/core/converters/MetaModelConverter.ts +50 -48
- package/src/sap/fe/core/converters/TemplateConverter.js +3 -2
- package/src/sap/fe/core/converters/TemplateConverter.ts +0 -1
- package/src/sap/fe/core/converters/annotations/DataField.js +1 -28
- package/src/sap/fe/core/converters/annotations/DataField.ts +0 -26
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +24 -19
- package/src/sap/fe/core/converters/controls/Common/Action.js +13 -26
- package/src/sap/fe/core/converters/controls/Common/Action.ts +13 -31
- package/src/sap/fe/core/converters/controls/Common/Chart.js +5 -6
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +0 -5
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +2 -4
- package/src/sap/fe/core/converters/controls/Common/Criticality.ts +1 -2
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +1 -5
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +0 -4
- package/src/sap/fe/core/converters/controls/Common/Form.js +3 -2
- package/src/sap/fe/core/converters/controls/Common/Form.ts +2 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -7
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +11 -6
- package/src/sap/fe/core/converters/controls/Common/Table.js +159 -141
- package/src/sap/fe/core/converters/controls/Common/Table.ts +166 -122
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +5 -30
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +3 -29
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +43 -55
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +43 -47
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +1 -4
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +0 -3
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +3 -8
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +2 -7
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +1 -11
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +0 -9
- package/src/sap/fe/core/converters/helpers/Aggregation.js +1 -10
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +0 -9
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +1 -7
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +0 -6
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.js +1 -9
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.ts +0 -8
- package/src/sap/fe/core/converters/helpers/ID.js +1 -2
- package/src/sap/fe/core/converters/helpers/ID.ts +0 -1
- package/src/sap/fe/core/converters/helpers/InsightsHelpers.js +1 -2
- package/src/sap/fe/core/converters/helpers/InsightsHelpers.ts +0 -1
- package/src/sap/fe/core/converters/helpers/IssueManager.js +1 -1
- package/src/sap/fe/core/converters/helpers/Key.js +1 -5
- package/src/sap/fe/core/converters/helpers/Key.ts +0 -4
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +1 -2
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +0 -1
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +1 -1
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +1 -7
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +0 -6
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +6 -27
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +9 -26
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +1 -16
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +0 -15
- package/src/sap/fe/core/definition/FEDefinition.js +2550 -0
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +11 -12
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +9 -10
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +8 -2
- package/src/sap/fe/core/formatters/CollaborationFormatter.ts +0 -2
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.js +1 -2
- package/src/sap/fe/core/formatters/FPMFormatter.ts +0 -1
- package/src/sap/fe/core/formatters/FiscalFormat.js +9 -14
- package/src/sap/fe/core/formatters/FiscalFormat.ts +0 -11
- package/src/sap/fe/core/formatters/KPIFormatter.js +1 -4
- package/src/sap/fe/core/formatters/KPIFormatter.ts +0 -3
- package/src/sap/fe/core/formatters/StandardFormatter.js +6 -3
- package/src/sap/fe/core/formatters/StandardFormatter.ts +6 -2
- package/src/sap/fe/core/formatters/ValueFormatter.js +1 -4
- package/src/sap/fe/core/formatters/ValueFormatter.ts +0 -3
- package/src/sap/fe/core/fpm/Component.js +14 -17
- package/src/sap/fe/core/fpm/Component.ts +7 -10
- package/src/sap/fe/core/fpm/manifest.json +1 -1
- package/src/sap/fe/core/helpers/AdaptiveCardExpressionCompiler.js +3 -10
- package/src/sap/fe/core/helpers/AdaptiveCardExpressionCompiler.ts +0 -9
- package/src/sap/fe/core/helpers/AppStartupHelper.js +1 -13
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +0 -11
- package/src/sap/fe/core/helpers/BindingHelper.js +1 -4
- package/src/sap/fe/core/helpers/BindingHelper.ts +0 -3
- package/src/sap/fe/core/helpers/BindingToolkitEvaluator.js +1 -2
- package/src/sap/fe/core/helpers/BindingToolkitEvaluator.ts +0 -1
- package/src/sap/fe/core/helpers/DeleteHelper.js +61 -32
- package/src/sap/fe/core/helpers/DeleteHelper.ts +79 -33
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +1 -2
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +0 -1
- package/src/sap/fe/core/helpers/EditState.js +1 -1
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +1 -2
- package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +0 -1
- package/src/sap/fe/core/helpers/FPMHelper.js +1 -2
- package/src/sap/fe/core/helpers/FPMHelper.ts +0 -1
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +1 -8
- package/src/sap/fe/core/helpers/KeepAliveHelper.ts +0 -7
- package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +7 -1
- package/src/sap/fe/core/helpers/LoaderUtils.js +1 -1
- package/src/sap/fe/core/helpers/ManifestHelper.js +1 -3
- package/src/sap/fe/core/helpers/ManifestHelper.ts +0 -2
- package/src/sap/fe/core/helpers/MessageStrip.js +1 -1
- package/src/sap/fe/core/helpers/MetaModelFunction.js +3 -8
- package/src/sap/fe/core/helpers/MetaModelFunction.ts +0 -5
- package/src/sap/fe/core/helpers/MetaPath.js +1 -7
- package/src/sap/fe/core/helpers/MetaPath.ts +0 -6
- package/src/sap/fe/core/helpers/ModelHelper.js +55 -35
- package/src/sap/fe/core/helpers/ModelHelper.ts +64 -38
- package/src/sap/fe/core/helpers/PasteHelper.js +77 -24
- package/src/sap/fe/core/helpers/PasteHelper.ts +105 -23
- package/src/sap/fe/core/helpers/PromiseKeeper.js +1 -3
- package/src/sap/fe/core/helpers/PromiseKeeper.ts +0 -2
- package/src/sap/fe/core/helpers/RecommendationHelper.js +1 -4
- package/src/sap/fe/core/helpers/RecommendationHelper.ts +0 -3
- package/src/sap/fe/core/helpers/ResourceModelHelper.js +1 -3
- package/src/sap/fe/core/helpers/ResourceModelHelper.ts +3 -4
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -2
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +0 -1
- package/src/sap/fe/core/helpers/SizeHelper.js +1 -2
- package/src/sap/fe/core/helpers/SizeHelper.ts +0 -1
- package/src/sap/fe/core/helpers/StableIdHelper.js +7 -17
- package/src/sap/fe/core/helpers/StableIdHelper.ts +7 -17
- package/src/sap/fe/core/helpers/StandardRecommendationHelper.js +1 -12
- package/src/sap/fe/core/helpers/StandardRecommendationHelper.ts +0 -11
- package/src/sap/fe/core/helpers/Synchronization.js +1 -1
- package/src/sap/fe/core/helpers/TitleHelper.js +1 -10
- package/src/sap/fe/core/helpers/TitleHelper.ts +0 -9
- package/src/sap/fe/core/helpers/ToES6Promise.js +1 -2
- package/src/sap/fe/core/helpers/ToES6Promise.ts +0 -1
- package/src/sap/fe/core/helpers/TypeGuards.js +1 -15
- package/src/sap/fe/core/helpers/TypeGuards.ts +0 -14
- package/src/sap/fe/core/helpers/WebSocket.js +1 -1
- package/src/sap/fe/core/library.js +10 -44
- package/src/sap/fe/core/library.support.js +1 -1
- package/src/sap/fe/core/library.ts +8 -45
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +1 -6
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +0 -5
- package/src/sap/fe/core/messagebundle.properties +12 -1
- package/src/sap/fe/core/messagebundle_ar.properties +8 -0
- package/src/sap/fe/core/messagebundle_bg.properties +8 -0
- package/src/sap/fe/core/messagebundle_ca.properties +8 -0
- package/src/sap/fe/core/messagebundle_cnr.properties +8 -0
- package/src/sap/fe/core/messagebundle_cs.properties +9 -1
- package/src/sap/fe/core/messagebundle_cy.properties +8 -0
- package/src/sap/fe/core/messagebundle_da.properties +8 -0
- package/src/sap/fe/core/messagebundle_de.properties +8 -0
- package/src/sap/fe/core/messagebundle_el.properties +8 -0
- package/src/sap/fe/core/messagebundle_en.properties +8 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +8 -0
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +144 -65
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +8 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +273 -194
- package/src/sap/fe/core/messagebundle_es.properties +9 -1
- package/src/sap/fe/core/messagebundle_es_MX.properties +8 -0
- package/src/sap/fe/core/messagebundle_et.properties +8 -0
- package/src/sap/fe/core/messagebundle_fi.properties +8 -0
- package/src/sap/fe/core/messagebundle_fr.properties +8 -0
- package/src/sap/fe/core/messagebundle_fr_CA.properties +8 -0
- package/src/sap/fe/core/messagebundle_hi.properties +9 -1
- package/src/sap/fe/core/messagebundle_hr.properties +8 -0
- package/src/sap/fe/core/messagebundle_hu.properties +8 -0
- package/src/sap/fe/core/messagebundle_id.properties +12 -4
- package/src/sap/fe/core/messagebundle_it.properties +8 -0
- package/src/sap/fe/core/messagebundle_iw.properties +8 -0
- package/src/sap/fe/core/messagebundle_ja.properties +8 -0
- package/src/sap/fe/core/messagebundle_kk.properties +8 -0
- package/src/sap/fe/core/messagebundle_ko.properties +8 -0
- package/src/sap/fe/core/messagebundle_lt.properties +8 -0
- package/src/sap/fe/core/messagebundle_lv.properties +8 -0
- package/src/sap/fe/core/messagebundle_mk.properties +8 -0
- package/src/sap/fe/core/messagebundle_ms.properties +8 -0
- package/src/sap/fe/core/messagebundle_nl.properties +16 -8
- package/src/sap/fe/core/messagebundle_no.properties +8 -0
- package/src/sap/fe/core/messagebundle_pl.properties +8 -0
- package/src/sap/fe/core/messagebundle_pt.properties +8 -0
- package/src/sap/fe/core/messagebundle_pt_PT.properties +8 -0
- package/src/sap/fe/core/messagebundle_ro.properties +8 -0
- package/src/sap/fe/core/messagebundle_ru.properties +8 -0
- package/src/sap/fe/core/messagebundle_sh.properties +8 -0
- package/src/sap/fe/core/messagebundle_sk.properties +8 -0
- package/src/sap/fe/core/messagebundle_sl.properties +8 -0
- package/src/sap/fe/core/messagebundle_sr.properties +8 -0
- package/src/sap/fe/core/messagebundle_sv.properties +8 -0
- package/src/sap/fe/core/messagebundle_th.properties +12 -4
- package/src/sap/fe/core/messagebundle_tr.properties +8 -0
- package/src/sap/fe/core/messagebundle_uk.properties +10 -2
- package/src/sap/fe/core/messagebundle_vi.properties +8 -0
- package/src/sap/fe/core/messagebundle_zh_CN.properties +8 -0
- package/src/sap/fe/core/messagebundle_zh_TW.properties +8 -0
- package/src/sap/fe/core/operationsHelper.js +22 -7
- package/src/sap/fe/core/operationsHelper.ts +24 -5
- package/src/sap/fe/core/rootView/Fcl.controller.js +7 -27
- package/src/sap/fe/core/rootView/Fcl.controller.ts +0 -18
- package/src/sap/fe/core/rootView/NavContainer.controller.js +7 -12
- package/src/sap/fe/core/rootView/NavContainer.controller.ts +0 -5
- package/src/sap/fe/core/rootView/RootViewBaseController.js +10 -24
- package/src/sap/fe/core/rootView/RootViewBaseController.ts +3 -16
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +3 -3
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +3 -3
- package/src/sap/fe/core/services/CollaborationManagerServiceFactory.js +4 -4
- package/src/sap/fe/core/services/CollaborativeToolsServiceFactory.js +3 -3
- package/src/sap/fe/core/services/ContextSharingServiceFactory.js +3 -4
- package/src/sap/fe/core/services/ContextSharingServiceFactory.ts +0 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +13 -20
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +11 -17
- package/src/sap/fe/core/services/NavigationServiceFactory.js +11 -21
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +4 -17
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +3 -3
- package/src/sap/fe/core/services/RoutingServiceFactory.js +7 -19
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +0 -12
- package/src/sap/fe/core/services/ShellServicesFactory.js +8 -44
- package/src/sap/fe/core/services/ShellServicesFactory.ts +1 -41
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +19 -60
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +14 -57
- package/src/sap/fe/core/services/TelemetryServiceFactory.js +6 -14
- package/src/sap/fe/core/services/TelemetryServiceFactory.ts +2 -10
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +17 -7
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +17 -3
- package/src/sap/fe/core/services/ValueHelpHistoryServiceFactory.js +11 -24
- package/src/sap/fe/core/services/ValueHelpHistoryServiceFactory.ts +0 -19
- package/src/sap/fe/core/services/collaborativeDraftServiceFactory.js +3 -31
- package/src/sap/fe/core/services/collaborativeDraftServiceFactory.ts +0 -27
- package/src/sap/fe/core/services/valueHelpService/HistoryOptOutProvider.js +1 -4
- package/src/sap/fe/core/services/valueHelpService/HistoryOptOutProvider.ts +0 -3
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +7 -7
- package/src/sap/fe/core/support/AnnotationIssue.support.js +1 -1
- package/src/sap/fe/core/support/CollectionFacetMissingID.support.js +1 -1
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +1 -1
- package/src/sap/fe/core/support/CommonHelper.js +4 -1
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +1 -1
- package/src/sap/fe/core/templating/ActionHelper.js +1 -2
- package/src/sap/fe/core/templating/ActionHelper.ts +0 -1
- package/src/sap/fe/core/templating/CommonFormatters.js +1 -2
- package/src/sap/fe/core/templating/CommonFormatters.ts +0 -1
- package/src/sap/fe/core/templating/CriticalityFormatters.js +1 -6
- package/src/sap/fe/core/templating/CriticalityFormatters.ts +0 -5
- package/src/sap/fe/core/templating/DataFieldFormatters.js +1 -2
- package/src/sap/fe/core/templating/DataFieldFormatters.ts +0 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.js +1 -18
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +0 -17
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +6 -1
- package/src/sap/fe/core/templating/EntitySetHelper.js +1 -4
- package/src/sap/fe/core/templating/EntitySetHelper.ts +0 -3
- package/src/sap/fe/core/templating/EntityTypeHelper.js +4 -5
- package/src/sap/fe/core/templating/EntityTypeHelper.ts +3 -4
- package/src/sap/fe/core/templating/FieldControlHelper.js +4 -9
- package/src/sap/fe/core/templating/FieldControlHelper.ts +3 -9
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/PropertyFormatters.js +1 -1
- package/src/sap/fe/core/templating/PropertyHelper.js +1 -31
- package/src/sap/fe/core/templating/PropertyHelper.ts +0 -30
- package/src/sap/fe/core/templating/SemanticObjectHelper.js +1 -7
- package/src/sap/fe/core/templating/SemanticObjectHelper.ts +0 -6
- package/src/sap/fe/core/templating/UIFormatters.js +18 -14
- package/src/sap/fe/core/templating/UIFormatters.ts +30 -18
- package/src/sap/fe/core/type/Date.js +3 -6
- package/src/sap/fe/core/type/Date.ts +0 -3
- package/src/sap/fe/core/type/DateTimeWithTimezone.js +3 -3
- package/src/sap/fe/core/type/EDM.js +1 -1
- package/src/sap/fe/core/type/Email.js +3 -3
- package/src/sap/fe/core/type/FiscalDate.js +3 -9
- package/src/sap/fe/core/type/FiscalDate.ts +0 -6
- package/src/sap/fe/core/type/InputMask.js +3 -7
- package/src/sap/fe/core/type/InputMask.ts +0 -4
|
@@ -41,8 +41,8 @@ import type Event from "sap/ui/base/Event";
|
|
|
41
41
|
import type Control from "sap/ui/core/Control";
|
|
42
42
|
import Library from "sap/ui/core/Lib";
|
|
43
43
|
import Messaging from "sap/ui/core/Messaging";
|
|
44
|
-
import coreLibrary from "sap/ui/core/library";
|
|
45
44
|
import type Message from "sap/ui/core/message/Message";
|
|
45
|
+
import MessageType from "sap/ui/core/message/MessageType";
|
|
46
46
|
import type View from "sap/ui/core/mvc/View";
|
|
47
47
|
import type MultiValueFieldItem from "sap/ui/mdc/field/MultiValueFieldItem";
|
|
48
48
|
import type Binding from "sap/ui/model/Binding";
|
|
@@ -76,10 +76,12 @@ export type CreateParameters = {
|
|
|
76
76
|
parentControl: View;
|
|
77
77
|
inactive?: boolean;
|
|
78
78
|
beforeCreateCallBack?: Function;
|
|
79
|
+
afterCreateCallBack?: (context: ODataV4Context) => Promise<void>;
|
|
79
80
|
skipParameterDialog?: boolean;
|
|
80
81
|
creationMode?: string;
|
|
81
82
|
createAtEnd?: boolean;
|
|
82
83
|
parentContext?: ODataV4Context;
|
|
84
|
+
creationDialogFields?: string[];
|
|
83
85
|
};
|
|
84
86
|
|
|
85
87
|
export type CancelParameters = { cancelButton: Button; skipDiscardPopover: boolean; beforeCancelCallBack?: Function };
|
|
@@ -118,7 +120,6 @@ class TransactionHelper {
|
|
|
118
120
|
|
|
119
121
|
/**
|
|
120
122
|
* Validates a document.
|
|
121
|
-
*
|
|
122
123
|
* @param oContext Context of the document to be validated
|
|
123
124
|
* @param [mParameters] Can contain the following attributes:
|
|
124
125
|
* @param [mParameters.data] A map of data that should be validated
|
|
@@ -148,7 +149,6 @@ class TransactionHelper {
|
|
|
148
149
|
|
|
149
150
|
/**
|
|
150
151
|
* Retrieves defatul values from the DefaultValue function.
|
|
151
|
-
*
|
|
152
152
|
* @param listBinding The list binding to be used for creation
|
|
153
153
|
* @returns A promise with an object containing the default values (or undefined if there's no default value function)
|
|
154
154
|
*/
|
|
@@ -186,7 +186,6 @@ class TransactionHelper {
|
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
188
|
* Checks if a list binding corresponds to a hierarchy.
|
|
189
|
-
*
|
|
190
189
|
* @param listBinding
|
|
191
190
|
* @returns True if the list binding is hierarchical.
|
|
192
191
|
*/
|
|
@@ -194,9 +193,18 @@ class TransactionHelper {
|
|
|
194
193
|
return (listBinding.getAggregation() as { hierarchyQualifier?: string } | undefined)?.hierarchyQualifier ? true : false;
|
|
195
194
|
}
|
|
196
195
|
|
|
196
|
+
/**
|
|
197
|
+
* Checks if the given list binding is analytical.
|
|
198
|
+
* @param listBinding The list binding to check
|
|
199
|
+
* @returns TRUE if the list binding is analytical, `false` otherwise.
|
|
200
|
+
*/
|
|
201
|
+
isListBindingAnalytical(listBinding: ODataListBinding): boolean {
|
|
202
|
+
const aggregation = listBinding.getAggregation() as { hierarchyQualifier?: string } | undefined;
|
|
203
|
+
return aggregation !== undefined && !aggregation.hierarchyQualifier;
|
|
204
|
+
}
|
|
205
|
+
|
|
197
206
|
/**
|
|
198
207
|
* Creates a new context in a list binding. Handles both flat and hierarchical cases.
|
|
199
|
-
*
|
|
200
208
|
* @param listBinding
|
|
201
209
|
* @param initialData Initial data to create the context.
|
|
202
210
|
* @param options Creation options.
|
|
@@ -249,6 +257,18 @@ class TransactionHelper {
|
|
|
249
257
|
}
|
|
250
258
|
|
|
251
259
|
return listBindingForCreation.create(dataForCreation, true);
|
|
260
|
+
} else if (this.isListBindingAnalytical(listBinding)) {
|
|
261
|
+
if (listBinding.isRelative()) {
|
|
262
|
+
throw new Error("Creating a new document in a analytical table is supported only in a ListReport");
|
|
263
|
+
} else {
|
|
264
|
+
// We use a temporary flat listBinding for the creation, to avoid adding the new context in the table (we don't want to display it until it's saved)
|
|
265
|
+
const model = listBinding.getModel();
|
|
266
|
+
const listBindingForCreation = model.bindList(listBinding.getPath(), undefined, undefined, undefined, {
|
|
267
|
+
$$groupId: listBinding.getGroupId(),
|
|
268
|
+
$$updateGroupId: listBinding.getUpdateGroupId()
|
|
269
|
+
});
|
|
270
|
+
return listBindingForCreation.create(dataForCreation, true);
|
|
271
|
+
}
|
|
252
272
|
} else {
|
|
253
273
|
return listBinding.create(dataForCreation, true, options.createAtEnd, options.createInactive);
|
|
254
274
|
}
|
|
@@ -267,7 +287,6 @@ class TransactionHelper {
|
|
|
267
287
|
|
|
268
288
|
/**
|
|
269
289
|
* Creates a new document.
|
|
270
|
-
*
|
|
271
290
|
* @param mainListBinding OData V4 ListBinding object
|
|
272
291
|
* @param [inParameters] Optional, can contain the following attributes:
|
|
273
292
|
* @param [inParameters.data] A map of data that should be sent within the POST
|
|
@@ -306,7 +325,7 @@ class TransactionHelper {
|
|
|
306
325
|
const resourceBundleCore = Library.getResourceBundleFor("sap.fe.core")!;
|
|
307
326
|
const messageHandlingKey = messageHandler.registerToHoldMessages();
|
|
308
327
|
try {
|
|
309
|
-
newDocumentContext = await this.
|
|
328
|
+
newDocumentContext = await this.performCreation(
|
|
310
329
|
mainListBinding,
|
|
311
330
|
parameters,
|
|
312
331
|
appComponent,
|
|
@@ -342,7 +361,6 @@ class TransactionHelper {
|
|
|
342
361
|
|
|
343
362
|
/**
|
|
344
363
|
* Creates a new document.
|
|
345
|
-
*
|
|
346
364
|
* @param mainListBinding OData V4 ListBinding object.
|
|
347
365
|
* @param parameters Contains the following attributes
|
|
348
366
|
* @param parameters.data A map of data that should be sent within the POST
|
|
@@ -385,8 +403,7 @@ class TransactionHelper {
|
|
|
385
403
|
}
|
|
386
404
|
|
|
387
405
|
/**
|
|
388
|
-
* Creates a new document either via new Action or
|
|
389
|
-
*
|
|
406
|
+
* Creates a new document either via new Action or standard POST create.
|
|
390
407
|
* @param mainListBinding OData V4 ListBinding object
|
|
391
408
|
* @param parameters Contains the following attributes
|
|
392
409
|
* @param parameters.data A map of data that should be sent within the POST
|
|
@@ -406,7 +423,7 @@ class TransactionHelper {
|
|
|
406
423
|
* @param fromCopyPaste True if the creation has been triggered by a paste action
|
|
407
424
|
* @returns Promise resolves with new binding context
|
|
408
425
|
*/
|
|
409
|
-
private async
|
|
426
|
+
private async performCreation(
|
|
410
427
|
mainListBinding: ODataListBinding,
|
|
411
428
|
parameters: CreateParameters,
|
|
412
429
|
appComponent: AppComponent,
|
|
@@ -414,75 +431,127 @@ class TransactionHelper {
|
|
|
414
431
|
resourceBundleCore: ResourceBundle,
|
|
415
432
|
fromCopyPaste: boolean
|
|
416
433
|
): Promise<ODataV4Context | undefined> {
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
434
|
+
const metaModel = mainListBinding.getModel().getMetaModel();
|
|
435
|
+
const metaPath = metaModel.getMetaPath(mainListBinding.getHeaderContext()!.getPath());
|
|
436
|
+
const createHash = appComponent.getRouterProxy().getHash();
|
|
437
|
+
const componentData = appComponent.getComponentData();
|
|
438
|
+
const startupParameters = componentData?.startupParameters ?? {};
|
|
439
|
+
const newAction = !mainListBinding.isRelative()
|
|
440
|
+
? this._getNewAction(startupParameters, createHash, metaModel, metaPath)
|
|
441
|
+
: undefined;
|
|
442
|
+
|
|
443
|
+
if (newAction) {
|
|
444
|
+
return this.performCreationWithAction(newAction, mainListBinding, parameters, appComponent, messageHandler, resourceBundleCore);
|
|
445
|
+
} else {
|
|
446
|
+
return this.performCreationWithPOST(mainListBinding, parameters, appComponent, messageHandler, fromCopyPaste);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Creates a document with an action.
|
|
452
|
+
* @param actionName
|
|
453
|
+
* @param mainListBinding
|
|
454
|
+
* @param parameters
|
|
455
|
+
* @param appComponent
|
|
456
|
+
* @param messageHandler
|
|
457
|
+
* @param resourceBundleCore
|
|
458
|
+
* @returns The created context.
|
|
459
|
+
*/
|
|
460
|
+
private async performCreationWithAction(
|
|
461
|
+
actionName: string,
|
|
462
|
+
mainListBinding: ODataListBinding,
|
|
463
|
+
parameters: CreateParameters,
|
|
464
|
+
appComponent: AppComponent,
|
|
465
|
+
messageHandler: MessageHandler,
|
|
466
|
+
resourceBundleCore: ResourceBundle
|
|
467
|
+
): Promise<ODataV4Context | undefined> {
|
|
468
|
+
const metaModel = mainListBinding.getModel().getMetaModel();
|
|
469
|
+
const metaPath = metaModel.getMetaPath(mainListBinding.getHeaderContext()!.getPath());
|
|
470
|
+
const messagesPath = ModelHelper.getMessagesPath(metaModel, metaPath);
|
|
426
471
|
const bindingParameters: BindContextParameters = { $$patchWithoutSideEffects: true };
|
|
427
472
|
|
|
428
473
|
if (messagesPath) {
|
|
429
474
|
bindingParameters["$select"] = messagesPath;
|
|
430
475
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
return result as ODataV4Context | undefined;
|
|
449
|
-
} else {
|
|
450
|
-
try {
|
|
451
|
-
let newDocumentContext: ODataV4Context | undefined;
|
|
452
|
-
const initialData = parameters.data;
|
|
453
|
-
if (!fromCopyPaste) {
|
|
454
|
-
const defaultValueFunctionData = await this.getDataFromDefaultValueFunction(mainListBinding);
|
|
455
|
-
parameters.data = Object.assign({}, defaultValueFunctionData, parameters.data);
|
|
456
|
-
}
|
|
457
|
-
if (parameters.data) {
|
|
458
|
-
delete parameters.data["@odata.context"];
|
|
459
|
-
}
|
|
476
|
+
const result = await this.callAction(
|
|
477
|
+
actionName,
|
|
478
|
+
{
|
|
479
|
+
contexts: mainListBinding.getHeaderContext(),
|
|
480
|
+
showActionParameterDialog: true,
|
|
481
|
+
label: this._getSpecificCreateActionDialogLabel(metaModel, metaPath, actionName, resourceBundleCore),
|
|
482
|
+
bindingParameters: bindingParameters,
|
|
483
|
+
parentControl: parameters.parentControl,
|
|
484
|
+
bIsCreateAction: true,
|
|
485
|
+
skipParameterDialog: parameters.skipParameterDialog
|
|
486
|
+
},
|
|
487
|
+
null,
|
|
488
|
+
appComponent,
|
|
489
|
+
messageHandler
|
|
490
|
+
);
|
|
491
|
+
return result as ODataV4Context | undefined;
|
|
492
|
+
}
|
|
460
493
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
494
|
+
/**
|
|
495
|
+
* Creates a docuemnt with a standard POST request.
|
|
496
|
+
* @param mainListBinding
|
|
497
|
+
* @param parameters
|
|
498
|
+
* @param appComponent
|
|
499
|
+
* @param messageHandler
|
|
500
|
+
* @param fromCopyPaste
|
|
501
|
+
* @returns The created context.
|
|
502
|
+
*/
|
|
503
|
+
private async performCreationWithPOST(
|
|
504
|
+
mainListBinding: ODataListBinding,
|
|
505
|
+
parameters: CreateParameters,
|
|
506
|
+
appComponent: AppComponent,
|
|
507
|
+
messageHandler: MessageHandler,
|
|
508
|
+
fromCopyPaste: boolean
|
|
509
|
+
): Promise<ODataV4Context | undefined> {
|
|
510
|
+
try {
|
|
511
|
+
let newDocumentContext: ODataV4Context | undefined;
|
|
512
|
+
const initialData = parameters.data;
|
|
513
|
+
if (!fromCopyPaste) {
|
|
514
|
+
const defaultValueFunctionData = await this.getDataFromDefaultValueFunction(mainListBinding);
|
|
515
|
+
parameters.data = Object.assign({}, defaultValueFunctionData, parameters.data);
|
|
516
|
+
}
|
|
517
|
+
if (parameters.data) {
|
|
518
|
+
delete parameters.data["@odata.context"];
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
const canHaveDialog = parameters.creationMode !== CreationMode.CreationRow && parameters.creationMode !== CreationMode.Inline;
|
|
522
|
+
const creationDialogFields = canHaveDialog ? this.getCreationParameters(mainListBinding, initialData, appComponent) : [];
|
|
523
|
+
if (parameters.creationMode === CreationMode.CreationDialog) {
|
|
524
|
+
parameters.creationDialogFields?.forEach((fieldName) => {
|
|
525
|
+
if (!creationDialogFields.includes(fieldName)) {
|
|
526
|
+
creationDialogFields.push(fieldName);
|
|
478
527
|
}
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
if (creationDialogFields.length === 0) {
|
|
531
|
+
// In CreationDialog mode, the dialog is mandatory
|
|
532
|
+
throw new Error("No fields available for the creation dialog");
|
|
479
533
|
}
|
|
480
|
-
return newDocumentContext;
|
|
481
|
-
} catch (error: unknown) {
|
|
482
|
-
const msg = typeof error === "string" ? error : (error as Error).message ?? error;
|
|
483
|
-
Log.error("Error while creating the new document", msg);
|
|
484
|
-
throw msg;
|
|
485
534
|
}
|
|
535
|
+
|
|
536
|
+
if (creationDialogFields.length > 0) {
|
|
537
|
+
newDocumentContext = await this.createWithDialog(
|
|
538
|
+
mainListBinding,
|
|
539
|
+
creationDialogFields,
|
|
540
|
+
parameters,
|
|
541
|
+
appComponent,
|
|
542
|
+
messageHandler
|
|
543
|
+
);
|
|
544
|
+
} else {
|
|
545
|
+
newDocumentContext = await this.createDocumentContext(mainListBinding, parameters);
|
|
546
|
+
if (!parameters.inactive) {
|
|
547
|
+
await this.waitForCreateCompletion(newDocumentContext, parameters.keepTransientContextOnFailed === true);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
return newDocumentContext;
|
|
551
|
+
} catch (error: unknown) {
|
|
552
|
+
const msg = (error as Error).message ?? error;
|
|
553
|
+
Log.error("Error while creating the new document", msg);
|
|
554
|
+
throw msg;
|
|
486
555
|
}
|
|
487
556
|
}
|
|
488
557
|
|
|
@@ -494,7 +563,6 @@ class TransactionHelper {
|
|
|
494
563
|
|
|
495
564
|
/**
|
|
496
565
|
* Delete one or multiple document(s).
|
|
497
|
-
*
|
|
498
566
|
* @param contexts Contexts Either one context or an array with contexts to be deleted
|
|
499
567
|
* @param mParameters Optional, can contain the following attributes:
|
|
500
568
|
* @param mParameters.title Title of the object to be deleted
|
|
@@ -677,7 +745,6 @@ class TransactionHelper {
|
|
|
677
745
|
|
|
678
746
|
/**
|
|
679
747
|
* Create the confirmation dialog fo the deletion.
|
|
680
|
-
*
|
|
681
748
|
* @param items An array of controls used for the dialog content
|
|
682
749
|
* @param parameters Contains the following attributes:
|
|
683
750
|
* @param parameters.parentControl Parent control of the delete button if any
|
|
@@ -736,7 +803,6 @@ class TransactionHelper {
|
|
|
736
803
|
|
|
737
804
|
/**
|
|
738
805
|
* Edits a document.
|
|
739
|
-
*
|
|
740
806
|
* @param oContext Context of the active document
|
|
741
807
|
* @param oView Current view
|
|
742
808
|
* @param appComponent The appComponent
|
|
@@ -791,7 +857,6 @@ class TransactionHelper {
|
|
|
791
857
|
|
|
792
858
|
/**
|
|
793
859
|
* Cancel 'edit' mode of a document.
|
|
794
|
-
*
|
|
795
860
|
* @param oContext Context of the document to be canceled or deleted
|
|
796
861
|
* @param [mInParameters] Optional, can contain the following attributes:
|
|
797
862
|
* @param mInParameters.cancelButton Cancel Button of the discard popover (mandatory for now)
|
|
@@ -892,7 +957,6 @@ class TransactionHelper {
|
|
|
892
957
|
|
|
893
958
|
/**
|
|
894
959
|
* Saves the document.
|
|
895
|
-
*
|
|
896
960
|
* @param context Context of the document to be saved
|
|
897
961
|
* @param appComponent The appComponent
|
|
898
962
|
* @param resourceModel The model to load text resources
|
|
@@ -900,6 +964,7 @@ class TransactionHelper {
|
|
|
900
964
|
* @param bindingsForSideEffects The listBindings to be used for executing side effects on error
|
|
901
965
|
* @param messageHandler The message handler extension
|
|
902
966
|
* @param isNewObject True if we're trying to cancel a newly created object
|
|
967
|
+
* @param skipConfirmationMsg
|
|
903
968
|
* @returns Promise resolves with ???
|
|
904
969
|
* @final
|
|
905
970
|
*/
|
|
@@ -910,7 +975,8 @@ class TransactionHelper {
|
|
|
910
975
|
executeSideEffectsOnError: boolean,
|
|
911
976
|
bindingsForSideEffects: ODataListBinding[],
|
|
912
977
|
messageHandler: MessageHandler,
|
|
913
|
-
isNewObject: boolean
|
|
978
|
+
isNewObject: boolean,
|
|
979
|
+
skipConfirmationMsg = false
|
|
914
980
|
): Promise<ODataV4Context> {
|
|
915
981
|
const sProgrammingModel = this.getProgrammingModel(context);
|
|
916
982
|
if (sProgrammingModel !== ProgrammingModel.Sticky && sProgrammingModel !== ProgrammingModel.Draft) {
|
|
@@ -919,19 +985,17 @@ class TransactionHelper {
|
|
|
919
985
|
|
|
920
986
|
try {
|
|
921
987
|
this.busyLock(appComponent);
|
|
988
|
+
const metaModel = context.getModel().getMetaModel();
|
|
989
|
+
const metaContext = metaModel.getMetaContext(context.getPath());
|
|
990
|
+
const entitySet = MetaModelConverter.getInvolvedDataModelObjects(metaContext).targetObject as EntitySet | NavigationProperty;
|
|
922
991
|
const oActiveDocument =
|
|
923
992
|
sProgrammingModel === ProgrammingModel.Draft
|
|
924
993
|
? await draft.activateDocument(context, appComponent, {}, messageHandler)
|
|
925
994
|
: await sticky.activateDocument(context, appComponent, messageHandler);
|
|
926
995
|
|
|
927
996
|
const messagesReceived = messageHandling.getMessages().concat(messageHandling.getMessages(true, true)); // get unbound and bound messages present in the model
|
|
928
|
-
if (!(messagesReceived.length === 1 && messagesReceived[0].getType() ===
|
|
997
|
+
if (!skipConfirmationMsg && !(messagesReceived.length === 1 && messagesReceived[0].getType() === MessageType.Success)) {
|
|
929
998
|
// show our object creation toast only if it is not coming from backend
|
|
930
|
-
const metaModel = context.getModel().getMetaModel();
|
|
931
|
-
const metaContext = metaModel.getMetaContext(context.getPath());
|
|
932
|
-
const entitySet = MetaModelConverter.getInvolvedDataModelObjects(metaContext).targetObject as
|
|
933
|
-
| EntitySet
|
|
934
|
-
| NavigationProperty;
|
|
935
999
|
MessageToast.show(
|
|
936
1000
|
isNewObject
|
|
937
1001
|
? resourceModel.getText("C_TRANSACTION_HELPER_OBJECT_CREATED", undefined, entitySet.name)
|
|
@@ -958,7 +1022,6 @@ class TransactionHelper {
|
|
|
958
1022
|
|
|
959
1023
|
/**
|
|
960
1024
|
* Calls a bound or unbound action.
|
|
961
|
-
*
|
|
962
1025
|
* @param sActionName The name of the action to be called
|
|
963
1026
|
* @param [mParameters] Contains the following attributes:
|
|
964
1027
|
* @param [mParameters.parameterValues] A map of action parameter names and provided values
|
|
@@ -1118,7 +1181,6 @@ class TransactionHelper {
|
|
|
1118
1181
|
|
|
1119
1182
|
/**
|
|
1120
1183
|
* Handles messages for action call.
|
|
1121
|
-
*
|
|
1122
1184
|
* @param messageHandler The message handler extension
|
|
1123
1185
|
* @param mParameters Parameters to be considered for the action.
|
|
1124
1186
|
* @param mParameters.label
|
|
@@ -1126,6 +1188,7 @@ class TransactionHelper {
|
|
|
1126
1188
|
* @param mParameters.controlId
|
|
1127
1189
|
* @param mParameters.parentControl
|
|
1128
1190
|
* @param sActionName The name of the action to be called
|
|
1191
|
+
* @param messageHandlingKey
|
|
1129
1192
|
* @returns Promise after message dialog is opened if required.
|
|
1130
1193
|
* @final
|
|
1131
1194
|
*/
|
|
@@ -1151,7 +1214,6 @@ class TransactionHelper {
|
|
|
1151
1214
|
|
|
1152
1215
|
/**
|
|
1153
1216
|
* Handles validation errors for the 'Discard' action.
|
|
1154
|
-
*
|
|
1155
1217
|
* @final
|
|
1156
1218
|
*/
|
|
1157
1219
|
handleValidationError(): void {
|
|
@@ -1163,7 +1225,6 @@ class TransactionHelper {
|
|
|
1163
1225
|
|
|
1164
1226
|
/**
|
|
1165
1227
|
* Creates a new Popover. Factory method to make unit tests easier.
|
|
1166
|
-
*
|
|
1167
1228
|
* @param settings Initial parameters for the popover
|
|
1168
1229
|
* @returns A new Popover
|
|
1169
1230
|
*/
|
|
@@ -1173,7 +1234,6 @@ class TransactionHelper {
|
|
|
1173
1234
|
|
|
1174
1235
|
/**
|
|
1175
1236
|
* Shows a popover to confirm discard if needed.
|
|
1176
|
-
*
|
|
1177
1237
|
* @param cancelButton The control which will open the popover
|
|
1178
1238
|
* @param isModified True if the object has been modified and a confirmation popover must be shown
|
|
1179
1239
|
* @param resourceModel The model to load text resources
|
|
@@ -1235,6 +1295,7 @@ class TransactionHelper {
|
|
|
1235
1295
|
data?: Record<string, unknown>;
|
|
1236
1296
|
bIsCreateDialog?: boolean;
|
|
1237
1297
|
beforeCreateCallBack?: Function;
|
|
1298
|
+
afterCreateCallBack?: (newDocumentContext: ODataV4Context) => Promise<void>;
|
|
1238
1299
|
createAtEnd?: boolean;
|
|
1239
1300
|
inactive?: boolean;
|
|
1240
1301
|
parentContext?: ODataV4Context;
|
|
@@ -1331,6 +1392,15 @@ class TransactionHelper {
|
|
|
1331
1392
|
|
|
1332
1393
|
const creationSuccess = await this.waitForCreateCompletion(newContext, parameters.keepTransientContextOnFailed === true);
|
|
1333
1394
|
if (creationSuccess) {
|
|
1395
|
+
try {
|
|
1396
|
+
await parameters.afterCreateCallBack?.(newContext);
|
|
1397
|
+
} catch (error) {
|
|
1398
|
+
messageHandler.showMessages();
|
|
1399
|
+
newContext.delete();
|
|
1400
|
+
Log.error("Error while creating/saving the new document", error as string);
|
|
1401
|
+
throw FELibrary.Constants.CreationFailed;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1334
1404
|
transientListBinding.destroy();
|
|
1335
1405
|
createDialog.closeDialog();
|
|
1336
1406
|
resultPromiseKeeper.resolve(newContext);
|
|
@@ -1356,7 +1426,6 @@ class TransactionHelper {
|
|
|
1356
1426
|
|
|
1357
1427
|
/**
|
|
1358
1428
|
* Waits for the creation of a context to be finished.
|
|
1359
|
-
*
|
|
1360
1429
|
* @param newContext The context being created
|
|
1361
1430
|
* @param keepTransientContextOnFailed
|
|
1362
1431
|
* @returns True if the creation was successful
|
|
@@ -1396,7 +1465,6 @@ class TransactionHelper {
|
|
|
1396
1465
|
|
|
1397
1466
|
/**
|
|
1398
1467
|
* Retrieves the name of the NewAction to be executed.
|
|
1399
|
-
*
|
|
1400
1468
|
* @param oStartupParameters Startup parameters of the application
|
|
1401
1469
|
* @param [oStartupParameters.preferredMode]
|
|
1402
1470
|
* @param sCreateHash Hash to be checked for action type
|
|
@@ -1446,7 +1514,6 @@ class TransactionHelper {
|
|
|
1446
1514
|
* 1. label of line-item annotation.
|
|
1447
1515
|
* 2. label annotated in the action.
|
|
1448
1516
|
* 3. "Create" as a constant from i18n.
|
|
1449
|
-
*
|
|
1450
1517
|
* @param oMetaModel The MetaModel used to check for the NewAction parameter
|
|
1451
1518
|
* @param sMetaPath The MetaPath
|
|
1452
1519
|
* @param sNewAction Contains the name of the action to be executed
|