@sapui5/sap.fe.core 1.131.0 → 1.133.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 +17 -23
- package/src/sap/fe/core/AppComponent.js +74 -36
- package/src/sap/fe/core/AppComponent.ts +70 -3
- package/src/sap/fe/core/AppStateHandler.js +44 -13
- package/src/sap/fe/core/AppStateHandler.ts +38 -0
- package/src/sap/fe/core/BaseController.js +3 -3
- package/src/sap/fe/core/CommonUtils.js +30 -37
- package/src/sap/fe/core/CommonUtils.ts +15 -13
- package/src/sap/fe/core/ExtensionAPI.js +29 -34
- package/src/sap/fe/core/ExtensionAPI.ts +3 -0
- package/src/sap/fe/core/InsightsFormattersExtension.js +2 -2
- package/src/sap/fe/core/PageController.js +40 -31
- package/src/sap/fe/core/PageController.ts +14 -1
- package/src/sap/fe/core/ResourceModel.js +4 -4
- package/src/sap/fe/core/ReuseComponent.js +27 -13
- package/src/sap/fe/core/ReuseComponent.ts +18 -0
- package/src/sap/fe/core/TemplateComponent.js +102 -89
- package/src/sap/fe/core/TemplateComponent.ts +20 -1
- package/src/sap/fe/core/TemplateModel.js +6 -7
- package/src/sap/fe/core/UIProvider.js +1 -1
- package/src/sap/fe/core/UIProvider.ts +2 -9
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +63 -48
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +56 -27
- package/src/sap/fe/core/buildingBlocks/IBuildingBlockOwnerComponent.js +9 -0
- package/src/sap/fe/core/buildingBlocks/IBuildingBlockOwnerComponent.ts +48 -0
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +4 -6
- package/src/sap/fe/core/buildingBlocks/templating/AttributeModel.js +2 -2
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockSupport.js +2 -3
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplateProcessor.js +32 -18
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplateProcessor.ts +30 -3
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplatingBase.js +9 -13
- package/src/sap/fe/core/buildingBlocks/templating/BuildingBlockTemplatingBase.ts +2 -1
- package/src/sap/fe/core/buildingBlocks/templating/RuntimeBuildingBlock.js +2 -2
- package/src/sap/fe/core/buildingBlocks/templating/RuntimeBuildingBlockFragment.js +19 -25
- package/src/sap/fe/core/buildingBlocks/templating/RuntimeBuildingBlockFragment.ts +1 -1
- package/src/sap/fe/core/controllerextensions/BaseControllerExtension.js +3 -4
- package/src/sap/fe/core/controllerextensions/CollaborativeDraft.js +20 -24
- package/src/sap/fe/core/controllerextensions/CollaborativeDraft.ts +10 -15
- package/src/sap/fe/core/controllerextensions/ContextSharing.js +3 -3
- package/src/sap/fe/core/controllerextensions/EditFlow.js +296 -246
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +253 -175
- package/src/sap/fe/core/controllerextensions/Feedback.js +10 -11
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +6 -6
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +1 -0
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +27 -36
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +57 -78
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +42 -50
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +12 -19
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +23 -17
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +21 -7
- package/src/sap/fe/core/controllerextensions/PageReady.js +15 -21
- package/src/sap/fe/core/controllerextensions/Paginator.js +3 -3
- package/src/sap/fe/core/controllerextensions/Placeholder.js +3 -3
- package/src/sap/fe/core/controllerextensions/Recommendations.js +23 -36
- package/src/sap/fe/core/controllerextensions/Recommendations.ts +1 -1
- package/src/sap/fe/core/controllerextensions/Routing.js +3 -3
- package/src/sap/fe/core/controllerextensions/Share.js +19 -28
- package/src/sap/fe/core/controllerextensions/SideEffects.js +68 -32
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +58 -6
- package/src/sap/fe/core/controllerextensions/Telemetry.js +4 -5
- package/src/sap/fe/core/controllerextensions/ViewState.js +23 -24
- package/src/sap/fe/core/controllerextensions/ViewState.ts +6 -1
- package/src/sap/fe/core/controllerextensions/cards/CollaborationManager.js +13 -10
- package/src/sap/fe/core/controllerextensions/cards/CollaborationManager.ts +13 -8
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +5 -5
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +15 -16
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +3 -4
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.js +288 -0
- package/src/sap/fe/core/controllerextensions/dialog/{OperationsDialog.block.tsx → OperationsDialog.tsx} +27 -29
- package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.js +41 -5
- package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.tsx +61 -8
- package/src/sap/fe/core/controllerextensions/editFlow/ODataOperation.js +404 -0
- package/src/sap/fe/core/controllerextensions/editFlow/ODataOperation.ts +502 -0
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +35 -43
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +34 -14
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +37 -27
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +27 -15
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js +51 -39
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.ts +75 -34
- package/src/sap/fe/core/controllerextensions/editFlow/editFlowConstants.js +4 -4
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.js +88 -427
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.ts +82 -620
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +9 -5
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +6 -5
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +116 -79
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +87 -13
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher.js +4 -6
- package/src/sap/fe/core/controllerextensions/recommendations/Telemetry.js +5 -7
- package/src/sap/fe/core/controllerextensions/routing/ContextPathHelper.js +6 -7
- package/src/sap/fe/core/controllerextensions/routing/NavigationReason.js +4 -4
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +58 -20
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +55 -4
- package/src/sap/fe/core/controllerextensions/viewState/IViewStateContributor.js +1 -1
- package/src/sap/fe/core/controllerextensions/viewState/IViewStateContributor.ts +1 -1
- package/src/sap/fe/core/controllerextensions/viewState/IViewStateContributorMixin.js +9 -12
- package/src/sap/fe/core/controls/CommandExecution.js +2 -2
- package/src/sap/fe/core/controls/ComponentLoader.js +20 -21
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.js +250 -0
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/{DraftDataLossDialog.block.tsx → DraftDataLossDialog.tsx} +31 -19
- package/src/sap/fe/core/controls/FormElementWrapper.js +19 -21
- package/src/sap/fe/core/controls/HideFormGroupAutomatically.js +114 -0
- package/src/sap/fe/core/controls/HideFormGroupAutomatically.ts +115 -0
- package/src/sap/fe/core/controls/Recommendations/ConfirmRecommendationDialog.js +454 -0
- package/src/sap/fe/core/controls/Recommendations/{ConfirmRecommendationDialog.block.tsx → ConfirmRecommendationDialog.tsx} +5 -9
- package/src/sap/fe/core/converters/ConverterContext.js +17 -18
- package/src/sap/fe/core/converters/ConverterContext.ts +10 -15
- package/src/sap/fe/core/converters/ManifestSettings.js +29 -28
- package/src/sap/fe/core/converters/ManifestSettings.ts +22 -1
- package/src/sap/fe/core/converters/ManifestWrapper.js +26 -48
- package/src/sap/fe/core/converters/MetaModelConverter.js +21 -28
- package/src/sap/fe/core/converters/MetaModelConverter.ts +2 -0
- package/src/sap/fe/core/converters/TemplateConverter.js +17 -21
- package/src/sap/fe/core/converters/TemplateConverter.ts +5 -3
- package/src/sap/fe/core/converters/annotations/DataField.js +69 -66
- package/src/sap/fe/core/converters/annotations/DataField.ts +30 -0
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +20 -23
- package/src/sap/fe/core/converters/controls/Common/Action.js +178 -43
- package/src/sap/fe/core/converters/controls/Common/Action.ts +202 -19
- package/src/sap/fe/core/converters/controls/Common/Chart.js +47 -22
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +50 -5
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +16 -23
- package/src/sap/fe/core/converters/controls/Common/Form.js +25 -38
- package/src/sap/fe/core/converters/controls/Common/Form.ts +3 -0
- package/src/sap/fe/core/converters/controls/Common/KPI.js +32 -47
- package/src/sap/fe/core/converters/controls/Common/Table.js +464 -506
- package/src/sap/fe/core/converters/controls/Common/Table.ts +335 -219
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +17 -28
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +1 -2
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +66 -90
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +10 -1
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +49 -73
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +6 -10
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +35 -50
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +110 -60
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +137 -41
- package/src/sap/fe/core/converters/helpers/Aggregation.js +19 -30
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +5 -5
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +11 -14
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.js +14 -21
- package/src/sap/fe/core/converters/helpers/InsightsHelpers.js +4 -6
- package/src/sap/fe/core/converters/helpers/IssueManager.js +7 -7
- package/src/sap/fe/core/converters/helpers/Key.js +1 -1
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +2 -3
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +18 -52
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +0 -34
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +103 -74
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +111 -39
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +28 -31
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +17 -9
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +61 -52
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +60 -21
- package/src/sap/fe/core/definition/FEDefinition.js +104 -44
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +37 -7
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +42 -2
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +4 -5
- package/src/sap/fe/core/formatters/FiscalFormat.js +24 -24
- package/src/sap/fe/core/formatters/ValueFormatter.js +4 -23
- package/src/sap/fe/core/formatters/ValueFormatter.ts +0 -18
- package/src/sap/fe/core/fpm/Component.js +12 -14
- package/src/sap/fe/core/fpm/manifest.json +1 -1
- package/src/sap/fe/core/helpers/AppStartupHelper.js +20 -15
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +22 -13
- package/src/sap/fe/core/helpers/BindingHelper.js +3 -3
- package/src/sap/fe/core/helpers/BindingHelper.ts +1 -1
- package/src/sap/fe/core/helpers/DeleteHelper.js +55 -62
- package/src/sap/fe/core/helpers/DeleteHelper.ts +48 -51
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +4 -7
- package/src/sap/fe/core/helpers/FPMHelper.js +4 -7
- package/src/sap/fe/core/helpers/HTTP503Handler.js +2 -1
- package/src/sap/fe/core/helpers/HTTP503Handler.ts +4 -3
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +5 -5
- package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +6 -6
- package/src/sap/fe/core/helpers/LoaderUtils.js +8 -3
- package/src/sap/fe/core/helpers/LoaderUtils.ts +15 -4
- package/src/sap/fe/core/helpers/MessageStrip.js +3 -4
- package/src/sap/fe/core/helpers/MetaModelFunction.js +26 -40
- package/src/sap/fe/core/helpers/MetaPath.js +9 -7
- package/src/sap/fe/core/helpers/MetaPath.ts +9 -3
- package/src/sap/fe/core/helpers/ModelHelper.js +33 -57
- package/src/sap/fe/core/helpers/ModelHelper.ts +3 -3
- package/src/sap/fe/core/helpers/PasteHelper.js +11 -19
- package/src/sap/fe/core/helpers/PromiseKeeper.js +1 -1
- package/src/sap/fe/core/helpers/RecommendationHelper.js +3 -4
- package/src/sap/fe/core/helpers/ResourceModelHelper.js +3 -5
- package/src/sap/fe/core/helpers/SizeHelper.js +3 -5
- package/src/sap/fe/core/helpers/StableIdHelper.js +13 -11
- package/src/sap/fe/core/helpers/StableIdHelper.ts +5 -1
- package/src/sap/fe/core/helpers/StandardRecommendationHelper.js +28 -38
- package/src/sap/fe/core/helpers/Synchronization.js +1 -1
- package/src/sap/fe/core/helpers/TitleHelper.js +19 -40
- package/src/sap/fe/core/helpers/TitleHelper.ts +5 -25
- package/src/sap/fe/core/helpers/TypeGuards.js +25 -18
- package/src/sap/fe/core/helpers/TypeGuards.ts +7 -0
- package/src/sap/fe/core/helpers/WebSocket.js +4 -4
- package/src/sap/fe/core/library.js +8 -7
- package/src/sap/fe/core/library.ts +2 -0
- package/src/sap/fe/core/manifestMerger/AddNewPage.js +9 -11
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +14 -25
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +15 -17
- package/src/sap/fe/core/messagebundle.properties +21 -0
- package/src/sap/fe/core/messagebundle_ar.properties +5 -1
- package/src/sap/fe/core/messagebundle_bg.properties +4 -0
- package/src/sap/fe/core/messagebundle_ca.properties +4 -0
- package/src/sap/fe/core/messagebundle_cnr.properties +4 -0
- package/src/sap/fe/core/messagebundle_cs.properties +8 -4
- package/src/sap/fe/core/messagebundle_cy.properties +4 -0
- package/src/sap/fe/core/messagebundle_da.properties +4 -0
- package/src/sap/fe/core/messagebundle_de.properties +4 -0
- package/src/sap/fe/core/messagebundle_el.properties +4 -0
- package/src/sap/fe/core/messagebundle_en.properties +4 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +4 -0
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +4 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +249 -231
- package/src/sap/fe/core/messagebundle_es.properties +5 -1
- package/src/sap/fe/core/messagebundle_es_MX.properties +4 -0
- package/src/sap/fe/core/messagebundle_et.properties +4 -0
- package/src/sap/fe/core/messagebundle_fi.properties +4 -0
- package/src/sap/fe/core/messagebundle_fr.properties +6 -2
- package/src/sap/fe/core/messagebundle_fr_CA.properties +4 -0
- package/src/sap/fe/core/messagebundle_hi.properties +4 -0
- package/src/sap/fe/core/messagebundle_hr.properties +4 -0
- package/src/sap/fe/core/messagebundle_hu.properties +4 -0
- package/src/sap/fe/core/messagebundle_id.properties +4 -0
- package/src/sap/fe/core/messagebundle_it.properties +4 -0
- package/src/sap/fe/core/messagebundle_iw.properties +4 -0
- package/src/sap/fe/core/messagebundle_ja.properties +4 -0
- package/src/sap/fe/core/messagebundle_kk.properties +4 -0
- package/src/sap/fe/core/messagebundle_ko.properties +4 -0
- package/src/sap/fe/core/messagebundle_lt.properties +4 -0
- package/src/sap/fe/core/messagebundle_lv.properties +4 -0
- package/src/sap/fe/core/messagebundle_mk.properties +4 -0
- package/src/sap/fe/core/messagebundle_ms.properties +4 -0
- package/src/sap/fe/core/messagebundle_nl.properties +4 -0
- package/src/sap/fe/core/messagebundle_no.properties +4 -0
- package/src/sap/fe/core/messagebundle_pl.properties +4 -0
- package/src/sap/fe/core/messagebundle_pt.properties +4 -0
- package/src/sap/fe/core/messagebundle_pt_PT.properties +4 -0
- package/src/sap/fe/core/messagebundle_ro.properties +4 -0
- package/src/sap/fe/core/messagebundle_ru.properties +4 -0
- package/src/sap/fe/core/messagebundle_sh.properties +4 -0
- package/src/sap/fe/core/messagebundle_sk.properties +4 -0
- package/src/sap/fe/core/messagebundle_sl.properties +4 -0
- package/src/sap/fe/core/messagebundle_sr.properties +4 -0
- package/src/sap/fe/core/messagebundle_sv.properties +4 -0
- package/src/sap/fe/core/messagebundle_th.properties +4 -0
- package/src/sap/fe/core/messagebundle_tr.properties +5 -1
- package/src/sap/fe/core/messagebundle_uk.properties +4 -0
- package/src/sap/fe/core/messagebundle_vi.properties +4 -0
- package/src/sap/fe/core/messagebundle_zh_CN.properties +4 -0
- package/src/sap/fe/core/messagebundle_zh_TW.properties +4 -0
- package/src/sap/fe/core/operationsHelper.js +23 -27
- package/src/sap/fe/core/operationsHelper.ts +6 -7
- package/src/sap/fe/core/rootView/Fcl.controller.js +53 -40
- package/src/sap/fe/core/rootView/Fcl.controller.ts +42 -7
- package/src/sap/fe/core/rootView/NavContainer.controller.js +7 -10
- package/src/sap/fe/core/rootView/RootViewBaseController.js +22 -21
- package/src/sap/fe/core/rootView/RootViewBaseController.ts +10 -2
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +3 -3
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +4 -3
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +1 -0
- package/src/sap/fe/core/services/CollaborationManagerServiceFactory.js +12 -10
- package/src/sap/fe/core/services/CollaborationManagerServiceFactory.ts +6 -2
- package/src/sap/fe/core/services/CollaborativeToolsServiceFactory.js +8 -13
- package/src/sap/fe/core/services/ContextSharingServiceFactory.js +5 -7
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +31 -8
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +31 -5
- package/src/sap/fe/core/services/InlineEditServiceFactory.js +190 -0
- package/src/sap/fe/core/services/InlineEditServiceFactory.ts +226 -0
- package/src/sap/fe/core/services/NavigationServiceFactory.js +10 -15
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +3 -3
- package/src/sap/fe/core/services/RoutingServiceFactory.js +76 -56
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +47 -14
- package/src/sap/fe/core/services/ShellServicesFactory.js +32 -34
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +75 -60
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +58 -12
- package/src/sap/fe/core/services/TelemetryServiceFactory.js +8 -9
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +13 -18
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +3 -0
- package/src/sap/fe/core/services/ValueHelpHistoryServiceFactory.js +7 -9
- package/src/sap/fe/core/services/collaborativeDraftServiceFactory.js +12 -16
- package/src/sap/fe/core/services/collaborativeDraftServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/valueHelpService/HistoryOptOutProvider.js +4 -7
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +5 -6
- package/src/sap/fe/core/support/CommonHelper.js +2 -3
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/templating/ActionHelper.js +3 -4
- package/src/sap/fe/core/templating/CommonFormatters.js +6 -8
- package/src/sap/fe/core/templating/CommonFormatters.ts +2 -2
- package/src/sap/fe/core/templating/CriticalityFormatters.js +53 -5
- package/src/sap/fe/core/templating/CriticalityFormatters.ts +129 -7
- package/src/sap/fe/core/templating/DataFieldFormatters.js +8 -11
- package/src/sap/fe/core/templating/DataFieldFormatters.ts +1 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.js +33 -56
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +4 -5
- package/src/sap/fe/core/templating/EntitySetHelper.js +11 -19
- package/src/sap/fe/core/templating/EntityTypeHelper.js +4 -5
- package/src/sap/fe/core/templating/FieldControlHelper.js +13 -20
- package/src/sap/fe/core/templating/FilterTemplating.js +6 -9
- package/src/sap/fe/core/templating/PropertyHelper.js +33 -63
- package/src/sap/fe/core/templating/PropertyHelper.ts +0 -1
- package/src/sap/fe/core/templating/SemanticObjectHelper.js +13 -21
- package/src/sap/fe/core/templating/UIFormatters.js +57 -78
- package/src/sap/fe/core/templating/UIFormatters.ts +2 -1
- package/src/sap/fe/core/type/Date.js +2 -2
- package/src/sap/fe/core/type/DateTimeWithTimezone.js +3 -3
- package/src/sap/fe/core/type/EDM.js +3 -5
- package/src/sap/fe/core/type/Email.js +17 -6
- package/src/sap/fe/core/type/Email.ts +23 -4
- package/src/sap/fe/core/type/FiscalDate.js +8 -9
- package/src/sap/fe/core/type/InputMask.js +3 -4
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.block.js +0 -299
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +0 -87
- package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +0 -43
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DraftDataLossDialog.block.js +0 -251
- package/src/sap/fe/core/controls/Recommendations/ConfirmRecommendationDialog.block.js +0 -471
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Action, EntityType, PropertyAnnotationValue } from "@sap-ux/vocabularies-types";
|
|
2
2
|
import { CommonAnnotationTerms } from "@sap-ux/vocabularies-types/vocabularies/Common";
|
|
3
3
|
import type {
|
|
4
|
+
DataFieldForAction,
|
|
5
|
+
DataFieldForActionGroupTypes,
|
|
4
6
|
DataFieldForActionTypes,
|
|
5
7
|
DataFieldForIntentBasedNavigationTypes,
|
|
6
8
|
DeleteHidden,
|
|
@@ -19,8 +21,9 @@ import {
|
|
|
19
21
|
not,
|
|
20
22
|
pathInModel
|
|
21
23
|
} from "sap/fe/base/BindingToolkit";
|
|
24
|
+
import type { HiddenDraft } from "sap/fe/core/converters/ManifestSettings";
|
|
22
25
|
import type { PageContextPathTarget } from "sap/fe/core/converters/TemplateConverter";
|
|
23
|
-
import type { AnnotationAction, BaseAction } from "sap/fe/core/converters/controls/Common/Action";
|
|
26
|
+
import type { AnnotationAction, BaseAction, DataFieldForActionOrActionGroup } from "sap/fe/core/converters/controls/Common/Action";
|
|
24
27
|
import {
|
|
25
28
|
ButtonType,
|
|
26
29
|
dataFieldIsCopyAction,
|
|
@@ -36,16 +39,17 @@ import { isPathDeletable } from "sap/fe/core/templating/DataModelPathHelper";
|
|
|
36
39
|
import { isVisible } from "sap/fe/core/templating/UIFormatters";
|
|
37
40
|
import Library from "sap/ui/core/Lib";
|
|
38
41
|
import { Draft, UI, singletonPathVisitor } from "../../helpers/BindingHelper";
|
|
42
|
+
import type { EnvironmentCapabilities } from "../../services/EnvironmentServiceFactory";
|
|
39
43
|
import type ConverterContext from "../ConverterContext";
|
|
40
44
|
import { ActionType } from "../ManifestSettings";
|
|
41
45
|
|
|
42
46
|
/**
|
|
43
|
-
* Retrieves all the
|
|
47
|
+
* Retrieves all the DataFieldForActions from the Identification annotation
|
|
44
48
|
* They must be
|
|
45
|
-
* - Either linked to an
|
|
49
|
+
* - Either linked to an unbound action or to an action which has an OperationAvailable that is not set to false statically.
|
|
46
50
|
* @param entityType The current entity type
|
|
47
51
|
* @param isDeterminingAction The flag which denotes whether or not the action is a determining action
|
|
48
|
-
* @returns An array of
|
|
52
|
+
* @returns An array of DataFieldForAction respecting the input parameter 'isDeterminingAction'
|
|
49
53
|
*/
|
|
50
54
|
export function getIdentificationDataFieldForActions(entityType: EntityType, isDeterminingAction: boolean): DataFieldForActionTypes[] {
|
|
51
55
|
return (entityType.annotations?.UI?.Identification?.filter((identificationDataField) => {
|
|
@@ -58,6 +62,29 @@ export function getIdentificationDataFieldForActions(entityType: EntityType, isD
|
|
|
58
62
|
}) || []) as DataFieldForActionTypes[];
|
|
59
63
|
}
|
|
60
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves all the data field for actions for the identification annotation
|
|
67
|
+
* They must be
|
|
68
|
+
* - Either linked to an Unbound action or to an action which has an OperationAvailable that is not set to false statically.
|
|
69
|
+
* @param entityType The current entity type
|
|
70
|
+
* @param isDeterminingAction The flag which denotes whether or not the action is a determining action
|
|
71
|
+
* @returns An array of DataField for action respecting the input parameter 'isDeterminingAction'
|
|
72
|
+
*/
|
|
73
|
+
export function getIdentificationDataFieldForActionsOrGroups(
|
|
74
|
+
entityType: EntityType,
|
|
75
|
+
isDeterminingAction: boolean
|
|
76
|
+
): DataFieldForActionOrActionGroup[] {
|
|
77
|
+
return (entityType.annotations?.UI?.Identification?.filter((identificationDataField) => {
|
|
78
|
+
return (identificationDataField.$Type === UIAnnotationTypes.DataFieldForAction &&
|
|
79
|
+
Boolean(identificationDataField.Determining?.valueOf()) === isDeterminingAction &&
|
|
80
|
+
(identificationDataField.ActionTarget?.isBound?.valueOf() !== true ||
|
|
81
|
+
identificationDataField?.ActionTarget?.annotations?.Core?.OperationAvailable?.valueOf() !== false)) ||
|
|
82
|
+
identificationDataField.$Type === UIAnnotationTypes.DataFieldForActionGroup
|
|
83
|
+
? true
|
|
84
|
+
: false;
|
|
85
|
+
}) || []) as DataFieldForActionOrActionGroup[];
|
|
86
|
+
}
|
|
87
|
+
|
|
61
88
|
/**
|
|
62
89
|
* Retrieve all the IBN actions for the identification annotation.
|
|
63
90
|
* @param entityType The current entitytype
|
|
@@ -152,6 +179,7 @@ export function getDeleteButtonEnabled(
|
|
|
152
179
|
* @param rootConverterContext
|
|
153
180
|
* @param updateHidden
|
|
154
181
|
* @param viewLevel
|
|
182
|
+
* @param capabilities
|
|
155
183
|
* @returns The binding expression for the 'visible' property of the Edit button.
|
|
156
184
|
*/
|
|
157
185
|
export function getEditButtonVisibility(
|
|
@@ -159,13 +187,15 @@ export function getEditButtonVisibility(
|
|
|
159
187
|
rootUpdateHidden: UpdateHidden | undefined,
|
|
160
188
|
rootConverterContext: ConverterContext<PageContextPathTarget>,
|
|
161
189
|
updateHidden?: UpdateHidden | undefined,
|
|
162
|
-
viewLevel?: number | undefined
|
|
190
|
+
viewLevel?: number | undefined,
|
|
191
|
+
capabilities?: EnvironmentCapabilities
|
|
163
192
|
): BindingToolkitExpression<boolean> {
|
|
164
193
|
const rootEntitySet = rootConverterContext?.getEntitySet(),
|
|
165
194
|
entitySet = converterContext.getEntitySet(),
|
|
166
195
|
isFCLEnabled = converterContext.getManifestWrapper().isFclEnabled();
|
|
167
196
|
let isDraftEnabled;
|
|
168
197
|
const rootUpdateHiddenExpression = getHiddenExpression(rootConverterContext, rootUpdateHidden);
|
|
198
|
+
const hiddenDraft = (capabilities?.HiddenDraft as HiddenDraft)?.enabled;
|
|
169
199
|
if (viewLevel && viewLevel > 1) {
|
|
170
200
|
// if viewlevel > 1 check if node is draft enabled
|
|
171
201
|
isDraftEnabled = ModelHelper.isDraftNode(entitySet);
|
|
@@ -181,7 +211,7 @@ export function getEditButtonVisibility(
|
|
|
181
211
|
// else,
|
|
182
212
|
// Edit button is visible based on both annotation path and in display mode.
|
|
183
213
|
const resultantExpression: BindingToolkitExpression<boolean> = ifElse(
|
|
184
|
-
(viewLevel as number) > 1,
|
|
214
|
+
(viewLevel as number) > 1 || hiddenDraft,
|
|
185
215
|
ifElse(
|
|
186
216
|
updateHidden === undefined || updateHidden.valueOf() === false,
|
|
187
217
|
and(
|
|
@@ -264,7 +294,10 @@ export function getEditButtonEnabled(
|
|
|
264
294
|
return "true";
|
|
265
295
|
}
|
|
266
296
|
|
|
267
|
-
export function getHeaderDefaultActions(
|
|
297
|
+
export function getHeaderDefaultActions(
|
|
298
|
+
converterContext: ConverterContext<PageContextPathTarget>,
|
|
299
|
+
capabilities?: EnvironmentCapabilities
|
|
300
|
+
): BaseAction[] {
|
|
268
301
|
const sContextPath = converterContext.getContextPath();
|
|
269
302
|
const rootEntitySetPath = ModelHelper.getRootEntitySetPath(sContextPath);
|
|
270
303
|
const rootConverterContext = converterContext.getConverterContextFor<PageContextPathTarget>("/" + rootEntitySetPath);
|
|
@@ -284,19 +317,21 @@ export function getHeaderDefaultActions(converterContext: ConverterContext<PageC
|
|
|
284
317
|
singletonPathVisitor(path, converterContext.getConvertedTypes(), navigationPaths)
|
|
285
318
|
}),
|
|
286
319
|
parentEntitySetDeletable = isParentDeletable ? compileExpression(isParentDeletable) : isParentDeletable,
|
|
287
|
-
|
|
320
|
+
identificationDataFieldForActions = getIdentificationDataFieldForActionsOrGroups(converterContext.getEntityType(), false);
|
|
288
321
|
|
|
289
322
|
const copyDataField =
|
|
290
323
|
converterContext.getManifestWrapper().getViewLevel() === 1
|
|
291
324
|
? getCopyAction(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
325
|
+
identificationDataFieldForActions.filter((dataField) => {
|
|
326
|
+
if (dataField.$Type === UIAnnotationTypes.DataFieldForAction) {
|
|
327
|
+
return dataFieldIsCopyAction(dataField);
|
|
328
|
+
}
|
|
329
|
+
}) as DataFieldForAction[]
|
|
295
330
|
)
|
|
296
331
|
: undefined;
|
|
297
332
|
|
|
298
|
-
const headerDataFieldForActions =
|
|
299
|
-
return !dataFieldIsCopyAction(dataField);
|
|
333
|
+
const headerDataFieldForActions = identificationDataFieldForActions.filter((dataField) => {
|
|
334
|
+
return !dataFieldIsCopyAction(dataField as DataFieldForActionTypes);
|
|
300
335
|
});
|
|
301
336
|
|
|
302
337
|
// Initialize actions and start with draft actions if available since they should appear in the first
|
|
@@ -314,15 +349,9 @@ export function getHeaderDefaultActions(converterContext: ConverterContext<PageC
|
|
|
314
349
|
if (draftRoot || draftNode) {
|
|
315
350
|
headerActions.push({ type: ActionType.CollaborationAvatars, key: "CollaborationAvatars" });
|
|
316
351
|
}
|
|
317
|
-
// Then add the "Critical" DataFieldForActions
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
const criticality = compileExpression(getExpressionFromAnnotation(dataField?.Criticality));
|
|
321
|
-
return IMPORTANT_CRITICALITIES.includes(criticality!);
|
|
322
|
-
})
|
|
323
|
-
.forEach((dataField) => {
|
|
324
|
-
headerActions.push(getDataFieldAnnotationAction(dataField, converterContext));
|
|
325
|
-
});
|
|
352
|
+
// Then add the "Critical" DataFieldForActions and DataFieldForActionGroups
|
|
353
|
+
// Prioritizes actions and action groups that have the Criticality annotation, placing them before those without the annotation
|
|
354
|
+
computeActionsAndActionGroups(headerActions, true, headerDataFieldForActions, converterContext);
|
|
326
355
|
|
|
327
356
|
// Then the edit action if it exists
|
|
328
357
|
if ((draftRoot?.EditAction || stickySessionSupported?.EditAction) && updateHidden !== true) {
|
|
@@ -335,7 +364,8 @@ export function getHeaderDefaultActions(converterContext: ConverterContext<PageC
|
|
|
335
364
|
rootUpdateHidden,
|
|
336
365
|
rootConverterContext,
|
|
337
366
|
ModelHelper.isUpdateHidden(entitySet, entityType),
|
|
338
|
-
viewLevel
|
|
367
|
+
viewLevel,
|
|
368
|
+
capabilities
|
|
339
369
|
)
|
|
340
370
|
),
|
|
341
371
|
enabled: getEditButtonEnabled(rootConverterContext, updatablePropertyPath, viewLevel)
|
|
@@ -412,15 +442,8 @@ export function getHeaderDefaultActions(converterContext: ConverterContext<PageC
|
|
|
412
442
|
})
|
|
413
443
|
} as AnnotationAction);
|
|
414
444
|
});
|
|
415
|
-
// Finally the non critical DataFieldForActions
|
|
416
|
-
headerDataFieldForActions
|
|
417
|
-
.filter((dataField) => {
|
|
418
|
-
const criticality = compileExpression(getExpressionFromAnnotation(dataField?.Criticality));
|
|
419
|
-
return !IMPORTANT_CRITICALITIES.includes(criticality!);
|
|
420
|
-
})
|
|
421
|
-
.forEach((dataField) => {
|
|
422
|
-
headerActions.push(getDataFieldAnnotationAction(dataField, converterContext));
|
|
423
|
-
});
|
|
445
|
+
// Finally the non critical DataFieldForActions and DataFieldForActionGroups
|
|
446
|
+
computeActionsAndActionGroups(headerActions, false, headerDataFieldForActions, converterContext);
|
|
424
447
|
|
|
425
448
|
return headerActions;
|
|
426
449
|
}
|
|
@@ -438,7 +461,11 @@ export function getHiddenHeaderActions(converterContext: ConverterContext<PageCo
|
|
|
438
461
|
});
|
|
439
462
|
}
|
|
440
463
|
|
|
441
|
-
export function getFooterDefaultActions(
|
|
464
|
+
export function getFooterDefaultActions(
|
|
465
|
+
viewLevel: number,
|
|
466
|
+
converterContext: ConverterContext<PageContextPathTarget>,
|
|
467
|
+
capabilities?: EnvironmentCapabilities
|
|
468
|
+
): BaseAction[] {
|
|
442
469
|
const entitySet = converterContext.getEntitySet();
|
|
443
470
|
const entityType = converterContext.getEntityType();
|
|
444
471
|
const stickySessionSupported = ModelHelper.getStickySession(entitySet), //for sticky app
|
|
@@ -446,12 +473,20 @@ export function getFooterDefaultActions(viewLevel: number, converterContext: Con
|
|
|
446
473
|
isEntitySet(entitySet) &&
|
|
447
474
|
(entitySet.annotations.Common?.DraftRoot?.term ?? entitySet.annotations.Session?.StickySessionSupported?.term),
|
|
448
475
|
conditionSave = Boolean(
|
|
449
|
-
entitySetDraftRoot === CommonAnnotationTerms.DraftRoot ||
|
|
476
|
+
entitySetDraftRoot === CommonAnnotationTerms.DraftRoot ||
|
|
477
|
+
(capabilities?.HiddenDraft as HiddenDraft)?.enabled ||
|
|
478
|
+
(stickySessionSupported && stickySessionSupported?.SaveAction)
|
|
450
479
|
),
|
|
451
|
-
conditionApply = viewLevel > 1,
|
|
480
|
+
conditionApply = viewLevel > 1 && !(capabilities?.HiddenDraft as HiddenDraft)?.enabled,
|
|
452
481
|
conditionCancel = Boolean(
|
|
453
|
-
entitySetDraftRoot === CommonAnnotationTerms.DraftRoot ||
|
|
454
|
-
|
|
482
|
+
entitySetDraftRoot === CommonAnnotationTerms.DraftRoot ||
|
|
483
|
+
(capabilities?.HiddenDraft as HiddenDraft)?.enabled ||
|
|
484
|
+
(stickySessionSupported && stickySessionSupported?.DiscardAction)
|
|
485
|
+
),
|
|
486
|
+
conditionCreateNext =
|
|
487
|
+
viewLevel > 1 &&
|
|
488
|
+
(capabilities?.HiddenDraft as HiddenDraft)?.enabled &&
|
|
489
|
+
!(capabilities?.HiddenDraft as HiddenDraft)?.hideCreateNext;
|
|
455
490
|
|
|
456
491
|
// Retrieve all determining actions
|
|
457
492
|
const footerDataFieldForActions = getIdentificationDataFieldForActions(converterContext.getEntityType(), true);
|
|
@@ -465,7 +500,9 @@ export function getFooterDefaultActions(viewLevel: number, converterContext: Con
|
|
|
465
500
|
.map((dataField) => {
|
|
466
501
|
return getDataFieldAnnotationAction(dataField, converterContext);
|
|
467
502
|
});
|
|
468
|
-
|
|
503
|
+
if (conditionCreateNext) {
|
|
504
|
+
footerActions.push({ type: ActionType.CreateNext, key: "CreateNextAction" });
|
|
505
|
+
}
|
|
469
506
|
// Then the save action if it exists
|
|
470
507
|
if (entitySet?.entityTypeName === entityType?.fullyQualifiedName && conditionSave) {
|
|
471
508
|
footerActions.push({ type: ActionType.Primary, key: "SaveAction" });
|
|
@@ -475,7 +512,6 @@ export function getFooterDefaultActions(viewLevel: number, converterContext: Con
|
|
|
475
512
|
if (conditionApply) {
|
|
476
513
|
footerActions.push({ type: ActionType.DefaultApply, key: "ApplyAction" });
|
|
477
514
|
}
|
|
478
|
-
|
|
479
515
|
// Then the non critical DataFieldForActions
|
|
480
516
|
footerDataFieldForActions
|
|
481
517
|
.filter((dataField) => {
|
|
@@ -511,3 +547,39 @@ function getDataFieldAnnotationAction(
|
|
|
511
547
|
isNavigable: true
|
|
512
548
|
};
|
|
513
549
|
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Adds actions and action groups to the headerActions array, prioritizing them according to their criticality.
|
|
553
|
+
* @param headerActions Array with all the current header actions in it
|
|
554
|
+
* @param prioritizeCriticality Flag to determine the priority of the criticality action or actionGroups inside headerActions
|
|
555
|
+
* @param headerDataFieldForActionsOrGroups All actions and action groups from the identification annotation with CopyAction filtered out
|
|
556
|
+
* @param converterContext Instance of the converter context
|
|
557
|
+
*/
|
|
558
|
+
function computeActionsAndActionGroups(
|
|
559
|
+
headerActions: BaseAction[],
|
|
560
|
+
prioritizeCriticality: boolean,
|
|
561
|
+
headerDataFieldForActionsOrGroups: (DataFieldForActionTypes | DataFieldForActionGroupTypes)[],
|
|
562
|
+
converterContext: ConverterContext<PageContextPathTarget>
|
|
563
|
+
): void {
|
|
564
|
+
headerDataFieldForActionsOrGroups
|
|
565
|
+
.filter((dataField) => {
|
|
566
|
+
const criticality = compileExpression(getExpressionFromAnnotation(dataField?.Criticality));
|
|
567
|
+
return prioritizeCriticality ? IMPORTANT_CRITICALITIES.includes(criticality!) : !IMPORTANT_CRITICALITIES.includes(criticality!);
|
|
568
|
+
})
|
|
569
|
+
.forEach((dataField) => {
|
|
570
|
+
if (dataField.$Type === UIAnnotationTypes.DataFieldForAction) {
|
|
571
|
+
headerActions.push(getDataFieldAnnotationAction(dataField, converterContext));
|
|
572
|
+
} else if (dataField.$Type === UIAnnotationTypes.DataFieldForActionGroup) {
|
|
573
|
+
headerActions.push({
|
|
574
|
+
type: ActionType.Menu,
|
|
575
|
+
text: dataField.Label as string,
|
|
576
|
+
key: KeyHelper.generateKeyFromDataField(dataField),
|
|
577
|
+
id: KeyHelper.generateKeyFromDataField(dataField),
|
|
578
|
+
visible: compileExpression(not(equal(getExpressionFromAnnotation(dataField.annotations?.UI?.Hidden), true))),
|
|
579
|
+
menu: dataField.Actions.map((action) =>
|
|
580
|
+
getDataFieldAnnotationAction(action as DataFieldForActionTypes, converterContext)
|
|
581
|
+
)
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
}
|