@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,8 +1,8 @@
|
|
|
1
1
|
import { NavigationHandler } from "sap/fe/navigation";
|
|
2
|
-
import SelectionVariant from "sap/fe/navigation/SelectionVariant";
|
|
2
|
+
import type SelectionVariant from "sap/fe/navigation/SelectionVariant";
|
|
3
3
|
import Service from "sap/ui/core/service/Service";
|
|
4
4
|
import ServiceFactory from "sap/ui/core/service/ServiceFactory";
|
|
5
|
-
import { ServiceContext } from "types/extension_types";
|
|
5
|
+
import type { ServiceContext } from "types/extension_types";
|
|
6
6
|
|
|
7
7
|
type NavigationServiceSettings = {};
|
|
8
8
|
export class NavigationService extends Service<NavigationServiceSettings> {
|
|
@@ -22,20 +22,21 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Triggers a cross-app navigation after saving the inner and the cross-app states.
|
|
25
|
+
*
|
|
25
26
|
* @private
|
|
26
27
|
* @ui5-restricted
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
28
|
+
* @param sSemanticObject Semantic object of the target app
|
|
29
|
+
* @param sActionName Action of the target app
|
|
30
|
+
* @param [vNavigationParameters] Navigation parameters as an object with key/value pairs or as a string representation of
|
|
30
31
|
* such an object. If passed as an object, the properties are not checked against the <code>IsPotentialSensitive</code> or
|
|
31
32
|
* <code>Measure</code> type.
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
33
|
+
* @param [oInnerAppData] Object for storing current state of the app
|
|
34
|
+
* @param [fnOnError] Callback that is called if an error occurs during navigation <br>
|
|
35
|
+
* @param [oExternalAppData] Object for storing the state which will be forwarded to the target component.
|
|
36
|
+
* @param [sNavMode] Argument is used to overwrite the FLP-configured target for opening a URL. If used, only the
|
|
36
37
|
* <code>explace</code> or <code>inplace</code> values are allowed. Any other value will lead to an exception
|
|
37
38
|
* <code>NavigationHandler.INVALID_NAV_MODE</code>.
|
|
38
|
-
|
|
39
|
+
*/
|
|
39
40
|
navigate(
|
|
40
41
|
sSemanticObject: string,
|
|
41
42
|
sActionName: string,
|
|
@@ -60,23 +61,24 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
62
63
|
* Parses the incoming URL and returns a Promise.
|
|
63
|
-
*
|
|
64
|
+
*
|
|
65
|
+
* @returns A Promise object which returns the
|
|
64
66
|
* extracted app state, the startup parameters, and the type of navigation when execution is successful,
|
|
65
67
|
* @private
|
|
66
68
|
* @ui5-restricted
|
|
67
|
-
|
|
69
|
+
*/
|
|
68
70
|
parseNavigation() {
|
|
69
71
|
return this.oNavHandler.parseNavigation();
|
|
70
72
|
}
|
|
71
73
|
/**
|
|
72
74
|
* Processes navigation-related tasks related to beforePopoverOpens event handling for the SmartLink control and returns a Promise object.
|
|
73
75
|
*
|
|
74
|
-
* @param
|
|
76
|
+
* @param oTableEventParameters The parameters made available by the SmartTable control when the SmartLink control has been clicked,
|
|
75
77
|
* an instance of a PopOver object
|
|
76
|
-
* @param
|
|
77
|
-
* @param
|
|
78
|
+
* @param sSelectionVariant Stringified JSON object as returned, for example, from getDataSuiteFormat() of the SmartFilterBar control
|
|
79
|
+
* @param [mInnerAppData] Object containing the current state of the app. If provided, opening the Popover is deferred until the
|
|
78
80
|
* inner app data is saved in a consistent way.
|
|
79
|
-
* @returns
|
|
81
|
+
* @returns A Promise object to monitor when all actions of the function have been executed; if the execution is successful, the
|
|
80
82
|
* modified oTableEventParameters is returned; if an error occurs, an error object of type
|
|
81
83
|
* {@link sap.fe.navigation.NavError} is returned
|
|
82
84
|
* @private
|
|
@@ -87,8 +89,9 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
87
89
|
|
|
88
90
|
/**
|
|
89
91
|
* Processes selectionVariant string and returns a Promise object (semanticAttributes and AppStateKey).
|
|
90
|
-
*
|
|
91
|
-
* @
|
|
92
|
+
*
|
|
93
|
+
* @param sSelectionVariant Stringified JSON object
|
|
94
|
+
* @returns A Promise object to monitor when all actions of the function have been executed; if the execution is successful, the
|
|
92
95
|
* semanticAttributes as well as the appStateKey are returned; if an error occurs, an error object of type
|
|
93
96
|
* {@link sap.fe.navigation.NavError} is returned
|
|
94
97
|
* <br>
|
|
@@ -120,7 +123,8 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
120
123
|
|
|
121
124
|
/**
|
|
122
125
|
* Gets the application specific technical parameters.
|
|
123
|
-
*
|
|
126
|
+
*
|
|
127
|
+
* @returns Containing the technical parameters.
|
|
124
128
|
* @private
|
|
125
129
|
* @ui5-restricted
|
|
126
130
|
*/
|
|
@@ -131,7 +135,8 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
131
135
|
* Sets the application specific technical parameters. Technical parameters will not be added to the selection variant passed to the
|
|
132
136
|
* application.
|
|
133
137
|
* As a default sap-system, sap-ushell-defaultedParameterNames and hcpApplicationId are considered as technical parameters.
|
|
134
|
-
*
|
|
138
|
+
*
|
|
139
|
+
* @param aTechnicalParameters List of parameter names to be considered as technical parameters. <code>null</code> or
|
|
135
140
|
* <code>undefined</code> may be used to reset the complete list.
|
|
136
141
|
* @private
|
|
137
142
|
* @ui5-restricted
|
|
@@ -142,44 +147,47 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
142
147
|
/**
|
|
143
148
|
* Sets the model that is used for verification of sensitive information. If the model is not set, the unnamed component model is used for the
|
|
144
149
|
* verification of sensitive information.
|
|
150
|
+
*
|
|
145
151
|
* @private
|
|
146
152
|
* @ui5-restricted
|
|
147
|
-
* @param
|
|
153
|
+
* @param oModel Model For checking sensitive information
|
|
148
154
|
*/
|
|
149
155
|
setModel(oModel: any) {
|
|
150
156
|
this.oNavHandler.setModel(oModel);
|
|
151
157
|
}
|
|
152
158
|
/**
|
|
153
159
|
* Changes the URL according to the current app state and stores the app state for later retrieval.
|
|
160
|
+
*
|
|
154
161
|
* @private
|
|
155
162
|
* @ui5-restricted
|
|
156
|
-
* @param
|
|
157
|
-
* @returns
|
|
163
|
+
* @param mInnerAppData Object containing the current state of the app
|
|
164
|
+
* @returns A Promise object to monitor when all the actions of the function have been executed; if the execution is successful, the
|
|
158
165
|
* app state key is returned; if an error occurs, an object of type {@link sap.fe.navigation.NavError} is
|
|
159
166
|
* returned
|
|
160
|
-
|
|
167
|
+
*/
|
|
161
168
|
storeInnerAppState(mInnerAppData: object) {
|
|
162
169
|
return this.oNavHandler.storeInnerAppState(mInnerAppData);
|
|
163
170
|
}
|
|
164
171
|
/**
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
* Changes the URL according to the current app state and stores the app state for later retrieval.
|
|
173
|
+
*
|
|
174
|
+
* @private
|
|
175
|
+
* @ui5-restricted
|
|
176
|
+
* @param mInnerAppData Object containing the current state of the app
|
|
177
|
+
* @param [bImmediateHashReplace=false] If set to false, the inner app hash will not be replaced until storing is successful; do not
|
|
178
|
+
* @param bNotLegacy
|
|
179
|
+
* @returns An object containing the appStateId and a promise object to monitor when all the actions of the function have been
|
|
180
|
+
* executed; Please note that the appStateKey may be undefined or empty.
|
|
181
|
+
*/
|
|
175
182
|
storeInnerAppStateWithImmediateReturn(mInnerAppData: object, bImmediateHashReplace: boolean | undefined, bNotLegacy: any) {
|
|
176
183
|
return this.oNavHandler.storeInnerAppStateWithImmediateReturn(mInnerAppData, bImmediateHashReplace, bNotLegacy);
|
|
177
184
|
}
|
|
178
185
|
/**
|
|
179
186
|
* Changes the URL according to the current sAppStateKey. As an reaction route change event will be triggered.
|
|
187
|
+
*
|
|
180
188
|
* @private
|
|
181
189
|
* @ui5-restricted
|
|
182
|
-
* @param
|
|
190
|
+
* @param sAppStateKey The new app state key.
|
|
183
191
|
*/
|
|
184
192
|
replaceHash(sAppStateKey: string) {
|
|
185
193
|
this.oNavHandler.replaceHash(sAppStateKey);
|
|
@@ -192,9 +200,9 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
192
200
|
*
|
|
193
201
|
* @private
|
|
194
202
|
* @ui5-restricted
|
|
195
|
-
* @param
|
|
196
|
-
* @param
|
|
197
|
-
* @returns
|
|
203
|
+
* @param [vSelectionVariant]
|
|
204
|
+
* @param [vSelectionVariant.oUrlParamaters]
|
|
205
|
+
* @returns The url parameters
|
|
198
206
|
*/
|
|
199
207
|
getUrlParametersFromSelectionVariant(vSelectionVariant: string | object | undefined) {
|
|
200
208
|
return this.oNavHandler._getURLParametersFromSelectionVariant(vSelectionVariant);
|
|
@@ -205,8 +213,8 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
205
213
|
*
|
|
206
214
|
* @private
|
|
207
215
|
* @ui5-restricted
|
|
208
|
-
* @param
|
|
209
|
-
* @returns
|
|
216
|
+
* @param oInSelectionVariant Instance of sap.fe.navigation.SelectionVariant
|
|
217
|
+
* @returns AppState key
|
|
210
218
|
*/
|
|
211
219
|
saveAppStateWithImmediateReturn(oInSelectionVariant: SelectionVariant) {
|
|
212
220
|
if (oInSelectionVariant) {
|
|
@@ -223,14 +231,14 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
223
231
|
/**
|
|
224
232
|
* Mix Attributes and selectionVariant.
|
|
225
233
|
*
|
|
226
|
-
* @param
|
|
227
|
-
* @param
|
|
228
|
-
* @param
|
|
234
|
+
* @param vSemanticAttributes Object/(Array of Objects) containing key/value pairs
|
|
235
|
+
* @param sSelectionVariant The selection variant in string format as provided by the SmartFilterBar control
|
|
236
|
+
* @param [iSuppressionBehavior=sap.fe.navigation.SuppressionBehavior.standard] Indicates whether semantic
|
|
229
237
|
* attributes with special values (see {@link sap.fe.navigation.SuppressionBehavior suppression behavior}) must be
|
|
230
238
|
* suppressed before they are combined with the selection variant; several
|
|
231
239
|
* {@link sap.fe.navigation.SuppressionBehavior suppression behaviors} can be combined with the bitwise OR operator
|
|
232
240
|
* (|)
|
|
233
|
-
* @returns
|
|
241
|
+
* @returns Instance of {@link sap.fe.navigation.SelectionVariant}
|
|
234
242
|
*/
|
|
235
243
|
mixAttributesAndSelectionVariant(
|
|
236
244
|
vSemanticAttributes: object | any[],
|
|
@@ -243,9 +251,9 @@ export class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
243
251
|
/**
|
|
244
252
|
* The method creates a context url based on provided data. This context url can either be used as.
|
|
245
253
|
*
|
|
246
|
-
* @param
|
|
254
|
+
* @param sEntitySetName Used for url determination
|
|
247
255
|
* @param [oModel] The ODataModel used for url determination. If omitted, the NavigationHandler model is used.
|
|
248
|
-
* @returns
|
|
256
|
+
* @returns The context url for the given entities
|
|
249
257
|
*/
|
|
250
258
|
constructContextUrl(sEntitySetName: string, oModel: any) {
|
|
251
259
|
return this.oNavHandler.constructContextUrl(sEntitySetName, oModel);
|
|
@@ -93,7 +93,7 @@ sap.ui.define(["sap/ui/core/service/Service", "sap/ui/core/service/ServiceFactor
|
|
|
93
93
|
var _proto2 = ResourceModelServiceFactory.prototype;
|
|
94
94
|
|
|
95
95
|
_proto2.createInstance = function createInstance(oServiceContext) {
|
|
96
|
-
var sKey = oServiceContext.settings.bundles.join(",") + (oServiceContext.settings.enhanceI18n ? ","
|
|
96
|
+
var sKey = oServiceContext.settings.bundles.join(",") + (oServiceContext.settings.enhanceI18n ? ",".concat(oServiceContext.settings.enhanceI18n.join(",")) : "");
|
|
97
97
|
|
|
98
98
|
if (!this._oInstances[sKey]) {
|
|
99
99
|
this._oInstances[sKey] = new ResourceModelService(Object.assign({
|
|
@@ -113,4 +113,4 @@ sap.ui.define(["sap/ui/core/service/Service", "sap/ui/core/service/ServiceFactor
|
|
|
113
113
|
|
|
114
114
|
return ResourceModelServiceFactory;
|
|
115
115
|
}, false);
|
|
116
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
116
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlc291cmNlTW9kZWxTZXJ2aWNlRmFjdG9yeS50cyJdLCJuYW1lcyI6WyJSZXNvdXJjZU1vZGVsU2VydmljZSIsImluaXQiLCJvQ29udGV4dCIsImdldENvbnRleHQiLCJtU2V0dGluZ3MiLCJzZXR0aW5ncyIsIm9GYWN0b3J5IiwiZmFjdG9yeSIsImFCdW5kbGVzIiwiYnVuZGxlcyIsImNvbmNhdCIsImVuaGFuY2VJMThuIiwibWFwIiwidkkxOG4iLCJpc0EiLCJnZXRSZXNvdXJjZUJ1bmRsZSIsImJ1bmRsZU5hbWUiLCJyZXBsYWNlIiwib1Jlc291cmNlTW9kZWwiLCJSZXNvdXJjZU1vZGVsIiwiZW5oYW5jZVdpdGgiLCJzbGljZSIsImFzeW5jIiwic2NvcGVUeXBlIiwib0NvbXBvbmVudCIsInNjb3BlT2JqZWN0Iiwic2V0TW9kZWwiLCJtb2RlbE5hbWUiLCJpbml0UHJvbWlzZSIsIlByb21pc2UiLCJhbGwiLCJfcEVuaGFuY2VkIiwicmVzb2x2ZSIsInRoZW4iLCJvQnVuZGxlIiwiX19idW5kbGUiLCJnZXRSZXNvdXJjZU1vZGVsIiwiZ2V0SW50ZXJmYWNlIiwiZXhpdCIsInJlbW92ZUdsb2JhbEluc3RhbmNlIiwiU2VydmljZSIsIlJlc291cmNlTW9kZWxTZXJ2aWNlRmFjdG9yeSIsIl9vSW5zdGFuY2VzIiwiY3JlYXRlSW5zdGFuY2UiLCJvU2VydmljZUNvbnRleHQiLCJzS2V5Iiwiam9pbiIsIk9iamVj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1vZGVsU2VydmljZVNldHRpbmdzPiB7XG5cdF9vSW5zdGFuY2VzOiBSZWNvcmQ8c3RyaW5nLCBSZXNvdXJjZU1vZGVsU2VydmljZT4gPSB7fTtcblx0Y3JlYXRlSW5zdGFuY2Uob1NlcnZpY2VDb250ZXh0OiBTZXJ2aWNlQ29udGV4dDxSZXNvdXJjZU1vZGVsU2VydmljZVNldHRpbmdzPikge1xuXHRcdGNvbnN0IHNLZXkgPVxuXHRcdFx0b1NlcnZpY2VDb250ZXh0LnNldHRpbmdzLmJ1bmRsZXMuam9pbihcIixcIikgK1xuXHRcdFx0KG9TZXJ2aWNlQ29udGV4dC5zZXR0aW5ncy5lbmhhbmNlSTE4biA/IGAsJHtvU2VydmljZUNvbnRleHQuc2V0dGluZ3MuZW5oYW5jZUkxOG4uam9pbihcIixcIil9YCA6IFwiXCIpO1xuXG5cdFx0aWYgKCF0aGlzLl9vSW5zdGFuY2VzW3NLZXldKSB7XG5cdFx0XHR0aGlzLl9vSW5zdGFuY2VzW3NLZXldID0gbmV3IFJlc291cmNlTW9kZWxTZXJ2aWNlKE9iamVjdC5hc3NpZ24oeyBmYWN0b3J5OiB0aGlzIH0sIG9TZXJ2aWNlQ29udGV4dCkpO1xuXHRcdH1cblxuXHRcdHJldHVybiB0aGlzLl9vSW5zdGFuY2VzW3NLZXldLmluaXRQcm9taXNlO1xuXHR9XG5cdHJlbW92ZUdsb2JhbEluc3RhbmNlKCkge1xuXHRcdHRoaXMuX29JbnN0YW5jZXMgPSB7fTtcblx0fVxufVxuXG5leHBvcnQgZGVmYXVsdCBSZXNvdXJjZU1vZGVsU2VydmljZUZhY3Rvcnk7XG4iXX0=
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type ResourceBundle from "sap/base/i18n/ResourceBundle";
|
|
1
2
|
import Service from "sap/ui/core/service/Service";
|
|
2
3
|
import ServiceFactory from "sap/ui/core/service/ServiceFactory";
|
|
3
4
|
import ResourceModel from "sap/ui/model/resource/ResourceModel";
|
|
4
|
-
import
|
|
5
|
-
import { ServiceContext } from "types/extension_types";
|
|
5
|
+
import type { ServiceContext } from "types/extension_types";
|
|
6
6
|
type ResourceModelServiceSettings = {
|
|
7
7
|
bundles: ResourceBundle[];
|
|
8
8
|
enhanceI18n: string[];
|
|
@@ -22,7 +22,7 @@ export class ResourceModelService extends Service<ResourceModelServiceSettings>
|
|
|
22
22
|
// 1. sap.fe bundle - sap.fe.core.messagebundle (passed with mSettings.bundles)
|
|
23
23
|
// 2. sap.fe bundle - sap.fe.templates.messagebundle (passed with mSettings.bundles)
|
|
24
24
|
// 3. Multiple bundles passed by the application as part of enhanceI18n
|
|
25
|
-
const aBundles = mSettings.bundles.concat(mSettings.enhanceI18n || []).map(function(vI18n: any) {
|
|
25
|
+
const aBundles = mSettings.bundles.concat(mSettings.enhanceI18n || []).map(function (vI18n: any) {
|
|
26
26
|
// if value passed for enhanceI18n is a Resource Model, return the associated bundle
|
|
27
27
|
// else the value is a bundleUrl, return Resource Bundle configuration so that a bundle can be created
|
|
28
28
|
return typeof vI18n.isA === "function" && vI18n.isA("sap.ui.model.resource.ResourceModel")
|
|
@@ -67,7 +67,7 @@ class ResourceModelServiceFactory extends ServiceFactory<ResourceModelServiceSet
|
|
|
67
67
|
createInstance(oServiceContext: ServiceContext<ResourceModelServiceSettings>) {
|
|
68
68
|
const sKey =
|
|
69
69
|
oServiceContext.settings.bundles.join(",") +
|
|
70
|
-
(oServiceContext.settings.enhanceI18n ?
|
|
70
|
+
(oServiceContext.settings.enhanceI18n ? `,${oServiceContext.settings.enhanceI18n.join(",")}` : "");
|
|
71
71
|
|
|
72
72
|
if (!this._oInstances[sKey]) {
|
|
73
73
|
this._oInstances[sKey] = new ResourceModelService(Object.assign({ factory: this }, oServiceContext));
|