@sapui5/sap.fe.core 1.102.0 → 1.103.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 +5 -5
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AppComponent.js +62 -26
- package/src/sap/fe/core/AppComponent.ts +56 -40
- package/src/sap/fe/core/AppStateHandler.js +10 -10
- package/src/sap/fe/core/AppStateHandler.ts +9 -9
- package/src/sap/fe/core/BaseController.js +11 -9
- package/src/sap/fe/core/BaseController.ts +15 -13
- package/src/sap/fe/core/CommonUtils.js +236 -109
- package/src/sap/fe/core/CommonUtils.ts +252 -136
- package/src/sap/fe/core/ExtensionAPI.js +24 -27
- package/src/sap/fe/core/ExtensionAPI.ts +36 -38
- package/src/sap/fe/core/PageController.js +4 -4
- package/src/sap/fe/core/PageController.ts +4 -5
- package/src/sap/fe/core/TemplateComponent.js +1 -1
- package/src/sap/fe/core/TemplateComponent.ts +6 -6
- package/src/sap/fe/core/TemplateModel.js +1 -1
- package/src/sap/fe/core/TemplateModel.ts +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +1 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +8 -8
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +11 -10
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +27 -27
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +28 -26
- package/src/sap/fe/core/controllerextensions/EditFlow.js +129 -118
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +154 -141
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +9 -9
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +10 -10
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +31 -26
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +34 -35
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +70 -70
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +77 -77
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +84 -78
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +105 -101
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +66 -68
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +106 -123
- package/src/sap/fe/core/controllerextensions/MassEdit.js +8 -8
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +19 -26
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +20 -12
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +29 -14
- package/src/sap/fe/core/controllerextensions/PageReady.js +97 -25
- package/src/sap/fe/core/controllerextensions/PageReady.ts +94 -34
- package/src/sap/fe/core/controllerextensions/Paginator.js +21 -22
- package/src/sap/fe/core/controllerextensions/Paginator.ts +24 -25
- package/src/sap/fe/core/controllerextensions/Placeholder.js +4 -6
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
- package/src/sap/fe/core/controllerextensions/Routing.js +10 -11
- package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
- package/src/sap/fe/core/controllerextensions/Share.js +22 -22
- package/src/sap/fe/core/controllerextensions/Share.ts +30 -29
- package/src/sap/fe/core/controllerextensions/SideEffects.js +46 -50
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +56 -60
- package/src/sap/fe/core/controllerextensions/ViewState.js +65 -62
- package/src/sap/fe/core/controllerextensions/ViewState.ts +68 -63
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +5 -5
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +8 -7
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +6 -6
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +12 -17
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +2 -2
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +4 -4
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +7 -9
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +18 -19
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +184 -137
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +253 -206
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +113 -121
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +148 -158
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +198 -148
- package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +223 -159
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +24 -26
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +35 -33
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +78 -44
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +90 -60
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +52 -55
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +55 -58
- package/src/sap/fe/core/controls/Any.js +9 -5
- package/src/sap/fe/core/controls/Any.ts +10 -4
- package/src/sap/fe/core/controls/CommandExecution.js +11 -25
- package/src/sap/fe/core/controls/CommandExecution.ts +11 -25
- package/src/sap/fe/core/controls/ConditionalWrapper.js +2 -2
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +3 -3
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +22 -22
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +25 -24
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +2 -2
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +2 -2
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +3 -3
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +5 -5
- package/src/sap/fe/core/controls/FieldWrapper.js +2 -2
- package/src/sap/fe/core/controls/FieldWrapper.ts +3 -3
- package/src/sap/fe/core/controls/FileWrapper.js +2 -2
- package/src/sap/fe/core/controls/FileWrapper.ts +11 -11
- package/src/sap/fe/core/controls/FilterBar.js +6 -2
- package/src/sap/fe/core/controls/FilterBar.ts +13 -9
- package/src/sap/fe/core/controls/FormElementWrapper.js +1 -1
- package/src/sap/fe/core/controls/FormElementWrapper.ts +2 -2
- package/src/sap/fe/core/controls/MassEditSelect.js +1 -1
- package/src/sap/fe/core/controls/MassEditSelect.ts +0 -4
- package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +3 -3
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +16 -12
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -22
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +3 -3
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +8 -8
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +47 -47
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +52 -52
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +8 -2
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +89 -88
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +107 -106
- package/src/sap/fe/core/converters/ConverterContext.js +26 -33
- package/src/sap/fe/core/converters/ConverterContext.ts +51 -60
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +14 -14
- package/src/sap/fe/core/converters/ManifestWrapper.js +59 -45
- package/src/sap/fe/core/converters/ManifestWrapper.ts +55 -45
- package/src/sap/fe/core/converters/MetaModelConverter.js +50 -32
- package/src/sap/fe/core/converters/MetaModelConverter.ts +145 -127
- package/src/sap/fe/core/converters/TemplateConverter.js +21 -20
- package/src/sap/fe/core/converters/TemplateConverter.ts +27 -24
- package/src/sap/fe/core/converters/annotations/DataField.js +54 -34
- package/src/sap/fe/core/converters/annotations/DataField.ts +97 -75
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +1911 -1495
- package/src/sap/fe/core/converters/controls/Common/Action.js +50 -41
- package/src/sap/fe/core/converters/controls/Common/Action.ts +56 -46
- package/src/sap/fe/core/converters/controls/Common/Chart.js +14 -14
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +23 -26
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +3 -3
- package/src/sap/fe/core/converters/controls/Common/Criticality.ts +4 -4
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +28 -28
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +40 -36
- package/src/sap/fe/core/converters/controls/Common/Form.js +25 -27
- package/src/sap/fe/core/converters/controls/Common/Form.ts +37 -45
- package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -11
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +35 -39
- package/src/sap/fe/core/converters/controls/Common/Table.js +174 -183
- package/src/sap/fe/core/converters/controls/Common/Table.ts +237 -250
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +119 -119
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +144 -141
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +45 -41
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +64 -57
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +28 -26
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +46 -43
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +9 -9
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +14 -13
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +67 -64
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +69 -66
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +73 -72
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +98 -96
- package/src/sap/fe/core/converters/helpers/Aggregation.js +2 -4
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +10 -13
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +31 -31
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +30 -29
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +4 -4
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +9 -9
- package/src/sap/fe/core/converters/helpers/ID.js +46 -46
- package/src/sap/fe/core/converters/helpers/ID.ts +25 -25
- package/src/sap/fe/core/converters/helpers/Key.js +7 -7
- package/src/sap/fe/core/converters/helpers/Key.ts +7 -7
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +1 -1
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +4 -4
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +6 -6
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +10 -10
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +46 -62
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +54 -82
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +30 -29
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +40 -40
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +39 -38
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +52 -61
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +4 -4
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +4 -4
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +2 -2
- package/src/sap/fe/core/formatters/CollaborationFormatter.ts +3 -3
- package/src/sap/fe/core/formatters/FPMFormatter.js +5 -5
- package/src/sap/fe/core/formatters/FPMFormatter.ts +10 -10
- package/src/sap/fe/core/formatters/KPIFormatter.js +7 -7
- package/src/sap/fe/core/formatters/KPIFormatter.ts +10 -10
- package/src/sap/fe/core/formatters/StandardFormatter.js +89 -0
- package/src/sap/fe/core/formatters/StandardFormatter.ts +64 -0
- package/src/sap/fe/core/formatters/TableFormatter.js +11 -11
- package/src/sap/fe/core/formatters/TableFormatter.ts +12 -12
- package/src/sap/fe/core/formatters/ValueFormatter.js +8 -8
- package/src/sap/fe/core/formatters/ValueFormatter.ts +9 -9
- package/src/sap/fe/core/helpers/AppStartupHelper.js +15 -15
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +37 -40
- package/src/sap/fe/core/helpers/BindingToolkit.js +1809 -0
- package/src/sap/fe/core/helpers/{BindingExpression.ts → BindingToolkit.ts} +365 -264
- package/src/sap/fe/core/helpers/ClassSupport.js +20 -11
- package/src/sap/fe/core/helpers/ClassSupport.ts +14 -10
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +2 -2
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -1
- package/src/sap/fe/core/helpers/EditState.js +1 -6
- package/src/sap/fe/core/helpers/EditState.ts +5 -10
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +2 -2
- package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +4 -4
- package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
- package/src/sap/fe/core/helpers/FPMHelper.ts +2 -2
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +31 -31
- package/src/sap/fe/core/helpers/KeepAliveHelper.ts +52 -56
- package/src/sap/fe/core/helpers/MassEditHelper.js +281 -254
- package/src/sap/fe/core/helpers/MassEditHelper.ts +337 -289
- package/src/sap/fe/core/helpers/ModelHelper.js +25 -25
- package/src/sap/fe/core/helpers/ModelHelper.ts +34 -32
- package/src/sap/fe/core/helpers/PasteHelper.js +3 -10
- package/src/sap/fe/core/helpers/PasteHelper.ts +20 -25
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +11 -11
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +3 -3
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +8 -8
- package/src/sap/fe/core/helpers/StableIdHelper.js +12 -12
- package/src/sap/fe/core/helpers/StableIdHelper.ts +12 -12
- package/src/sap/fe/core/jsx-runtime/jsx.js +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx.ts +8 -8
- package/src/sap/fe/core/library.js +42 -3
- package/src/sap/fe/core/library.ts +38 -0
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +3 -3
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +2 -2
- package/src/sap/fe/core/messagebundle.properties +49 -35
- package/src/sap/fe/core/messagebundle_ar.properties +13 -5
- package/src/sap/fe/core/messagebundle_bg.properties +13 -5
- package/src/sap/fe/core/messagebundle_ca.properties +13 -5
- package/src/sap/fe/core/messagebundle_cs.properties +13 -5
- package/src/sap/fe/core/messagebundle_cy.properties +14 -6
- package/src/sap/fe/core/messagebundle_da.properties +13 -5
- package/src/sap/fe/core/messagebundle_de.properties +15 -7
- package/src/sap/fe/core/messagebundle_el.properties +14 -6
- package/src/sap/fe/core/messagebundle_en.properties +9 -1
- package/src/sap/fe/core/messagebundle_en_GB.properties +11 -3
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +7 -1
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +9 -1
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +44 -85
- package/src/sap/fe/core/messagebundle_es.properties +13 -5
- package/src/sap/fe/core/messagebundle_es_MX.properties +13 -5
- package/src/sap/fe/core/messagebundle_et.properties +13 -5
- package/src/sap/fe/core/messagebundle_fi.properties +14 -6
- package/src/sap/fe/core/messagebundle_fr.properties +14 -6
- package/src/sap/fe/core/messagebundle_fr_CA.properties +14 -6
- package/src/sap/fe/core/messagebundle_hi.properties +14 -6
- package/src/sap/fe/core/messagebundle_hr.properties +14 -6
- package/src/sap/fe/core/messagebundle_hu.properties +13 -5
- package/src/sap/fe/core/messagebundle_id.properties +13 -5
- package/src/sap/fe/core/messagebundle_it.properties +33 -25
- package/src/sap/fe/core/messagebundle_iw.properties +13 -5
- package/src/sap/fe/core/messagebundle_ja.properties +14 -6
- package/src/sap/fe/core/messagebundle_kk.properties +13 -5
- package/src/sap/fe/core/messagebundle_ko.properties +13 -5
- package/src/sap/fe/core/messagebundle_lt.properties +13 -5
- package/src/sap/fe/core/messagebundle_lv.properties +14 -6
- package/src/sap/fe/core/messagebundle_ms.properties +13 -5
- package/src/sap/fe/core/messagebundle_nl.properties +13 -5
- package/src/sap/fe/core/messagebundle_no.properties +13 -5
- package/src/sap/fe/core/messagebundle_pl.properties +13 -5
- package/src/sap/fe/core/messagebundle_pt.properties +13 -5
- package/src/sap/fe/core/messagebundle_pt_PT.properties +14 -6
- package/src/sap/fe/core/messagebundle_ro.properties +13 -5
- package/src/sap/fe/core/messagebundle_ru.properties +13 -5
- package/src/sap/fe/core/messagebundle_sh.properties +13 -5
- package/src/sap/fe/core/messagebundle_sk.properties +13 -5
- package/src/sap/fe/core/messagebundle_sl.properties +17 -9
- package/src/sap/fe/core/messagebundle_sv.properties +14 -6
- package/src/sap/fe/core/messagebundle_th.properties +13 -5
- package/src/sap/fe/core/messagebundle_tr.properties +13 -5
- package/src/sap/fe/core/messagebundle_uk.properties +13 -5
- package/src/sap/fe/core/messagebundle_vi.properties +13 -5
- package/src/sap/fe/core/messagebundle_zh_CN.properties +14 -6
- package/src/sap/fe/core/messagebundle_zh_TW.properties +13 -5
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +2 -2
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +5 -5
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +2 -2
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +14 -14
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -2
- package/src/sap/fe/core/services/NavigationServiceFactory.js +53 -44
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +54 -46
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +2 -2
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +4 -4
- package/src/sap/fe/core/services/RoutingServiceFactory.js +55 -55
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +67 -65
- package/src/sap/fe/core/services/ShellServicesFactory.js +72 -76
- package/src/sap/fe/core/services/ShellServicesFactory.ts +76 -82
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +61 -61
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +102 -92
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +20 -15
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +26 -21
- package/src/sap/fe/core/support/CommonHelper.js +3 -2
- package/src/sap/fe/core/support/CommonHelper.ts +9 -13
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/support/Diagnostics.ts +5 -5
- package/src/sap/fe/core/templating/CommonFormatters.js +84 -0
- package/src/sap/fe/core/templating/CommonFormatters.ts +86 -0
- package/src/sap/fe/core/templating/CriticalityFormatters.js +31 -31
- package/src/sap/fe/core/templating/CriticalityFormatters.ts +42 -40
- package/src/sap/fe/core/templating/DataFieldFormatters.js +8 -8
- package/src/sap/fe/core/templating/DataFieldFormatters.ts +13 -10
- package/src/sap/fe/core/templating/DataModelPathHelper.js +16 -15
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +42 -32
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +1 -1
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +2 -3
- package/src/sap/fe/core/templating/EntitySetHelper.js +7 -7
- package/src/sap/fe/core/templating/EntitySetHelper.ts +6 -8
- package/src/sap/fe/core/templating/FieldControlHelper.js +35 -34
- package/src/sap/fe/core/templating/FieldControlHelper.ts +29 -46
- package/src/sap/fe/core/templating/FilterHelper.js +10 -9
- package/src/sap/fe/core/templating/FilterHelper.ts +13 -13
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/FilterTemplating.ts +3 -3
- package/src/sap/fe/core/templating/PropertyFormatters.js +7 -7
- package/src/sap/fe/core/templating/PropertyFormatters.ts +21 -19
- package/src/sap/fe/core/templating/PropertyHelper.js +25 -25
- package/src/sap/fe/core/templating/PropertyHelper.ts +25 -26
- package/src/sap/fe/core/templating/UIFormatters.js +148 -93
- package/src/sap/fe/core/templating/UIFormatters.ts +196 -124
- package/src/sap/fe/core/type/Email.js +2 -2
- package/src/sap/fe/core/type/Email.ts +2 -2
- package/src/sap/fe/core/helpers/BindingExpression.js +0 -1732
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
import Log from "sap/base/Log";
|
|
2
|
-
import FlexibleColumnLayout from "sap/f/FlexibleColumnLayout";
|
|
2
|
+
import type FlexibleColumnLayout from "sap/f/FlexibleColumnLayout";
|
|
3
3
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
4
4
|
import BusyLocker from "sap/fe/core/controllerextensions/BusyLocker";
|
|
5
5
|
import { send } from "sap/fe/core/controllerextensions/collaboration/ActivitySync";
|
|
6
6
|
import { Activity } from "sap/fe/core/controllerextensions/collaboration/CollaborationCommon";
|
|
7
|
-
import
|
|
7
|
+
import type { SiblingInformation } from "sap/fe/core/controllerextensions/editFlow/draft";
|
|
8
|
+
import draft from "sap/fe/core/controllerextensions/editFlow/draft";
|
|
8
9
|
import { defineUI5Class, extensible, finalExtension, publicExtension } from "sap/fe/core/helpers/ClassSupport";
|
|
9
10
|
import EditState from "sap/fe/core/helpers/EditState";
|
|
10
|
-
import
|
|
11
|
+
import type { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
|
|
12
|
+
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
11
13
|
import SemanticKeyHelper from "sap/fe/core/helpers/SemanticKeyHelper";
|
|
12
14
|
import FELibrary from "sap/fe/core/library";
|
|
13
|
-
import PageController from "sap/fe/core/PageController";
|
|
14
|
-
import { SemanticMapping } from "sap/fe/core/services/RoutingServiceFactory";
|
|
15
|
-
import {
|
|
16
|
-
import NavContainer from "sap/m/NavContainer";
|
|
17
|
-
import Control from "sap/ui/core/Control";
|
|
15
|
+
import type PageController from "sap/fe/core/PageController";
|
|
16
|
+
import type { SemanticMapping } from "sap/fe/core/services/RoutingServiceFactory";
|
|
17
|
+
import { StandardActions, triggerConfiguredSurvey, TriggerType } from "sap/fe/templates/Feedback";
|
|
18
|
+
import type NavContainer from "sap/m/NavContainer";
|
|
19
|
+
import type Control from "sap/ui/core/Control";
|
|
18
20
|
import Core from "sap/ui/core/Core";
|
|
19
21
|
import coreLibrary from "sap/ui/core/library";
|
|
20
22
|
import Message from "sap/ui/core/message/Message";
|
|
21
23
|
import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
|
|
22
24
|
import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
|
|
23
|
-
import Table from "sap/ui/mdc/Table";
|
|
24
|
-
import Context from "sap/ui/model/odata/v4/Context";
|
|
25
|
+
import type Table from "sap/ui/mdc/Table";
|
|
26
|
+
import type Context from "sap/ui/model/odata/v4/Context";
|
|
25
27
|
import ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
|
|
26
|
-
import ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
27
|
-
import ODataModel from "sap/ui/model/odata/v4/ODataModel";
|
|
28
|
-
import { CoreEx } from "types/extension_types";
|
|
28
|
+
import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
29
|
+
import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
|
|
30
|
+
import type { CoreEx, V4Context } from "types/extension_types";
|
|
29
31
|
|
|
30
32
|
const CreationMode = FELibrary.CreationMode,
|
|
31
33
|
ProgrammingModel = FELibrary.ProgrammingModel,
|
|
32
34
|
Constants = FELibrary.Constants,
|
|
33
35
|
DraftStatus = FELibrary.DraftStatus,
|
|
34
36
|
EditMode = FELibrary.EditMode,
|
|
37
|
+
StartupMode = FELibrary.StartupMode,
|
|
35
38
|
MessageType = coreLibrary.MessageType;
|
|
36
39
|
|
|
37
40
|
/**
|
|
@@ -58,15 +61,15 @@ class EditFlow extends ControllerExtension {
|
|
|
58
61
|
* Creates a draft document for an existing active document.
|
|
59
62
|
*
|
|
60
63
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
61
|
-
* @param
|
|
62
|
-
* @returns
|
|
64
|
+
* @param oContext Context of the active document
|
|
65
|
+
* @returns Promise resolves once the editable document is available
|
|
63
66
|
* @alias sap.fe.core.controllerextensions.EditFlow#editDocument
|
|
64
67
|
* @public
|
|
65
68
|
* @since 1.90.0
|
|
66
69
|
*/
|
|
67
70
|
@publicExtension()
|
|
68
71
|
@finalExtension()
|
|
69
|
-
async editDocument(oContext:
|
|
72
|
+
async editDocument(oContext: V4Context): Promise<void> {
|
|
70
73
|
const bDraftNavigation = true;
|
|
71
74
|
const transactionHelper = this._getTransactionHelper();
|
|
72
75
|
const oRootViewController = this._getRootViewController() as any;
|
|
@@ -124,9 +127,9 @@ class EditFlow extends ControllerExtension {
|
|
|
124
127
|
* Updates the draft status and displays the error messages if there are errors during an update.
|
|
125
128
|
*
|
|
126
129
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
127
|
-
* @param
|
|
128
|
-
* @param
|
|
129
|
-
* @returns
|
|
130
|
+
* @param oContext Context of the updated field
|
|
131
|
+
* @param oPromise Promise to determine when the update operation is completed. The promise should be resolved when the update operation is completed, so the draft status can be updated.
|
|
132
|
+
* @returns Promise resolves once draft status has been updated
|
|
130
133
|
* @alias sap.fe.core.controllerextensions.EditFlow#updateDocument
|
|
131
134
|
* @public
|
|
132
135
|
* @since 1.90.0
|
|
@@ -207,15 +210,15 @@ class EditFlow extends ControllerExtension {
|
|
|
207
210
|
* Creates a new document.
|
|
208
211
|
*
|
|
209
212
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
210
|
-
* @param
|
|
211
|
-
* @param
|
|
212
|
-
* @param
|
|
213
|
+
* @param vListBinding ODataListBinding object or the binding path for a temporary list binding
|
|
214
|
+
* @param mInParameters Contains the following attributes:
|
|
215
|
+
* @param mInParameters.creationMode The creation mode using one of the following:
|
|
213
216
|
* NewPage - the created document is shown in a new page, depending on whether metadata 'Sync', 'Async' or 'Deferred' is used
|
|
214
217
|
* Inline - The creation is done inline (in a table)
|
|
215
218
|
* External - The creation is done in a different application specified via the parameter 'outbound'
|
|
216
|
-
* @param
|
|
217
|
-
* @param
|
|
218
|
-
* @returns
|
|
219
|
+
* @param mInParameters.outbound The navigation target where the document is created in case of creationMode 'External'
|
|
220
|
+
* @param mInParameters.createAtEnd Specifies if the new entry should be created at the top or bottom of a table in case of creationMode 'Inline'
|
|
221
|
+
* @returns Promise resolves once the object has been created
|
|
219
222
|
* @alias sap.fe.core.controllerextensions.EditFlow#createDocument
|
|
220
223
|
* @public
|
|
221
224
|
* @since 1.90.0
|
|
@@ -263,13 +266,13 @@ class EditFlow extends ControllerExtension {
|
|
|
263
266
|
oTable.getBindingContext(),
|
|
264
267
|
{
|
|
265
268
|
data: oCreationRowObjects,
|
|
266
|
-
customValidationFunction:
|
|
269
|
+
customValidationFunction: oTable.getCreationRow().data("customValidationFunction")
|
|
267
270
|
},
|
|
268
271
|
this.base.getView()
|
|
269
272
|
);
|
|
270
273
|
|
|
271
274
|
// disableAddRowButtonForEmptyData is set to false in manifest converter (Table.ts) if customValidationFunction exists
|
|
272
|
-
if (
|
|
275
|
+
if (oTable.getCreationRow().data("disableAddRowButtonForEmptyData") === "true") {
|
|
273
276
|
const oInternalModelContext = oTable.getBindingContext("internal") as InternalModelContext;
|
|
274
277
|
oInternalModelContext.setProperty("creationRowFieldValidity", {});
|
|
275
278
|
}
|
|
@@ -279,10 +282,14 @@ class EditFlow extends ControllerExtension {
|
|
|
279
282
|
oTable = this.getView().byId(mParameters.tableId) as Table;
|
|
280
283
|
}
|
|
281
284
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
285
|
+
if (oTable && oTable.isA("sap.ui.mdc.Table")) {
|
|
286
|
+
const fnFocusOrScroll =
|
|
287
|
+
mParameters.creationMode === CreationMode.Inline ? oTable.focusRow.bind(oTable) : oTable.scrollToIndex.bind(oTable);
|
|
288
|
+
oTable.getRowBinding().attachEventOnce("change", function () {
|
|
289
|
+
fnFocusOrScroll(mParameters.createAtEnd ? oTable.getRowBinding().getLength() : 0, true);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
|
|
286
293
|
const handleSideEffects = (oListBinding: any, oCreationPromise: Promise<Context>) => {
|
|
287
294
|
oCreationPromise
|
|
288
295
|
.then(function (oNewContext: any) {
|
|
@@ -295,8 +302,8 @@ class EditFlow extends ControllerExtension {
|
|
|
295
302
|
// this is avoid a potential list refresh, there could be a side effect that refreshes the list binding
|
|
296
303
|
// if list binding is refreshed, transient contexts might be lost
|
|
297
304
|
if (!CommonUtils.hasTransientContext(oListBinding)) {
|
|
298
|
-
const
|
|
299
|
-
|
|
305
|
+
const appComponent = CommonUtils.getAppComponent(this.getView());
|
|
306
|
+
appComponent
|
|
300
307
|
.getSideEffectsService()
|
|
301
308
|
.requestSideEffectsForNavigationProperty(oListBinding.getPath(), oBindingContext);
|
|
302
309
|
}
|
|
@@ -307,10 +314,10 @@ class EditFlow extends ControllerExtension {
|
|
|
307
314
|
};
|
|
308
315
|
|
|
309
316
|
/**
|
|
310
|
-
* @param
|
|
317
|
+
* @param aValidationMessages Error messages from custom validation function
|
|
311
318
|
*/
|
|
312
319
|
const createCustomValidationMessages = (aValidationMessages: any[]) => {
|
|
313
|
-
const sCustomValidationFunction = oTable &&
|
|
320
|
+
const sCustomValidationFunction = oTable && oTable.getCreationRow().data("customValidationFunction");
|
|
314
321
|
const mCustomValidity = oTable && oTable.getBindingContext("internal")?.getProperty("creationRowCustomValidity");
|
|
315
322
|
const oMessageManager = Core.getMessageManager();
|
|
316
323
|
const aCustomMessages: any[] = [];
|
|
@@ -331,7 +338,7 @@ class EditFlow extends ControllerExtension {
|
|
|
331
338
|
// Handle Bound CustomValidation message
|
|
332
339
|
if (oValidationMessage.messageTarget) {
|
|
333
340
|
oFieldControl = Core.getControl(mCustomValidity[oValidationMessage.messageTarget].fieldId) as Control;
|
|
334
|
-
sTarget = oFieldControl.getBindingContext()?.getPath()
|
|
341
|
+
sTarget = `${oFieldControl.getBindingContext()?.getPath()}/${oFieldControl.getBindingPath("value")}`;
|
|
335
342
|
// Add validation message if still not exists
|
|
336
343
|
if (
|
|
337
344
|
oMessageManager
|
|
@@ -379,8 +386,9 @@ class EditFlow extends ControllerExtension {
|
|
|
379
386
|
});
|
|
380
387
|
}
|
|
381
388
|
};
|
|
382
|
-
|
|
383
|
-
|
|
389
|
+
if (bShouldBusyLock) {
|
|
390
|
+
BusyLocker.lock(oLockObject);
|
|
391
|
+
}
|
|
384
392
|
return this._syncTask(oExecCustomValidation)
|
|
385
393
|
.then((aValidationMessages: any) => {
|
|
386
394
|
if (aValidationMessages.length > 0) {
|
|
@@ -424,12 +432,12 @@ class EditFlow extends ControllerExtension {
|
|
|
424
432
|
// in the absence of NewAction or NewAction with parameters, creation is async
|
|
425
433
|
sNewAction =
|
|
426
434
|
sProgrammingModel === ProgrammingModel.Draft
|
|
427
|
-
? oMetaModel.getObject(sPath
|
|
435
|
+
? oMetaModel.getObject(`${sPath}@com.sap.vocabularies.Common.v1.DraftRoot/NewAction`)
|
|
428
436
|
: oMetaModel.getObject(
|
|
429
|
-
sPath
|
|
437
|
+
`${sPath}@com.sap.vocabularies.Session.v1.StickySessionSupported/NewAction`
|
|
430
438
|
);
|
|
431
439
|
if (sNewAction) {
|
|
432
|
-
const aParameters = oMetaModel.getObject(
|
|
440
|
+
const aParameters = oMetaModel.getObject(`/${sNewAction}/@$ui5.overload/0/$Parameter`) || [];
|
|
433
441
|
// binding parameter (eg: _it) is not considered
|
|
434
442
|
if (aParameters.length > 1) {
|
|
435
443
|
return CreationMode.Deferred;
|
|
@@ -448,7 +456,7 @@ class EditFlow extends ControllerExtension {
|
|
|
448
456
|
return CreationMode.Async;
|
|
449
457
|
}
|
|
450
458
|
})
|
|
451
|
-
.then((
|
|
459
|
+
.then((resolvedCreationMode: any) => {
|
|
452
460
|
let oCreation: any;
|
|
453
461
|
let mArgs: any;
|
|
454
462
|
const oCreationRow = mParameters.creationRow;
|
|
@@ -459,15 +467,15 @@ class EditFlow extends ControllerExtension {
|
|
|
459
467
|
const oMetaModel = oModel.getMetaModel();
|
|
460
468
|
const oRoutingListener = this._getRoutingListener();
|
|
461
469
|
|
|
462
|
-
if (
|
|
463
|
-
if (
|
|
470
|
+
if (resolvedCreationMode !== CreationMode.Deferred) {
|
|
471
|
+
if (resolvedCreationMode === CreationMode.CreationRow) {
|
|
464
472
|
oCreationRowContext = oCreationRow.getBindingContext();
|
|
465
473
|
sMetaPath = oMetaModel.getMetaPath(oCreationRowContext.getPath());
|
|
466
474
|
// prefill data from creation row
|
|
467
475
|
oPayload = oCreationRowContext.getObject();
|
|
468
476
|
mParameters.data = {};
|
|
469
477
|
Object.keys(oPayload).forEach(function (sPropertyPath: string) {
|
|
470
|
-
const oProperty = oMetaModel.getObject(sMetaPath
|
|
478
|
+
const oProperty = oMetaModel.getObject(`${sMetaPath}/${sPropertyPath}`);
|
|
471
479
|
// ensure navigation properties are not part of the payload, deep create not supported
|
|
472
480
|
if (oProperty && oProperty.$kind === "NavigationProperty") {
|
|
473
481
|
return;
|
|
@@ -476,7 +484,7 @@ class EditFlow extends ControllerExtension {
|
|
|
476
484
|
});
|
|
477
485
|
oValidationCheck = this._checkForValidationErrors(/*oCreationRowContext*/);
|
|
478
486
|
}
|
|
479
|
-
if (
|
|
487
|
+
if (resolvedCreationMode === CreationMode.CreationRow || resolvedCreationMode === CreationMode.Inline) {
|
|
480
488
|
mParameters.keepTransientContextOnFailed = false; // currently not fully supported
|
|
481
489
|
// busy handling shall be done locally only
|
|
482
490
|
mParameters.busyMode = "Local";
|
|
@@ -503,7 +511,7 @@ class EditFlow extends ControllerExtension {
|
|
|
503
511
|
}
|
|
504
512
|
|
|
505
513
|
let oNavigation;
|
|
506
|
-
switch (
|
|
514
|
+
switch (resolvedCreationMode) {
|
|
507
515
|
case CreationMode.Deferred:
|
|
508
516
|
oNavigation = oRoutingListener.navigateForwardToContext(oListBinding, {
|
|
509
517
|
bDeferredContext: true,
|
|
@@ -528,12 +536,12 @@ class EditFlow extends ControllerExtension {
|
|
|
528
536
|
}
|
|
529
537
|
oNavigation = oCreation.then(function (oNewDocumentContext: any) {
|
|
530
538
|
if (!oNewDocumentContext) {
|
|
531
|
-
const
|
|
539
|
+
const coreResourceBundle = (Core as CoreEx).getLibraryResourceBundle("sap.fe.core");
|
|
532
540
|
return oRoutingListener.navigateToMessagePage(
|
|
533
|
-
|
|
541
|
+
coreResourceBundle.getText("C_COMMON_SAPFE_DATA_RECEIVED_ERROR"),
|
|
534
542
|
{
|
|
535
|
-
title:
|
|
536
|
-
description:
|
|
543
|
+
title: coreResourceBundle.getText("C_COMMON_SAPFE_ERROR"),
|
|
544
|
+
description: coreResourceBundle.getText("C_EDITFLOW_SAPFE_CREATION_FAILED_DESCRIPTION")
|
|
537
545
|
}
|
|
538
546
|
);
|
|
539
547
|
} else {
|
|
@@ -574,7 +582,7 @@ class EditFlow extends ControllerExtension {
|
|
|
574
582
|
});
|
|
575
583
|
break;
|
|
576
584
|
default:
|
|
577
|
-
oNavigation = Promise.reject(
|
|
585
|
+
oNavigation = Promise.reject(`Unhandled creationMode ${resolvedCreationMode}`);
|
|
578
586
|
break;
|
|
579
587
|
}
|
|
580
588
|
|
|
@@ -618,14 +626,9 @@ class EditFlow extends ControllerExtension {
|
|
|
618
626
|
});
|
|
619
627
|
})
|
|
620
628
|
.finally(function () {
|
|
621
|
-
if (
|
|
622
|
-
|
|
623
|
-
mParameters.creationMode === CreationMode.Inline ? oTable.focusRow.bind(oTable) : oTable.scrollToIndex.bind(oTable);
|
|
624
|
-
oTable.getRowBinding().attachEventOnce("change", function () {
|
|
625
|
-
fnFocusOrScroll(mParameters.createAtEnd ? oTable.getRowBinding().getLength() : 0, true);
|
|
626
|
-
});
|
|
629
|
+
if (bShouldBusyLock) {
|
|
630
|
+
BusyLocker.unlock(oLockObject);
|
|
627
631
|
}
|
|
628
|
-
bShouldBusyLock && BusyLocker.unlock(oLockObject);
|
|
629
632
|
});
|
|
630
633
|
}
|
|
631
634
|
|
|
@@ -636,9 +639,10 @@ class EditFlow extends ControllerExtension {
|
|
|
636
639
|
*
|
|
637
640
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
638
641
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
639
|
-
*
|
|
640
|
-
* @param
|
|
641
|
-
* @
|
|
642
|
+
*
|
|
643
|
+
* @param mParameters Object containing the parameters passed to onBeforeSave
|
|
644
|
+
* @param mParameters.context Page context that is going to be saved.
|
|
645
|
+
* @returns A promise to be returned by the overridden method. If resolved, the 'Save' action is triggered. If rejected, the 'Save' action is not triggered and the user stays in edit mode.
|
|
642
646
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
643
647
|
* @alias sap.fe.core.controllerextensions.EditFlow#onBeforeSave
|
|
644
648
|
* @public
|
|
@@ -658,10 +662,11 @@ class EditFlow extends ControllerExtension {
|
|
|
658
662
|
*
|
|
659
663
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
660
664
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
661
|
-
*
|
|
662
|
-
* @param
|
|
663
|
-
* @param
|
|
664
|
-
* @
|
|
665
|
+
*
|
|
666
|
+
* @param mParameters Object containing the parameters passed to onBeforeCreate
|
|
667
|
+
* @param mParameters.contextPath Path pointing to the context on which Create action is triggered
|
|
668
|
+
* @param mParameters.createParameters Array of values that are filled in the Action Parameter Dialog
|
|
669
|
+
* @returns A promise to be returned by the overridden method. If resolved, the 'Create' action is triggered. If rejected, the 'Create' action is not triggered.
|
|
665
670
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
666
671
|
* @alias sap.fe.core.controllerextensions.EditFlow#onBeforeCreate
|
|
667
672
|
* @public
|
|
@@ -681,9 +686,10 @@ class EditFlow extends ControllerExtension {
|
|
|
681
686
|
*
|
|
682
687
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
683
688
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
684
|
-
*
|
|
685
|
-
* @param
|
|
686
|
-
* @
|
|
689
|
+
*
|
|
690
|
+
* @param mParameters Object containing the parameters passed to onBeforeEdit
|
|
691
|
+
* @param mParameters.context Page context that is going to be edited.
|
|
692
|
+
* @returns A promise to be returned by the overridden method. If resolved, the 'Edit' action is triggered. If rejected, the 'Edit' action is not triggered and the user stays in display mode.
|
|
687
693
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
688
694
|
* @alias sap.fe.core.controllerextensions.EditFlow#onBeforeEdit
|
|
689
695
|
* @public
|
|
@@ -703,9 +709,10 @@ class EditFlow extends ControllerExtension {
|
|
|
703
709
|
*
|
|
704
710
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
705
711
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
706
|
-
*
|
|
707
|
-
* @param
|
|
708
|
-
* @
|
|
712
|
+
*
|
|
713
|
+
* @param mParameters Object containing the parameters passed to onBeforeDiscard
|
|
714
|
+
* @param mParameters.context Page context that is going to be discarded.
|
|
715
|
+
* @returns A promise to be returned by the overridden method. If resolved, the 'Discard' action is triggered. If rejected, the 'Discard' action is not triggered and the user stays in edit mode.
|
|
709
716
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
710
717
|
* @alias sap.fe.core.controllerextensions.EditFlow#onBeforeDiscard
|
|
711
718
|
* @public
|
|
@@ -725,9 +732,10 @@ class EditFlow extends ControllerExtension {
|
|
|
725
732
|
*
|
|
726
733
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
727
734
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
728
|
-
*
|
|
729
|
-
* @param
|
|
730
|
-
* @
|
|
735
|
+
*
|
|
736
|
+
* @param mParameters Object containing the parameters passed to onBeforeDelete
|
|
737
|
+
* @param mParameters.contexts An array of contexts that are going to be deleted
|
|
738
|
+
* @returns A promise to be returned by the overridden method. If resolved, the 'Delete' action is triggered. If rejected, the 'Delete' action is not triggered.
|
|
731
739
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
732
740
|
* @alias sap.fe.core.controllerextensions.EditFlow#onBeforeDelete
|
|
733
741
|
* @public
|
|
@@ -752,15 +760,15 @@ class EditFlow extends ControllerExtension {
|
|
|
752
760
|
* Saves a new document after checking it.
|
|
753
761
|
*
|
|
754
762
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
755
|
-
* @param
|
|
756
|
-
* @returns
|
|
763
|
+
* @param oContext Context of the editable document
|
|
764
|
+
* @returns Promise resolves once save is complete
|
|
757
765
|
* @alias sap.fe.core.controllerextensions.EditFlow#saveDocument
|
|
758
766
|
* @public
|
|
759
767
|
* @since 1.90.0
|
|
760
768
|
*/
|
|
761
769
|
@publicExtension()
|
|
762
770
|
@finalExtension()
|
|
763
|
-
async saveDocument(oContext:
|
|
771
|
+
async saveDocument(oContext: V4Context, mParameters: any): Promise<void> {
|
|
764
772
|
mParameters = mParameters || {};
|
|
765
773
|
const bExecuteSideEffectsOnError = mParameters.bExecuteSideEffectsOnError || undefined;
|
|
766
774
|
const bDraftNavigation = true;
|
|
@@ -802,7 +810,7 @@ class EditFlow extends ControllerExtension {
|
|
|
802
810
|
this._removeStickySessionInternalProperties(sProgrammingModel);
|
|
803
811
|
|
|
804
812
|
this._sendActivity(Activity.Activate, activeDocumentContext);
|
|
805
|
-
this._triggerConfiguredSurvey(
|
|
813
|
+
this._triggerConfiguredSurvey(StandardActions.save, TriggerType.standardAction);
|
|
806
814
|
|
|
807
815
|
this._setEditMode(EditMode.Display, false);
|
|
808
816
|
this._getMessageHandler().showMessageDialog();
|
|
@@ -828,7 +836,7 @@ class EditFlow extends ControllerExtension {
|
|
|
828
836
|
}
|
|
829
837
|
@publicExtension()
|
|
830
838
|
@finalExtension()
|
|
831
|
-
async toggleDraftActive(oContext:
|
|
839
|
+
async toggleDraftActive(oContext: V4Context): Promise<void> {
|
|
832
840
|
const oContextData = oContext.getObject();
|
|
833
841
|
let bEditable: boolean;
|
|
834
842
|
const bIsDraft = oContext && this._getProgrammingModel(oContext) === ProgrammingModel.Draft;
|
|
@@ -863,7 +871,7 @@ class EditFlow extends ControllerExtension {
|
|
|
863
871
|
const lastSemanticMapping = this._getSemanticMapping();
|
|
864
872
|
if (lastSemanticMapping?.technicalPath === oContext.getPath()) {
|
|
865
873
|
const targetPath = siblingInfo.pathMapping[siblingInfo.pathMapping.length - 1].newPath;
|
|
866
|
-
siblingInfo.pathMapping.push({ oldPath: lastSemanticMapping
|
|
874
|
+
siblingInfo.pathMapping.push({ oldPath: lastSemanticMapping.semanticPath, newPath: targetPath });
|
|
867
875
|
}
|
|
868
876
|
this._updatePathsInHistory(siblingInfo.pathMapping);
|
|
869
877
|
}
|
|
@@ -873,7 +881,7 @@ class EditFlow extends ControllerExtension {
|
|
|
873
881
|
return Promise.reject("Error in EditFlow.toggleDraftActive - Cannot find sibling");
|
|
874
882
|
}
|
|
875
883
|
} catch (oError) {
|
|
876
|
-
return Promise.reject(
|
|
884
|
+
return Promise.reject(`Error in EditFlow.toggleDraftActive:${oError}` as any);
|
|
877
885
|
}
|
|
878
886
|
}
|
|
879
887
|
|
|
@@ -886,17 +894,17 @@ class EditFlow extends ControllerExtension {
|
|
|
886
894
|
*
|
|
887
895
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
888
896
|
* @param oContext Context of the editable document
|
|
889
|
-
* @param
|
|
890
|
-
* @param
|
|
891
|
-
* @param
|
|
892
|
-
* @returns
|
|
897
|
+
* @param mParameters Can contain the following attributes:
|
|
898
|
+
* @param mParameters.control This is the control used to open the discard popover
|
|
899
|
+
* @param mParameters.skipDiscardPopover Optional, supresses the discard popover and allows custom handling
|
|
900
|
+
* @returns Promise resolves once editable document has been discarded
|
|
893
901
|
* @alias sap.fe.core.controllerextensions.EditFlow#cancelDocument
|
|
894
902
|
* @public
|
|
895
903
|
* @since 1.90.0
|
|
896
904
|
*/
|
|
897
905
|
@publicExtension()
|
|
898
906
|
@finalExtension()
|
|
899
|
-
async cancelDocument(oContext:
|
|
907
|
+
async cancelDocument(oContext: V4Context, mParameters: { control: object; skipDiscardPopover?: boolean }): Promise<any> {
|
|
900
908
|
const transactionHelper = this._getTransactionHelper();
|
|
901
909
|
const oResourceBundle = this._getResourceBundle();
|
|
902
910
|
const mInParameters: any = mParameters;
|
|
@@ -983,11 +991,11 @@ class EditFlow extends ControllerExtension {
|
|
|
983
991
|
* Deletes the document.
|
|
984
992
|
*
|
|
985
993
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
986
|
-
* @param
|
|
987
|
-
* @param
|
|
988
|
-
* @param
|
|
989
|
-
* @param
|
|
990
|
-
* @returns
|
|
994
|
+
* @param oContext Context of the document
|
|
995
|
+
* @param mInParameters Can contain the following attributes:
|
|
996
|
+
* @param mInParameters.title Title of the object being deleted
|
|
997
|
+
* @param mInParameters.description Description of the object being deleted
|
|
998
|
+
* @returns Promise resolves once document has been deleted
|
|
991
999
|
* @alias sap.fe.core.controllerextensions.EditFlow#deleteDocument
|
|
992
1000
|
* @public
|
|
993
1001
|
* @since 1.90.0
|
|
@@ -1014,11 +1022,18 @@ class EditFlow extends ControllerExtension {
|
|
|
1014
1022
|
}
|
|
1015
1023
|
this._sendActivity(Activity.Delete, oContext);
|
|
1016
1024
|
|
|
1017
|
-
|
|
1018
|
-
// After delete is successfull, we need to dettch the setBackNavigation Methods
|
|
1025
|
+
// After delete is successfull, we need to detach the setBackNavigation Methods
|
|
1019
1026
|
if (oAppComponent) {
|
|
1020
1027
|
oAppComponent.getShellServices().setBackNavigation();
|
|
1021
1028
|
}
|
|
1029
|
+
|
|
1030
|
+
if (oAppComponent?.getStartupMode() === StartupMode.Deeplink && !this._isFclEnabled()) {
|
|
1031
|
+
// In case the app has been launched with semantic keys, deleting the object we've landed on shall navigate back
|
|
1032
|
+
// to the app we came from (except for FCL, where we navigate to LR as usual)
|
|
1033
|
+
oAppComponent.getRouterProxy().exitFromApp();
|
|
1034
|
+
} else {
|
|
1035
|
+
this._getRoutingListener().navigateBackFromContext(oContext);
|
|
1036
|
+
}
|
|
1022
1037
|
})
|
|
1023
1038
|
.catch(function (oError: any) {
|
|
1024
1039
|
Log.error("Error while deleting the document", oError);
|
|
@@ -1029,8 +1044,8 @@ class EditFlow extends ControllerExtension {
|
|
|
1029
1044
|
* Submit the current set of changes and navigate back.
|
|
1030
1045
|
*
|
|
1031
1046
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
1032
|
-
* @param
|
|
1033
|
-
* @returns
|
|
1047
|
+
* @param oContext Context of the document
|
|
1048
|
+
* @returns Promise resolves once the changes have been saved
|
|
1034
1049
|
* @alias sap.fe.core.controllerextensions.EditFlow#applyDocument
|
|
1035
1050
|
* @public
|
|
1036
1051
|
* @since 1.90.0
|
|
@@ -1063,20 +1078,20 @@ class EditFlow extends ControllerExtension {
|
|
|
1063
1078
|
* Invokes an action (bound or unbound) and tracks the changes so that other pages can be refreshed and show the updated data upon navigation.
|
|
1064
1079
|
*
|
|
1065
1080
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
1066
|
-
* @param
|
|
1067
|
-
* @param
|
|
1068
|
-
* @param
|
|
1069
|
-
* @param
|
|
1070
|
-
* @param
|
|
1071
|
-
* @param
|
|
1072
|
-
* @param
|
|
1073
|
-
* @param
|
|
1074
|
-
* @returns
|
|
1081
|
+
* @param sActionName The name of the action to be called
|
|
1082
|
+
* @param mInParameters Contains the following attributes:
|
|
1083
|
+
* @param mInParameters.contexts For a bound action, a context or an array with contexts for which the action is to be called must be provided
|
|
1084
|
+
* @param mInParameters.model For an unbound action, an instance of an OData V4 model must be provided
|
|
1085
|
+
* @param mInParameters.requiresNavigation Boolean value indicating whether navigation is required after the action has been executed. Navigation takes place to the context returned by the action
|
|
1086
|
+
* @param mInParameters.label A human-readable label for the action. This is needed in case the action has a parameter and a parameter dialog is shown to the user. The label will be used for the title of the dialog and for the confirmation button
|
|
1087
|
+
* @param mInParameters.invocationGrouping Mode how actions are to be called: 'ChangeSet' to put all action calls into one changeset, 'Isolated' to put them into separate changesets
|
|
1088
|
+
* @param mExtraParams PRIVATE
|
|
1089
|
+
* @returns A promise once the action has been invoked
|
|
1075
1090
|
* @alias sap.fe.core.controllerextensions.EditFlow#invokeAction
|
|
1076
1091
|
* @public
|
|
1077
1092
|
* @since 1.90.0
|
|
1078
1093
|
* @final
|
|
1079
|
-
|
|
1094
|
+
*/
|
|
1080
1095
|
@publicExtension()
|
|
1081
1096
|
@finalExtension()
|
|
1082
1097
|
invokeAction(
|
|
@@ -1181,7 +1196,7 @@ class EditFlow extends ControllerExtension {
|
|
|
1181
1196
|
}
|
|
1182
1197
|
|
|
1183
1198
|
if (!mParameters.contexts) {
|
|
1184
|
-
return Promise.reject(
|
|
1199
|
+
return Promise.reject(`Context not found for entity type ${sOverloadEntityType}`);
|
|
1185
1200
|
}
|
|
1186
1201
|
}
|
|
1187
1202
|
}
|
|
@@ -1209,7 +1224,7 @@ class EditFlow extends ControllerExtension {
|
|
|
1209
1224
|
})
|
|
1210
1225
|
.then((oResponse: any) => {
|
|
1211
1226
|
this._sendActivity(Activity.Action, mParameters.contexts);
|
|
1212
|
-
this._triggerConfiguredSurvey(sActionName,
|
|
1227
|
+
this._triggerConfiguredSurvey(sActionName, TriggerType.action);
|
|
1213
1228
|
|
|
1214
1229
|
if (oCurrentActionCallBacks) {
|
|
1215
1230
|
oCurrentActionCallBacks.fResolver(oResponse);
|
|
@@ -1260,10 +1275,8 @@ class EditFlow extends ControllerExtension {
|
|
|
1260
1275
|
}
|
|
1261
1276
|
if (err == Constants.CancelActionDialog) {
|
|
1262
1277
|
return Promise.reject("Dialog cancelled.");
|
|
1263
|
-
} else {
|
|
1264
|
-
|
|
1265
|
-
return Promise.reject("Error in EditFlow.invokeAction:" + err);
|
|
1266
|
-
}
|
|
1278
|
+
} else if (!(err && (err.canceled || (err.rejectedItems && err.rejectedItems[0].canceled)))) {
|
|
1279
|
+
return Promise.reject(`Error in EditFlow.invokeAction:${err}`);
|
|
1267
1280
|
}
|
|
1268
1281
|
});
|
|
1269
1282
|
}
|
|
@@ -1272,13 +1285,13 @@ class EditFlow extends ControllerExtension {
|
|
|
1272
1285
|
* Secured execution of the given function. Ensures that the function is only executed when certain conditions are fulfilled.
|
|
1273
1286
|
*
|
|
1274
1287
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
1275
|
-
* @param
|
|
1276
|
-
* @param
|
|
1277
|
-
* @param
|
|
1278
|
-
* @param
|
|
1279
|
-
* @param
|
|
1280
|
-
* @param
|
|
1281
|
-
* @returns
|
|
1288
|
+
* @param fnFunction The function to be executed. Should return a promise that is settled after completion of the execution. If nothing is returned, immediate completion is assumed.
|
|
1289
|
+
* @param mParameters Definitions of the preconditions to be checked before execution
|
|
1290
|
+
* @param mParameters.busy Defines the busy indicator
|
|
1291
|
+
* @param mParameters.busy.set Triggers a busy indicator when the function is executed.
|
|
1292
|
+
* @param mParameters.busy.check Executes function only if application isn't busy.
|
|
1293
|
+
* @param mParameters.updatesDocument This operation updates the current document without using the bound model and context. As a result, the draft status is updated if a draft document exists, and the user has to confirm the cancellation of the editing process.
|
|
1294
|
+
* @returns A promise that is rejected if the execution is prohibited and resolved by the promise returned by the fnFunction.
|
|
1282
1295
|
* @alias sap.fe.core.controllerextensions.EditFlow#securedExecution
|
|
1283
1296
|
* @public
|
|
1284
1297
|
* @experimental As of version 1.90.0
|
|
@@ -1339,7 +1352,7 @@ class EditFlow extends ControllerExtension {
|
|
|
1339
1352
|
if (bBusySet) {
|
|
1340
1353
|
BusyLocker.unlock(oLockObject);
|
|
1341
1354
|
}
|
|
1342
|
-
|
|
1355
|
+
this._getMessageHandler().showMessageDialog();
|
|
1343
1356
|
});
|
|
1344
1357
|
}
|
|
1345
1358
|
|
|
@@ -1353,8 +1366,8 @@ class EditFlow extends ControllerExtension {
|
|
|
1353
1366
|
if (!(this.base.getView()?.getBindingContext("internal") as InternalModelContext)?.getProperty("skipPatchHandlers")) {
|
|
1354
1367
|
// Create a promise that will be resolved or rejected when the path is completed
|
|
1355
1368
|
const oPatchPromise = new Promise<void>((resolve, reject) => {
|
|
1356
|
-
oEvent.getSource().attachEventOnce("patchCompleted", (
|
|
1357
|
-
const bSuccess =
|
|
1369
|
+
oEvent.getSource().attachEventOnce("patchCompleted", (patchCompletedEvent: any) => {
|
|
1370
|
+
const bSuccess = patchCompletedEvent.getParameter("success");
|
|
1358
1371
|
if (bSuccess) {
|
|
1359
1372
|
resolve();
|
|
1360
1373
|
} else {
|
|
@@ -1455,7 +1468,6 @@ class EditFlow extends ControllerExtension {
|
|
|
1455
1468
|
* @function
|
|
1456
1469
|
* @name _createActionPromise
|
|
1457
1470
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
1458
|
-
*
|
|
1459
1471
|
* @returns {Function} The resolver function which can be used to externally resolve the promise
|
|
1460
1472
|
*/
|
|
1461
1473
|
|
|
@@ -1480,7 +1492,7 @@ class EditFlow extends ControllerExtension {
|
|
|
1480
1492
|
send(this.getView(), action, content);
|
|
1481
1493
|
}
|
|
1482
1494
|
|
|
1483
|
-
_triggerConfiguredSurvey(sActionName: string, triggerType:
|
|
1495
|
+
_triggerConfiguredSurvey(sActionName: string, triggerType: TriggerType) {
|
|
1484
1496
|
triggerConfiguredSurvey(this.getView(), sActionName, triggerType);
|
|
1485
1497
|
}
|
|
1486
1498
|
|
|
@@ -1488,9 +1500,9 @@ class EditFlow extends ControllerExtension {
|
|
|
1488
1500
|
* @function
|
|
1489
1501
|
* @name _getActionResponseDataAndKeys
|
|
1490
1502
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
1491
|
-
* @param
|
|
1492
|
-
* @param
|
|
1493
|
-
* @returns
|
|
1503
|
+
* @param sActionName The name of the action that is executed
|
|
1504
|
+
* @param oResponse The bound action's response data or response context
|
|
1505
|
+
* @returns Object with data and names of the key fields of the response
|
|
1494
1506
|
*/
|
|
1495
1507
|
_getActionResponseDataAndKeys(sActionName: string, oResponse: object) {
|
|
1496
1508
|
return (this.base.getView().getController() as PageController)._editFlow.getActionResponseDataAndKeys(sActionName, oResponse);
|
|
@@ -1580,7 +1592,7 @@ class EditFlow extends ControllerExtension {
|
|
|
1580
1592
|
}
|
|
1581
1593
|
|
|
1582
1594
|
_getBoundContext(view: any, params: any) {
|
|
1583
|
-
const viewLevel =
|
|
1595
|
+
const viewLevel = view.getViewData().viewLevel;
|
|
1584
1596
|
const bRefreshAfterAction = viewLevel > 1 || (viewLevel === 1 && params.controlId);
|
|
1585
1597
|
return !params.isNavigable || !!bRefreshAfterAction;
|
|
1586
1598
|
}
|
|
@@ -1624,9 +1636,9 @@ class EditFlow extends ControllerExtension {
|
|
|
1624
1636
|
* @function
|
|
1625
1637
|
* @name _refreshListIfRequired
|
|
1626
1638
|
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
1627
|
-
* @param
|
|
1628
|
-
* @param
|
|
1629
|
-
* @returns
|
|
1639
|
+
* @param oResponse The response of the bound action and the names of the key fields
|
|
1640
|
+
* @param oContext The bound context on which the action was executed
|
|
1641
|
+
* @returns Always resolves to param oResponse
|
|
1630
1642
|
*/
|
|
1631
1643
|
_refreshListIfRequired(oResponse: any, oContext: Context) {
|
|
1632
1644
|
if (!oContext || !oResponse || !oResponse.oData) {
|
|
@@ -1786,7 +1798,7 @@ class EditFlow extends ControllerExtension {
|
|
|
1786
1798
|
}
|
|
1787
1799
|
}
|
|
1788
1800
|
|
|
1789
|
-
_createSiblingInfo(currentContext:
|
|
1801
|
+
_createSiblingInfo(currentContext: V4Context, newContext: V4Context): SiblingInformation {
|
|
1790
1802
|
return {
|
|
1791
1803
|
targetContext: newContext,
|
|
1792
1804
|
pathMapping: [
|
|
@@ -1810,21 +1822,22 @@ class EditFlow extends ControllerExtension {
|
|
|
1810
1822
|
}
|
|
1811
1823
|
|
|
1812
1824
|
/**
|
|
1813
|
-
* This methods creates a sibling context for a
|
|
1825
|
+
* This methods creates a sibling context for a subobject page, and calculates a sibling path for
|
|
1814
1826
|
* all intermediates paths between the OP and the sub-OP.
|
|
1815
1827
|
*
|
|
1816
|
-
* @param
|
|
1817
|
-
* @param
|
|
1818
|
-
* @param
|
|
1819
|
-
* @param
|
|
1820
|
-
* @returns
|
|
1828
|
+
* @param rootCurrentContext The context for the root of the draft
|
|
1829
|
+
* @param rightmostCurrentContext The context of the subobject
|
|
1830
|
+
* @param sProgrammingModel The programming model
|
|
1831
|
+
* @param doNotComputeIfRoot If true, we don't compute siblingInfo if the root and the rightmost contexts are the same
|
|
1832
|
+
* @returns Returns the siblingInformation object
|
|
1821
1833
|
*/
|
|
1822
1834
|
async _computeSiblingInformation(
|
|
1823
|
-
rootCurrentContext:
|
|
1824
|
-
rightmostCurrentContext:
|
|
1835
|
+
rootCurrentContext: V4Context,
|
|
1836
|
+
rightmostCurrentContext: V4Context | null | undefined,
|
|
1825
1837
|
sProgrammingModel: string,
|
|
1826
1838
|
doNotComputeIfRoot: boolean
|
|
1827
1839
|
): Promise<SiblingInformation | undefined> {
|
|
1840
|
+
rightmostCurrentContext = rightmostCurrentContext ?? rootCurrentContext;
|
|
1828
1841
|
if (!rightmostCurrentContext.getPath().startsWith(rootCurrentContext.getPath())) {
|
|
1829
1842
|
// Wrong usage !!
|
|
1830
1843
|
Log.error("Cannot compute rightmost sibling context");
|
|
@@ -1841,7 +1854,7 @@ class EditFlow extends ControllerExtension {
|
|
|
1841
1854
|
// If not in draft mode, we just recreate a context from the path of the rightmost context
|
|
1842
1855
|
// No path mapping is needed
|
|
1843
1856
|
return {
|
|
1844
|
-
targetContext: model.bindContext(rightmostCurrentContext.getPath()).getBoundContext()
|
|
1857
|
+
targetContext: model.bindContext(rightmostCurrentContext.getPath()).getBoundContext(),
|
|
1845
1858
|
pathMapping: []
|
|
1846
1859
|
};
|
|
1847
1860
|
}
|