@sapui5/sap.fe.core 1.101.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 +66 -30
- package/src/sap/fe/core/AppComponent.ts +68 -51
- package/src/sap/fe/core/AppStateHandler.js +13 -13
- package/src/sap/fe/core/AppStateHandler.ts +18 -18
- 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 +279 -188
- package/src/sap/fe/core/CommonUtils.ts +306 -215
- package/src/sap/fe/core/ExtensionAPI.js +25 -30
- package/src/sap/fe/core/ExtensionAPI.ts +37 -41
- package/src/sap/fe/core/PageController.js +12 -7
- package/src/sap/fe/core/PageController.ts +10 -5
- package/src/sap/fe/core/TemplateComponent.js +6 -6
- package/src/sap/fe/core/TemplateComponent.ts +11 -11
- package/src/sap/fe/core/TemplateModel.js +2 -2
- package/src/sap/fe/core/TemplateModel.ts +3 -3
- 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 +306 -78
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +280 -70
- 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/{BusyLocker.js → controllerextensions/BusyLocker.js} +1 -1
- package/src/sap/fe/core/{BusyLocker.ts → controllerextensions/BusyLocker.ts} +7 -7
- package/src/sap/fe/core/controllerextensions/EditFlow.js +351 -229
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +321 -246
- 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 +59 -34
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +71 -45
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +72 -72
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +82 -80
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +152 -131
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +171 -152
- 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 +11 -10
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +31 -37
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +21 -13
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +30 -15
- 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 +19 -11
- package/src/sap/fe/core/controllerextensions/Paginator.ts +22 -14
- 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 +39 -21
- package/src/sap/fe/core/controllerextensions/Share.ts +45 -26
- package/src/sap/fe/core/controllerextensions/SideEffects.js +47 -51
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +58 -62
- package/src/sap/fe/core/controllerextensions/ViewState.js +75 -62
- package/src/sap/fe/core/controllerextensions/ViewState.ts +78 -63
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +105 -0
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +99 -0
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +360 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/ActivitySync.ts +58 -112
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/CollaborationCommon.js +2 -2
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/CollaborationCommon.ts +7 -7
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +262 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/Manage.ts +20 -21
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/ManageDialog.fragment.xml +0 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/UserDetails.fragment.xml +5 -7
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1631 -0
- package/src/sap/fe/core/{TransactionHelper.ts → controllerextensions/editFlow/TransactionHelper.ts} +270 -211
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +772 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/draft.ts +240 -100
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +1199 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/operations.ts +364 -229
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +188 -0
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +185 -0
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +626 -0
- package/src/sap/fe/core/{actions → controllerextensions/messageHandler}/messageHandling.ts +112 -69
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +937 -0
- package/src/sap/fe/core/{RouterProxy.ts → controllerextensions/routing/RouterProxy.ts} +72 -73
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +21 -18
- 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 +21 -24
- package/src/sap/fe/core/controls/CommandExecution.ts +19 -24
- 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 +48 -43
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +51 -46
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +3 -2
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +3 -2
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +11 -3
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +19 -9
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +14 -8
- 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 +50 -3
- package/src/sap/fe/core/controls/FileWrapper.ts +45 -12
- 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 +12 -2
- package/src/sap/fe/core/controls/FormElementWrapper.ts +14 -3
- package/src/sap/fe/core/controls/MassEditSelect.js +33 -0
- package/src/sap/fe/core/controls/MassEditSelect.ts +41 -0
- 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 +48 -48
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +71 -76
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +36 -65
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +107 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +551 -36
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +605 -36
- 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 +2 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +17 -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 +56 -67
- package/src/sap/fe/core/converters/MetaModelConverter.ts +183 -193
- 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 +73 -37
- package/src/sap/fe/core/converters/annotations/DataField.ts +121 -77
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +1911 -1495
- package/src/sap/fe/core/converters/controls/Common/Action.js +51 -49
- package/src/sap/fe/core/converters/controls/Common/Action.ts +58 -54
- package/src/sap/fe/core/converters/controls/Common/Chart.js +22 -15
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +29 -27
- 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 +30 -34
- package/src/sap/fe/core/converters/controls/Common/Form.ts +48 -58
- 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 +318 -244
- package/src/sap/fe/core/converters/controls/Common/Table.ts +368 -297
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +135 -125
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +162 -148
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +51 -45
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +79 -67
- 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 +92 -89
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +124 -120
- package/src/sap/fe/core/converters/helpers/Aggregation.js +11 -5
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +25 -23
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +31 -30
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +31 -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 +56 -55
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +65 -77
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +6 -6
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +10 -8
- 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 +83 -22
- package/src/sap/fe/core/formatters/TableFormatter.ts +80 -25
- 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/fpm/Component.js +2 -2
- package/src/sap/fe/core/fpm/Component.ts +1 -1
- 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} +388 -285
- package/src/sap/fe/core/helpers/ClassSupport.js +20 -11
- package/src/sap/fe/core/helpers/ClassSupport.ts +15 -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 +3 -2
- package/src/sap/fe/core/helpers/FPMHelper.ts +10 -9
- 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 +532 -264
- package/src/sap/fe/core/helpers/MassEditHelper.ts +560 -289
- package/src/sap/fe/core/helpers/ModelHelper.js +25 -25
- package/src/sap/fe/core/helpers/ModelHelper.ts +50 -58
- 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 +16 -12
- package/src/sap/fe/core/helpers/StableIdHelper.ts +20 -16
- package/src/sap/fe/core/{Synchronization.js → helpers/Synchronization.js} +1 -1
- package/src/sap/fe/core/{Synchronization.ts → helpers/Synchronization.ts} +1 -1
- 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 +51 -3
- package/src/sap/fe/core/library.ts +47 -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 +151 -197
- package/src/sap/fe/core/messagebundle_ar.properties +36 -63
- package/src/sap/fe/core/messagebundle_bg.properties +36 -63
- package/src/sap/fe/core/messagebundle_ca.properties +36 -63
- package/src/sap/fe/core/messagebundle_cs.properties +36 -63
- package/src/sap/fe/core/messagebundle_cy.properties +36 -63
- package/src/sap/fe/core/messagebundle_da.properties +37 -64
- package/src/sap/fe/core/messagebundle_de.properties +36 -63
- package/src/sap/fe/core/messagebundle_el.properties +38 -65
- package/src/sap/fe/core/messagebundle_en.properties +37 -64
- package/src/sap/fe/core/messagebundle_en_GB.properties +37 -64
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +44 -73
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +37 -64
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +52 -81
- package/src/sap/fe/core/messagebundle_es.properties +36 -63
- package/src/sap/fe/core/messagebundle_es_MX.properties +36 -63
- package/src/sap/fe/core/messagebundle_et.properties +36 -63
- package/src/sap/fe/core/messagebundle_fi.properties +36 -63
- package/src/sap/fe/core/messagebundle_fr.properties +39 -66
- package/src/sap/fe/core/messagebundle_fr_CA.properties +36 -63
- package/src/sap/fe/core/messagebundle_hi.properties +36 -63
- package/src/sap/fe/core/messagebundle_hr.properties +36 -63
- package/src/sap/fe/core/messagebundle_hu.properties +35 -62
- package/src/sap/fe/core/messagebundle_id.properties +37 -64
- package/src/sap/fe/core/messagebundle_it.properties +54 -81
- package/src/sap/fe/core/messagebundle_iw.properties +36 -63
- package/src/sap/fe/core/messagebundle_ja.properties +36 -63
- package/src/sap/fe/core/messagebundle_kk.properties +36 -63
- package/src/sap/fe/core/messagebundle_ko.properties +36 -63
- package/src/sap/fe/core/messagebundle_lt.properties +36 -63
- package/src/sap/fe/core/messagebundle_lv.properties +36 -63
- package/src/sap/fe/core/messagebundle_ms.properties +37 -64
- package/src/sap/fe/core/messagebundle_nl.properties +37 -64
- package/src/sap/fe/core/messagebundle_no.properties +36 -63
- package/src/sap/fe/core/messagebundle_pl.properties +37 -64
- package/src/sap/fe/core/messagebundle_pt.properties +37 -64
- package/src/sap/fe/core/messagebundle_pt_PT.properties +36 -63
- package/src/sap/fe/core/messagebundle_ro.properties +36 -63
- package/src/sap/fe/core/messagebundle_ru.properties +36 -63
- package/src/sap/fe/core/messagebundle_sh.properties +36 -63
- package/src/sap/fe/core/messagebundle_sk.properties +36 -63
- package/src/sap/fe/core/messagebundle_sl.properties +38 -65
- package/src/sap/fe/core/messagebundle_sv.properties +36 -63
- package/src/sap/fe/core/messagebundle_th.properties +36 -63
- package/src/sap/fe/core/messagebundle_tr.properties +36 -63
- package/src/sap/fe/core/messagebundle_uk.properties +37 -64
- package/src/sap/fe/core/messagebundle_vi.properties +37 -64
- package/src/sap/fe/core/messagebundle_zh_CN.properties +36 -63
- package/src/sap/fe/core/messagebundle_zh_TW.properties +37 -64
- 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 +6 -3
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +12 -10
- package/src/sap/fe/core/services/NavigationServiceFactory.js +54 -45
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +61 -49
- 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 +63 -60
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +76 -73
- package/src/sap/fe/core/services/ShellServicesFactory.js +102 -71
- package/src/sap/fe/core/services/ShellServicesFactory.ts +109 -78
- 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 +24 -18
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +53 -50
- 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 +3 -4
- package/src/sap/fe/core/templating/EntitySetHelper.js +7 -15
- package/src/sap/fe/core/templating/EntitySetHelper.ts +14 -18
- 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 +12 -11
- package/src/sap/fe/core/templating/FilterHelper.ts +17 -16
- 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 +79 -56
- package/src/sap/fe/core/templating/PropertyHelper.ts +41 -27
- package/src/sap/fe/core/templating/UIFormatters.js +163 -97
- package/src/sap/fe/core/templating/UIFormatters.ts +210 -129
- package/src/sap/fe/core/type/DateTimeWithTimezone.js +47 -0
- package/src/sap/fe/core/type/DateTimeWithTimezone.ts +23 -0
- 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/AnnotationHelper.js +0 -331
- package/src/sap/fe/core/AnnotationHelper.ts +0 -321
- package/src/sap/fe/core/RouterProxy.js +0 -938
- package/src/sap/fe/core/TransactionHelper.js +0 -1577
- package/src/sap/fe/core/actions/collaboration/ActivitySync.js +0 -406
- package/src/sap/fe/core/actions/collaboration/Manage.js +0 -264
- package/src/sap/fe/core/actions/draft.js +0 -665
- package/src/sap/fe/core/actions/messageHandling.js +0 -579
- package/src/sap/fe/core/actions/nonDraft.js +0 -20
- package/src/sap/fe/core/actions/nonDraft.ts +0 -12
- package/src/sap/fe/core/actions/operations.js +0 -1096
- package/src/sap/fe/core/actions/sticky.js +0 -130
- package/src/sap/fe/core/actions/sticky.ts +0 -119
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +0 -77
- package/src/sap/fe/core/formatters/CriticalityFormatter.ts +0 -58
- package/src/sap/fe/core/helpers/BindingExpression.js +0 -1729
|
@@ -1,44 +1,37 @@
|
|
|
1
1
|
import Log from "sap/base/Log";
|
|
2
|
-
import
|
|
3
|
-
import draft from "sap/fe/core/actions/draft";
|
|
4
|
-
import AppComponent from "sap/fe/core/AppComponent";
|
|
5
|
-
import BusyLocker from "sap/fe/core/BusyLocker";
|
|
2
|
+
import type AppComponent from "sap/fe/core/AppComponent";
|
|
6
3
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
publicExtension
|
|
14
|
-
} from "sap/fe/core/helpers/ClassSupport";
|
|
4
|
+
import BusyLocker from "sap/fe/core/controllerextensions/BusyLocker";
|
|
5
|
+
import ActivitySync from "sap/fe/core/controllerextensions/collaboration/ActivitySync";
|
|
6
|
+
import draft from "sap/fe/core/controllerextensions/editFlow/draft";
|
|
7
|
+
import type RouterProxy from "sap/fe/core/controllerextensions/routing/RouterProxy";
|
|
8
|
+
import type { EnhanceWithUI5 } from "sap/fe/core/helpers/ClassSupport";
|
|
9
|
+
import { defineUI5Class, extensible, finalExtension, methodOverride, publicExtension } from "sap/fe/core/helpers/ClassSupport";
|
|
15
10
|
import EditState from "sap/fe/core/helpers/EditState";
|
|
16
11
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
17
12
|
import SemanticKeyHelper from "sap/fe/core/helpers/SemanticKeyHelper";
|
|
18
13
|
import FELibrary from "sap/fe/core/library";
|
|
19
|
-
import PageController from "sap/fe/core/PageController";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import Event from "sap/ui/base/Event";
|
|
14
|
+
import type PageController from "sap/fe/core/PageController";
|
|
15
|
+
import type { RoutingService } from "sap/fe/core/services/RoutingServiceFactory";
|
|
16
|
+
import type TemplateComponent from "sap/fe/core/TemplateComponent";
|
|
17
|
+
import type Event from "sap/ui/base/Event";
|
|
24
18
|
import Component from "sap/ui/core/Component";
|
|
25
19
|
import Core from "sap/ui/core/Core";
|
|
26
20
|
import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
|
|
27
21
|
import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
|
|
28
|
-
import View from "sap/ui/core/mvc/View";
|
|
29
|
-
import Router from "sap/ui/core/routing/Router";
|
|
22
|
+
import type View from "sap/ui/core/mvc/View";
|
|
23
|
+
import type Router from "sap/ui/core/routing/Router";
|
|
30
24
|
import Filter from "sap/ui/model/Filter";
|
|
31
25
|
import FilterOperator from "sap/ui/model/FilterOperator";
|
|
32
|
-
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
33
|
-
import Context from "sap/ui/model/odata/v4/Context";
|
|
34
|
-
import { CoreEx } from "types/extension_types";
|
|
26
|
+
import type JSONModel from "sap/ui/model/json/JSONModel";
|
|
27
|
+
import type Context from "sap/ui/model/odata/v4/Context";
|
|
28
|
+
import type { CoreEx } from "types/extension_types";
|
|
35
29
|
|
|
36
30
|
/**
|
|
37
31
|
* {@link sap.ui.core.mvc.ControllerExtension Controller extension}
|
|
38
32
|
*
|
|
39
33
|
* @namespace
|
|
40
34
|
* @alias sap.fe.core.controllerextensions.InternalRouting
|
|
41
|
-
*
|
|
42
35
|
* @private
|
|
43
36
|
* @since 1.74.0
|
|
44
37
|
*/
|
|
@@ -56,7 +49,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
56
49
|
|
|
57
50
|
@methodOverride()
|
|
58
51
|
onExit() {
|
|
59
|
-
|
|
52
|
+
if (this._oRoutingService) {
|
|
53
|
+
this._oRoutingService.detachRouteMatched(this._fnRouteMatchedBound);
|
|
54
|
+
}
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
@methodOverride()
|
|
@@ -134,10 +129,10 @@ class InternalRouting extends ControllerExtension {
|
|
|
134
129
|
/**
|
|
135
130
|
* Navigates to the specified navigation target.
|
|
136
131
|
*
|
|
137
|
-
* @param
|
|
138
|
-
* @param
|
|
139
|
-
* @param
|
|
140
|
-
* @param
|
|
132
|
+
* @param oContext Context instance
|
|
133
|
+
* @param sNavigationTargetName Navigation target name
|
|
134
|
+
* @param oSemanticObject Semantic object
|
|
135
|
+
* @param bPreserveHistory True to force the new URL to be added at the end of the browser history (no replace)
|
|
141
136
|
* @ui5-restricted
|
|
142
137
|
*/
|
|
143
138
|
@publicExtension()
|
|
@@ -160,9 +155,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
160
155
|
/**
|
|
161
156
|
* Navigates to the specified navigation target route.
|
|
162
157
|
*
|
|
163
|
-
* @param
|
|
164
|
-
* @param
|
|
165
|
-
* @returns
|
|
158
|
+
* @param sTargetRouteName Name of the target route
|
|
159
|
+
* @param [oParameters] Parameters to be used with route to create the target hash
|
|
160
|
+
* @returns Promise that is resolved when the navigation is finalized
|
|
166
161
|
* @ui5-restricted
|
|
167
162
|
*/
|
|
168
163
|
@publicExtension()
|
|
@@ -173,15 +168,14 @@ class InternalRouting extends ControllerExtension {
|
|
|
173
168
|
/**
|
|
174
169
|
* Navigates to a specific context.
|
|
175
170
|
*
|
|
176
|
-
* @param
|
|
177
|
-
* @param
|
|
178
|
-
* @returns
|
|
179
|
-
*
|
|
171
|
+
* @param oContext The context to be navigated to
|
|
172
|
+
* @param [mParameters] Optional navigation parameters
|
|
173
|
+
* @returns Promise resolved when the navigation has been triggered
|
|
180
174
|
* @ui5-restricted
|
|
181
175
|
*/
|
|
182
176
|
@publicExtension()
|
|
183
177
|
@finalExtension()
|
|
184
|
-
navigateToContext(oContext: any, mParameters?: any): Promise<
|
|
178
|
+
navigateToContext(oContext: any, mParameters?: any): Promise<boolean> {
|
|
185
179
|
const oContextInfo: any = {};
|
|
186
180
|
mParameters = mParameters || {};
|
|
187
181
|
|
|
@@ -193,9 +187,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
193
187
|
this._oRouterProxy.activateRouteMatchSynchronization();
|
|
194
188
|
|
|
195
189
|
mParameters.asyncContext
|
|
196
|
-
.then((
|
|
190
|
+
.then((asyncContext: any) => {
|
|
197
191
|
// once the context is returned we navigate into it
|
|
198
|
-
this.navigateToContext(
|
|
192
|
+
this.navigateToContext(asyncContext, {
|
|
199
193
|
checkNoHashChange: mParameters.checkNoHashChange,
|
|
200
194
|
editable: mParameters.editable,
|
|
201
195
|
bPersistOPScroll: mParameters.bPersistOPScroll,
|
|
@@ -226,7 +220,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
226
220
|
const bOverrideNav = (this.base.getView().getController() as any).routing.onBeforeNavigation(oContextInfo);
|
|
227
221
|
if (bOverrideNav) {
|
|
228
222
|
oInternalModel.setProperty("/paginatorCurrentContext", oContext);
|
|
229
|
-
return Promise.resolve();
|
|
223
|
+
return Promise.resolve(true);
|
|
230
224
|
}
|
|
231
225
|
}
|
|
232
226
|
mParameters.FCLLevel = this._getFCLLevel();
|
|
@@ -237,10 +231,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
237
231
|
/**
|
|
238
232
|
* Navigates backwards from a context.
|
|
239
233
|
*
|
|
240
|
-
* @param
|
|
241
|
-
* @param
|
|
242
|
-
* @returns
|
|
243
|
-
*
|
|
234
|
+
* @param oContext Context to be navigated from
|
|
235
|
+
* @param [mParameters] Optional navigation parameters
|
|
236
|
+
* @returns Promise resolved when the navigation has been triggered
|
|
244
237
|
* @ui5-restricted
|
|
245
238
|
*/
|
|
246
239
|
@publicExtension()
|
|
@@ -255,17 +248,16 @@ class InternalRouting extends ControllerExtension {
|
|
|
255
248
|
/**
|
|
256
249
|
* Navigates forwards to a context.
|
|
257
250
|
*
|
|
258
|
-
* @param
|
|
259
|
-
* @param
|
|
260
|
-
* @returns
|
|
261
|
-
*
|
|
251
|
+
* @param oContext Context to be navigated to
|
|
252
|
+
* @param mParameters Optional navigation parameters
|
|
253
|
+
* @returns Promise resolved when the navigation has been triggered
|
|
262
254
|
* @ui5-restricted
|
|
263
255
|
*/
|
|
264
256
|
@publicExtension()
|
|
265
257
|
@finalExtension()
|
|
266
|
-
navigateForwardToContext(oContext: any, mParameters?: any) {
|
|
258
|
+
navigateForwardToContext(oContext: any, mParameters?: any): Promise<boolean> {
|
|
267
259
|
if (this._oView.getBindingContext("internal")?.getProperty("messageFooterContainsErrors") === true) {
|
|
268
|
-
return Promise.resolve();
|
|
260
|
+
return Promise.resolve(true);
|
|
269
261
|
}
|
|
270
262
|
mParameters = mParameters || {};
|
|
271
263
|
mParameters.updateFCLLevel = 1;
|
|
@@ -303,9 +295,8 @@ class InternalRouting extends ControllerExtension {
|
|
|
303
295
|
/**
|
|
304
296
|
* Checks if one of the current views on the screen is bound to a given context.
|
|
305
297
|
*
|
|
306
|
-
* @param
|
|
307
|
-
* @returns
|
|
308
|
-
*
|
|
298
|
+
* @param oContext
|
|
299
|
+
* @returns `true` if the state is impacted by the context
|
|
309
300
|
* @ui5-restricted
|
|
310
301
|
*/
|
|
311
302
|
@publicExtension()
|
|
@@ -322,8 +313,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
322
313
|
* Called when a route is matched.
|
|
323
314
|
* Builds the binding context from the navigation parameters, and bind the page accordingly.
|
|
324
315
|
*
|
|
325
|
-
* @param
|
|
326
|
-
*
|
|
316
|
+
* @param oEvent
|
|
327
317
|
* @ui5-restricted
|
|
328
318
|
*/
|
|
329
319
|
_onRouteMatched(oEvent: Event) {
|
|
@@ -353,14 +343,14 @@ class InternalRouting extends ControllerExtension {
|
|
|
353
343
|
|
|
354
344
|
for (const sKey in mArguments) {
|
|
355
345
|
const sValue = mArguments[sKey];
|
|
356
|
-
if (sValue === "..." && sTarget.indexOf(
|
|
346
|
+
if (sValue === "..." && sTarget.indexOf(`{${sKey}}`) >= 0) {
|
|
357
347
|
bDeferred = true;
|
|
358
348
|
// Sometimes in preferredMode = create, the edit button is shown in background when the
|
|
359
349
|
// action parameter dialog shows up, setting bTargetEditable passes editable as true
|
|
360
350
|
// to onBeforeBinding in _bindTargetPage function
|
|
361
351
|
oNavigationParameters.bTargetEditable = true;
|
|
362
352
|
}
|
|
363
|
-
sTarget = sTarget.replace(
|
|
353
|
+
sTarget = sTarget.replace(`{${sKey}}`, sValue);
|
|
364
354
|
}
|
|
365
355
|
if (mArguments["?query"] && mArguments["?query"].hasOwnProperty("i-action")) {
|
|
366
356
|
oNavigationParameters.bActionCreate = true;
|
|
@@ -368,7 +358,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
368
358
|
|
|
369
359
|
// the binding target is always absolute
|
|
370
360
|
if (sTarget && sTarget[0] !== "/") {
|
|
371
|
-
sTarget =
|
|
361
|
+
sTarget = `/${sTarget}`;
|
|
372
362
|
}
|
|
373
363
|
|
|
374
364
|
this.onRouteMatched();
|
|
@@ -391,9 +381,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
391
381
|
/**
|
|
392
382
|
* Deferred binding (during object creation).
|
|
393
383
|
*
|
|
394
|
-
* @param
|
|
395
|
-
* @param
|
|
396
|
-
* @returns
|
|
384
|
+
* @param sTargetPath The path to the deffered context
|
|
385
|
+
* @param oNavigationParameters Navigation parameters
|
|
386
|
+
* @returns A Promise
|
|
397
387
|
* @ui5-restricted
|
|
398
388
|
*/
|
|
399
389
|
_bindDeferred(sTargetPath: string, oNavigationParameters: any) {
|
|
@@ -429,10 +419,10 @@ class InternalRouting extends ControllerExtension {
|
|
|
429
419
|
/**
|
|
430
420
|
* Sets the binding context of the page from a path.
|
|
431
421
|
*
|
|
432
|
-
* @param
|
|
433
|
-
* @param
|
|
434
|
-
* @param
|
|
435
|
-
* @returns
|
|
422
|
+
* @param sTargetPath The path to the context
|
|
423
|
+
* @param oModel The OData model
|
|
424
|
+
* @param oNavigationParameters Navigation parameters
|
|
425
|
+
* @returns A Promise resolved once the binding has been set on the page
|
|
436
426
|
* @ui5-restricted
|
|
437
427
|
*/
|
|
438
428
|
_bindPage(sTargetPath: string, oModel: any, oNavigationParameters: object) {
|
|
@@ -458,11 +448,10 @@ class InternalRouting extends ControllerExtension {
|
|
|
458
448
|
/**
|
|
459
449
|
* Creates the filter to retrieve a context corresponding to a semantic path.
|
|
460
450
|
*
|
|
461
|
-
* @param
|
|
462
|
-
* @param
|
|
463
|
-
* @param
|
|
464
|
-
* @returns
|
|
465
|
-
*
|
|
451
|
+
* @param sSemanticPath The semantic path
|
|
452
|
+
* @param aSemanticKeys The semantic keys for the path
|
|
453
|
+
* @param oMetaModel The instance of the meta model
|
|
454
|
+
* @returns The filter
|
|
466
455
|
* @ui5-restricted
|
|
467
456
|
*/
|
|
468
457
|
_createFilterFromSemanticPath(sSemanticPath: string, aSemanticKeys: any[], oMetaModel: object) {
|
|
@@ -536,18 +525,16 @@ class InternalRouting extends ControllerExtension {
|
|
|
536
525
|
});
|
|
537
526
|
aFilters.push(oDraftFilter);
|
|
538
527
|
|
|
539
|
-
|
|
540
|
-
return oCombinedFilter;
|
|
528
|
+
return new Filter(aFilters, true);
|
|
541
529
|
}
|
|
542
530
|
|
|
543
531
|
/**
|
|
544
532
|
* Converts a path with semantic keys to a path with technical keys.
|
|
545
533
|
*
|
|
546
|
-
* @param
|
|
547
|
-
* @param
|
|
548
|
-
* @param
|
|
549
|
-
* @returns
|
|
550
|
-
*
|
|
534
|
+
* @param sSemanticPath The path with semantic keys
|
|
535
|
+
* @param oModel The model for the path
|
|
536
|
+
* @param aSemanticKeys The semantic keys for the path
|
|
537
|
+
* @returns A Promise containing the path with technical keys if sSemanticPath could be interpreted as a semantic path, null otherwise
|
|
551
538
|
* @ui5-restricted
|
|
552
539
|
*/
|
|
553
540
|
_getTechnicalPathFromSemanticPath(sSemanticPath: string, oModel: any, aSemanticKeys: any[]) {
|
|
@@ -568,7 +555,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
568
555
|
|
|
569
556
|
// Load the corresponding object
|
|
570
557
|
if (!sEntitySetPath?.startsWith("/")) {
|
|
571
|
-
sEntitySetPath =
|
|
558
|
+
sEntitySetPath = `/${sEntitySetPath}`;
|
|
572
559
|
}
|
|
573
560
|
const oListBinding = oModel.bindList(sEntitySetPath, undefined, undefined, oFilter, {
|
|
574
561
|
"$$groupId": "$auto.Heroes"
|
|
@@ -587,10 +574,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
587
574
|
/**
|
|
588
575
|
* Checks if a path is eligible for semantic bookmarking.
|
|
589
576
|
*
|
|
590
|
-
* @param
|
|
591
|
-
* @param
|
|
592
|
-
* @returns
|
|
593
|
-
*
|
|
577
|
+
* @param sPath The path to test
|
|
578
|
+
* @param oMetaModel The associated metadata model
|
|
579
|
+
* @returns `true` if the path is eligible
|
|
594
580
|
* @ui5-restricted
|
|
595
581
|
*/
|
|
596
582
|
_checkPathForSemanticBookmarking(sPath: string, oMetaModel: any) {
|
|
@@ -600,18 +586,19 @@ class InternalRouting extends ControllerExtension {
|
|
|
600
586
|
return false;
|
|
601
587
|
}
|
|
602
588
|
// Get the entitySet name
|
|
603
|
-
const sEntitySetPath =
|
|
589
|
+
const sEntitySetPath = `/${aMatches[1]}`;
|
|
604
590
|
// Check the entity set supports draft (otherwise we don't support semantic bookmarking)
|
|
605
|
-
const oDraftRoot = oMetaModel.getObject(sEntitySetPath
|
|
606
|
-
const oDraftNode = oMetaModel.getObject(sEntitySetPath
|
|
591
|
+
const oDraftRoot = oMetaModel.getObject(`${sEntitySetPath}@com.sap.vocabularies.Common.v1.DraftRoot`);
|
|
592
|
+
const oDraftNode = oMetaModel.getObject(`${sEntitySetPath}@com.sap.vocabularies.Common.v1.DraftNode`);
|
|
607
593
|
return oDraftRoot || oDraftNode ? true : false;
|
|
608
594
|
}
|
|
609
595
|
|
|
610
596
|
/**
|
|
611
597
|
* Builds a path with semantic keys from a path with technical keys.
|
|
612
|
-
*
|
|
613
|
-
* @param
|
|
614
|
-
* @
|
|
598
|
+
*
|
|
599
|
+
* @param sPathToResolve The path to be transformed
|
|
600
|
+
* @param oModel The OData model
|
|
601
|
+
* @returns String promise for the new path. If sPathToResolved couldn't be interpreted as a semantic path, it is returned as is.
|
|
615
602
|
* @ui5-restricted
|
|
616
603
|
*/
|
|
617
604
|
_resolveSemanticPath(sPathToResolve: string, oModel: any): Promise<string> {
|
|
@@ -656,10 +643,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
656
643
|
/**
|
|
657
644
|
* Sets the binding context of the page from a path.
|
|
658
645
|
*
|
|
659
|
-
* @param
|
|
660
|
-
* @param
|
|
661
|
-
* @param
|
|
662
|
-
*
|
|
646
|
+
* @param sTargetPath The path to build the context. Needs to contain technical keys only.
|
|
647
|
+
* @param oModel The OData model
|
|
648
|
+
* @param oNavigationParameters Navigation parameters
|
|
663
649
|
* @ui5-restricted
|
|
664
650
|
*/
|
|
665
651
|
_bindPageToPath(sTargetPath: string, oModel: any, oNavigationParameters: any) {
|
|
@@ -676,7 +662,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
676
662
|
oTargetContext = oUseContext;
|
|
677
663
|
} else {
|
|
678
664
|
// Otherwise we need to create it from sTargetPath
|
|
679
|
-
oTargetContext = this.
|
|
665
|
+
oTargetContext = this._createContext(sTargetPath, oModel, oNavigationParameters.bNavigateToSiblingEntity);
|
|
680
666
|
}
|
|
681
667
|
if (oTargetContext !== oCurrentContext) {
|
|
682
668
|
this._bindPageToContext(oTargetContext, oModel, oNavigationParameters);
|
|
@@ -689,10 +675,9 @@ class InternalRouting extends ControllerExtension {
|
|
|
689
675
|
/**
|
|
690
676
|
* Binds the page to a context.
|
|
691
677
|
*
|
|
692
|
-
* @param
|
|
693
|
-
* @param
|
|
694
|
-
* @param
|
|
695
|
-
*
|
|
678
|
+
* @param oContext Context to be bound
|
|
679
|
+
* @param oModel The OData model
|
|
680
|
+
* @param oNavigationParameters Navigation parameters
|
|
696
681
|
* @ui5-restricted
|
|
697
682
|
*/
|
|
698
683
|
_bindPageToContext(oContext: any, oModel: any, oNavigationParameters: any) {
|
|
@@ -701,18 +686,29 @@ class InternalRouting extends ControllerExtension {
|
|
|
701
686
|
this.onAfterBinding(null);
|
|
702
687
|
} else {
|
|
703
688
|
const oParentListBinding = oContext.getBinding();
|
|
704
|
-
|
|
705
|
-
if (
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
//
|
|
712
|
-
|
|
713
|
-
this._refreshBindingContext(oContext);
|
|
714
|
-
}, 0);
|
|
689
|
+
const oRootViewController = (this._oAppComponent as any).getRootViewController();
|
|
690
|
+
if (oRootViewController.isFclEnabled()) {
|
|
691
|
+
if (
|
|
692
|
+
!oParentListBinding ||
|
|
693
|
+
!oParentListBinding.isA("sap.ui.model.odata.v4.ODataListBinding") ||
|
|
694
|
+
oParentListBinding.getUpdateGroupId() === "submitLater"
|
|
695
|
+
) {
|
|
696
|
+
// if the parentBinding is not a listBinding or the transient one from the create, we create a new context
|
|
697
|
+
oContext = this._createContext(oContext.getPath(), oModel);
|
|
715
698
|
}
|
|
699
|
+
oContext.setKeepAlive(
|
|
700
|
+
true,
|
|
701
|
+
() => {
|
|
702
|
+
// it is possible that the context is no longer kept alive
|
|
703
|
+
if (oContext.isKeepAlive() && oRootViewController.isContextUsedInPages(oContext)) {
|
|
704
|
+
this.navigateBackFromContext(oContext);
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
true
|
|
708
|
+
);
|
|
709
|
+
} else if (!oParentListBinding || oParentListBinding.isA("sap.ui.model.odata.v4.ODataListBinding")) {
|
|
710
|
+
// We need to recreate the context otherwise we get errors
|
|
711
|
+
oContext = this._createContext(oContext.getPath(), oModel, oNavigationParameters.bNavigateToSiblingEntity);
|
|
716
712
|
}
|
|
717
713
|
|
|
718
714
|
// Set the binding context with the proper before/after callbacks
|
|
@@ -730,52 +726,69 @@ class InternalRouting extends ControllerExtension {
|
|
|
730
726
|
}
|
|
731
727
|
|
|
732
728
|
/**
|
|
733
|
-
* Creates a
|
|
734
|
-
*
|
|
735
|
-
* @param {string} sPath The path
|
|
736
|
-
* @param {sap.ui.model.odata.v4.ODataModel} oModel The OData model
|
|
737
|
-
* @returns {sap.ui.model.odata.v4.Context} Created context
|
|
729
|
+
* Creates a context from a path.
|
|
738
730
|
*
|
|
731
|
+
* @param sPath The path
|
|
732
|
+
* @param oModel The OData model
|
|
733
|
+
* @param navigateToSiblingEntity A parameter that determines whether to navigate to the context on data received
|
|
734
|
+
* @returns The created context
|
|
739
735
|
* @ui5-restricted
|
|
740
736
|
*/
|
|
741
737
|
@publicExtension()
|
|
742
|
-
|
|
738
|
+
_createContext(sPath: string, oModel: any, navigateToSiblingEntity: boolean = true) {
|
|
743
739
|
const oPageComponent = this._oPageComponent,
|
|
744
740
|
sEntitySet = oPageComponent && oPageComponent.getEntitySet && oPageComponent.getEntitySet(),
|
|
745
741
|
sContextPath =
|
|
746
|
-
(oPageComponent && oPageComponent.getContextPath && oPageComponent.getContextPath()) || (sEntitySet &&
|
|
742
|
+
(oPageComponent && oPageComponent.getContextPath && oPageComponent.getContextPath()) || (sEntitySet && `/${sEntitySet}`),
|
|
747
743
|
oMetaModel = oModel.getMetaModel(),
|
|
748
744
|
mParameters: any = {
|
|
749
|
-
$$patchWithoutSideEffects: true,
|
|
750
745
|
$$groupId: "$auto.Heroes",
|
|
751
|
-
$$updateGroupId: "$auto"
|
|
746
|
+
$$updateGroupId: "$auto",
|
|
747
|
+
$$patchWithoutSideEffects: true
|
|
752
748
|
};
|
|
749
|
+
// In case of draft: $select the state flags (HasActiveEntity, HasDraftEntity, and IsActiveEntity)
|
|
750
|
+
const oDraftRoot = oMetaModel.getObject(`${sContextPath}@com.sap.vocabularies.Common.v1.DraftRoot`);
|
|
751
|
+
const oDraftNode = oMetaModel.getObject(`${sContextPath}@com.sap.vocabularies.Common.v1.DraftNode`);
|
|
752
|
+
const oRootViewController = (this._oAppComponent as any).getRootViewController();
|
|
753
|
+
if (oRootViewController.isFclEnabled()) {
|
|
754
|
+
const oContext = oModel.getKeepAliveContext(sPath, false, mParameters);
|
|
755
|
+
if (oDraftRoot || oDraftNode) {
|
|
756
|
+
if (!oContext.getBinding().oCache) {
|
|
757
|
+
oContext.requestProperty(["HasActiveEntity", "HasDraftEntity", "IsActiveEntity"]);
|
|
758
|
+
oContext.requestObject("DraftAdministrativeData");
|
|
759
|
+
} else {
|
|
760
|
+
// when switching between draft and edit we need to ensure those properties are requested again even if they are in the binding's cache
|
|
761
|
+
// otherwise when you edit and go to the saved version you have no way of switching back to the edit version
|
|
762
|
+
oContext.requestSideEffects(["HasActiveEntity", "HasDraftEntity", "IsActiveEntity", "DraftAdministrativeData"]);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
753
765
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
if (
|
|
757
|
-
|
|
766
|
+
return oContext;
|
|
767
|
+
} else {
|
|
768
|
+
if (sEntitySet) {
|
|
769
|
+
const sMessagesPath = oMetaModel.getObject(`${sContextPath}/@com.sap.vocabularies.Common.v1.Messages/$Path`);
|
|
770
|
+
if (sMessagesPath) {
|
|
771
|
+
mParameters.$select = sMessagesPath;
|
|
772
|
+
}
|
|
758
773
|
}
|
|
759
|
-
}
|
|
760
774
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
mParameters.$select += ",HasActiveEntity,HasDraftEntity,IsActiveEntity";
|
|
775
|
+
// In case of draft: $select the state flags (HasActiveEntity, HasDraftEntity, and IsActiveEntity)
|
|
776
|
+
if (oDraftRoot || oDraftNode) {
|
|
777
|
+
if (mParameters.$select === undefined) {
|
|
778
|
+
mParameters.$select = "HasActiveEntity,HasDraftEntity,IsActiveEntity";
|
|
779
|
+
} else {
|
|
780
|
+
mParameters.$select += ",HasActiveEntity,HasDraftEntity,IsActiveEntity";
|
|
781
|
+
}
|
|
769
782
|
}
|
|
770
|
-
}
|
|
771
783
|
|
|
772
|
-
|
|
784
|
+
const oHiddenBinding = oModel.bindContext(sPath, undefined, mParameters);
|
|
773
785
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
786
|
+
oHiddenBinding.attachEventOnce("dataRequested", () => {
|
|
787
|
+
BusyLocker.lock(this._oView);
|
|
788
|
+
});
|
|
789
|
+
oHiddenBinding.attachEventOnce("dataReceived", this._dataReceivedEventHandler.bind(this, navigateToSiblingEntity));
|
|
790
|
+
return oHiddenBinding.getBoundContext();
|
|
791
|
+
}
|
|
779
792
|
}
|
|
780
793
|
|
|
781
794
|
async _dataReceivedEventHandler(navigateToSiblingEntity: boolean, oEvent: Event) {
|
|
@@ -811,7 +824,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
811
824
|
};
|
|
812
825
|
} else {
|
|
813
826
|
mParams = {
|
|
814
|
-
title: oResourceBundle.getText("
|
|
827
|
+
title: oResourceBundle.getText("C_COMMON_SAPFE_ERROR"),
|
|
815
828
|
description: sErrorDescription,
|
|
816
829
|
isDataReceivedError: true,
|
|
817
830
|
shellBack: true
|
|
@@ -832,8 +845,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
832
845
|
* therefore we get all dependent bindings (via private model method) to determine all paths and then
|
|
833
846
|
* request them.
|
|
834
847
|
*
|
|
835
|
-
* @param
|
|
836
|
-
*
|
|
848
|
+
* @param oBindingContext Context to be refreshed
|
|
837
849
|
* @ui5-restricted
|
|
838
850
|
*/
|
|
839
851
|
_refreshBindingContext(oBindingContext: any) {
|
|
@@ -842,7 +854,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
842
854
|
const sRootContextPath = oBindingContext.getPath();
|
|
843
855
|
const sEntitySet = oPageComponent && oPageComponent.getEntitySet && oPageComponent.getEntitySet();
|
|
844
856
|
const sContextPath =
|
|
845
|
-
(oPageComponent && oPageComponent.getContextPath && oPageComponent.getContextPath()) || (sEntitySet &&
|
|
857
|
+
(oPageComponent && oPageComponent.getContextPath && oPageComponent.getContextPath()) || (sEntitySet && `/${sEntitySet}`);
|
|
846
858
|
const oMetaModel = this._oView.getModel().getMetaModel();
|
|
847
859
|
let sMessagesPath;
|
|
848
860
|
const aNavigationPropertyPaths: any[] = [];
|
|
@@ -855,7 +867,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
855
867
|
function getBindingPaths(oBinding: any) {
|
|
856
868
|
let aDependentBindings;
|
|
857
869
|
const sRelativePath = ((oBinding.getContext() && oBinding.getContext().getPath()) || "").replace(sRootContextPath, ""); // If no context, this is an absolute binding so no relative path
|
|
858
|
-
const sPath = (sRelativePath ? sRelativePath.slice(1)
|
|
870
|
+
const sPath = (sRelativePath ? `${sRelativePath.slice(1)}/` : sRelativePath) + oBinding.getPath();
|
|
859
871
|
|
|
860
872
|
if (oBinding.isA("sap.ui.model.odata.v4.ODataContextBinding")) {
|
|
861
873
|
// if (sPath === "") {
|
|
@@ -882,7 +894,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
882
894
|
}
|
|
883
895
|
|
|
884
896
|
if (sContextPath) {
|
|
885
|
-
sMessagesPath = oMetaModel.getObject(sContextPath
|
|
897
|
+
sMessagesPath = oMetaModel.getObject(`${sContextPath}/@com.sap.vocabularies.Common.v1.Messages/$Path`);
|
|
886
898
|
}
|
|
887
899
|
|
|
888
900
|
// binding of the context must have $$PatchWithoutSideEffects true, this bound context may be needed to be fetched from the dependent binding
|
|
@@ -906,8 +918,7 @@ class InternalRouting extends ControllerExtension {
|
|
|
906
918
|
/**
|
|
907
919
|
* Gets the binding context of the page or the component.
|
|
908
920
|
*
|
|
909
|
-
* @returns
|
|
910
|
-
*
|
|
921
|
+
* @returns The binding context
|
|
911
922
|
* @ui5-restricted
|
|
912
923
|
*/
|
|
913
924
|
_getBindingContext(): Context {
|
|
@@ -921,23 +932,30 @@ class InternalRouting extends ControllerExtension {
|
|
|
921
932
|
/**
|
|
922
933
|
* Sets the binding context of the page or the component.
|
|
923
934
|
*
|
|
924
|
-
* @param
|
|
925
|
-
*
|
|
935
|
+
* @param oContext The binding context
|
|
926
936
|
* @ui5-restricted
|
|
927
937
|
*/
|
|
928
938
|
_setBindingContext(oContext: any) {
|
|
939
|
+
let oPreviousContext, oTargetControl;
|
|
929
940
|
if (this._oPageComponent) {
|
|
930
|
-
this._oPageComponent.
|
|
941
|
+
oPreviousContext = this._oPageComponent.getBindingContext() as Context;
|
|
942
|
+
oTargetControl = this._oPageComponent;
|
|
931
943
|
} else {
|
|
932
|
-
this._oView.
|
|
944
|
+
oPreviousContext = this._oView.getBindingContext() as Context;
|
|
945
|
+
oTargetControl = this._oView;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
oTargetControl.setBindingContext(oContext);
|
|
949
|
+
|
|
950
|
+
if (oPreviousContext && oPreviousContext.isKeepAlive()) {
|
|
951
|
+
oPreviousContext.setKeepAlive(false);
|
|
933
952
|
}
|
|
934
953
|
}
|
|
935
954
|
|
|
936
955
|
/**
|
|
937
956
|
* Gets the flexible column layout (FCL) level corresponding to the view (-1 if the app is not FCL).
|
|
938
957
|
*
|
|
939
|
-
* @returns
|
|
940
|
-
*
|
|
958
|
+
* @returns The level
|
|
941
959
|
* @ui5-restricted
|
|
942
960
|
*/
|
|
943
961
|
_getFCLLevel() {
|
|
@@ -983,14 +1001,15 @@ class InternalRouting extends ControllerExtension {
|
|
|
983
1001
|
const oMetaModel = oContext.getModel().getMetaModel();
|
|
984
1002
|
|
|
985
1003
|
if (oViewData && oViewData.viewLevel === 1 && ModelHelper.isDraftSupported(oMetaModel, oContext.getPath())) {
|
|
986
|
-
|
|
1004
|
+
draft.processDataLossOrDraftDiscardConfirmation(
|
|
987
1005
|
function () {
|
|
988
1006
|
base._routing.navigateBackFromContext(oContext, { noPreservationCache: true });
|
|
989
1007
|
},
|
|
990
1008
|
Function.prototype,
|
|
991
1009
|
oContext,
|
|
992
1010
|
oSource.getController(),
|
|
993
|
-
false
|
|
1011
|
+
false,
|
|
1012
|
+
draft.NavigationType.BackNavigation
|
|
994
1013
|
);
|
|
995
1014
|
} else {
|
|
996
1015
|
base._routing.navigateBackFromContext(oContext, { noPreservationCache: true });
|