@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,21 +1,21 @@
|
|
|
1
|
-
import ResourceBundle from "sap/base/i18n/ResourceBundle";
|
|
1
|
+
import type ResourceBundle from "sap/base/i18n/ResourceBundle";
|
|
2
2
|
import Log from "sap/base/Log";
|
|
3
3
|
import mergeObjects from "sap/base/util/merge";
|
|
4
|
-
import
|
|
5
|
-
import AppComponent from "sap/fe/core/AppComponent";
|
|
4
|
+
import type AppComponent from "sap/fe/core/AppComponent";
|
|
6
5
|
import { IssueCategory, IssueCategoryType, IssueSeverity } from "sap/fe/core/converters/helpers/IssueManager";
|
|
7
|
-
import {
|
|
6
|
+
import type { CompiledBindingToolkitExpression } from "sap/fe/core/helpers/BindingToolkit";
|
|
7
|
+
import { compileExpression, constant, not, or, pathInModel, transformRecursively } from "sap/fe/core/helpers/BindingToolkit";
|
|
8
8
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
9
9
|
import SemanticDateOperators from "sap/fe/core/helpers/SemanticDateOperators";
|
|
10
|
+
import SemanticKeyHelper from "sap/fe/core/helpers/SemanticKeyHelper";
|
|
10
11
|
import { generate } from "sap/fe/core/helpers/StableIdHelper";
|
|
11
|
-
import library from "sap/fe/core/library";
|
|
12
12
|
import Bar from "sap/m/Bar";
|
|
13
13
|
import Button from "sap/m/Button";
|
|
14
14
|
import Dialog from "sap/m/Dialog";
|
|
15
15
|
import MessageBox from "sap/m/MessageBox";
|
|
16
16
|
import Title from "sap/m/Title";
|
|
17
17
|
import Component from "sap/ui/core/Component";
|
|
18
|
-
import Control from "sap/ui/core/Control";
|
|
18
|
+
import type Control from "sap/ui/core/Control";
|
|
19
19
|
import Core from "sap/ui/core/Core";
|
|
20
20
|
import Fragment from "sap/ui/core/Fragment";
|
|
21
21
|
import View from "sap/ui/core/mvc/View";
|
|
@@ -24,16 +24,14 @@ import XMLTemplateProcessor from "sap/ui/core/XMLTemplateProcessor";
|
|
|
24
24
|
import { system } from "sap/ui/Device";
|
|
25
25
|
import FilterOperatorUtil from "sap/ui/mdc/condition/FilterOperatorUtil";
|
|
26
26
|
import TypeUtil from "sap/ui/mdc/odata/v4/TypeUtil";
|
|
27
|
-
import Context from "sap/ui/model/Context";
|
|
27
|
+
import type Context from "sap/ui/model/Context";
|
|
28
28
|
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
29
|
-
import ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
30
|
-
import ODataModel from "sap/ui/model/odata/v4/ODataModel";
|
|
31
|
-
import { CoreEx } from "types/extension_types";
|
|
32
|
-
import messageHandling from "./
|
|
33
|
-
import { performAfterDiscardorKeepDraft } from "./controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler";
|
|
29
|
+
import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
30
|
+
import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
|
|
31
|
+
import type { CoreEx } from "types/extension_types";
|
|
32
|
+
import messageHandling from "./controllerextensions/messageHandler/messageHandling";
|
|
34
33
|
import { getConditions } from "./templating/FilterHelper";
|
|
35
34
|
|
|
36
|
-
const ProgrammingModel = library.ProgrammingModel;
|
|
37
35
|
const aValidTypes = [
|
|
38
36
|
"Edm.Boolean",
|
|
39
37
|
"Edm.Byte",
|
|
@@ -64,7 +62,7 @@ function normalizeSearchTerm(sSearchTerm: string) {
|
|
|
64
62
|
.split(/\s+/)
|
|
65
63
|
.reduce(function (sNormalized: string | undefined, sCurrentWord: string) {
|
|
66
64
|
if (sCurrentWord !== "") {
|
|
67
|
-
sNormalized =
|
|
65
|
+
sNormalized = `${sNormalized ? `${sNormalized} ` : ""}"${sCurrentWord}"`;
|
|
68
66
|
}
|
|
69
67
|
return sNormalized;
|
|
70
68
|
}, undefined);
|
|
@@ -128,12 +126,12 @@ function getSearchRestrictions(sFullPath: any, oMetaModel: any) {
|
|
|
128
126
|
if (oNavigationRestrictions && oNavigationRestrictions["SearchRestrictions"]) {
|
|
129
127
|
return oNavigationRestrictions["SearchRestrictions"];
|
|
130
128
|
}
|
|
131
|
-
sPath = sPath
|
|
129
|
+
sPath = `${sPath}/$NavigationPropertyBinding/${aNavigationParts[i]}`;
|
|
132
130
|
}
|
|
133
|
-
return oMetaModel.getObject(sFullPath
|
|
131
|
+
return oMetaModel.getObject(`${sFullPath}@Org.OData.Capabilities.V1.SearchRestrictions`);
|
|
134
132
|
}
|
|
135
133
|
function getNavigationRestrictions(oModel: any, sEntitySetPath: any, sNavigationPath: any) {
|
|
136
|
-
const oNavigationRestrictions = oModel.getObject(sEntitySetPath
|
|
134
|
+
const oNavigationRestrictions = oModel.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.NavigationRestrictions`);
|
|
137
135
|
const aRestrictedProperties = oNavigationRestrictions && oNavigationRestrictions.RestrictedProperties;
|
|
138
136
|
return (
|
|
139
137
|
aRestrictedProperties &&
|
|
@@ -148,7 +146,7 @@ function getNavigationRestrictions(oModel: any, sEntitySetPath: any, sNavigation
|
|
|
148
146
|
}
|
|
149
147
|
function _isInNonFilterableProperties(oModel: any, sEntitySetPath: any, sContextPath: any) {
|
|
150
148
|
let bIsNotFilterable = false;
|
|
151
|
-
const oAnnotation = oModel.getObject(sEntitySetPath
|
|
149
|
+
const oAnnotation = oModel.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.FilterRestrictions`);
|
|
152
150
|
if (oAnnotation && oAnnotation.NonFilterableProperties) {
|
|
153
151
|
bIsNotFilterable = oAnnotation.NonFilterableProperties.some(function (property: any) {
|
|
154
152
|
return property.$NavigationPropertyPath === sContextPath || property.$PropertyPath === sContextPath;
|
|
@@ -158,7 +156,7 @@ function _isInNonFilterableProperties(oModel: any, sEntitySetPath: any, sContext
|
|
|
158
156
|
}
|
|
159
157
|
// TODO rework this!
|
|
160
158
|
function _isContextPathFilterable(oModel: any, sEntitySetPath: any, sContexPath: any) {
|
|
161
|
-
const sFullPath = sEntitySetPath
|
|
159
|
+
const sFullPath = `${sEntitySetPath}/${sContexPath}`,
|
|
162
160
|
aESParts = sFullPath.split("/").splice(0, 2),
|
|
163
161
|
aContext = sFullPath.split("/").splice(2);
|
|
164
162
|
let bIsNotFilterable = false,
|
|
@@ -168,7 +166,7 @@ function _isContextPathFilterable(oModel: any, sEntitySetPath: any, sContexPath:
|
|
|
168
166
|
|
|
169
167
|
bIsNotFilterable = aContext.some(function (item: string, index: number, array: string[]) {
|
|
170
168
|
if (sContext.length > 0) {
|
|
171
|
-
sContext +=
|
|
169
|
+
sContext += `/${item}`;
|
|
172
170
|
} else {
|
|
173
171
|
sContext = item;
|
|
174
172
|
}
|
|
@@ -190,37 +188,53 @@ function _isContextPathFilterable(oModel: any, sEntitySetPath: any, sContexPath:
|
|
|
190
188
|
if (index === array.length - 1) {
|
|
191
189
|
//last path segment
|
|
192
190
|
bIsNotFilterable = _isInNonFilterableProperties(oModel, sEntitySetPath, sContext);
|
|
193
|
-
} else if (oModel.getObject(sEntitySetPath
|
|
191
|
+
} else if (oModel.getObject(`${sEntitySetPath}/$NavigationPropertyBinding/${item}`)) {
|
|
194
192
|
//check existing context path and initialize it
|
|
195
193
|
bIsNotFilterable = _isInNonFilterableProperties(oModel, sEntitySetPath, sContext);
|
|
196
194
|
sContext = "";
|
|
197
195
|
//set the new EntitySet
|
|
198
|
-
sEntitySetPath =
|
|
196
|
+
sEntitySetPath = `/${oModel.getObject(`${sEntitySetPath}/$NavigationPropertyBinding/${item}`)}`;
|
|
199
197
|
}
|
|
200
198
|
return bIsNotFilterable === true;
|
|
201
199
|
});
|
|
202
200
|
return bIsNotFilterable;
|
|
203
201
|
}
|
|
204
202
|
// TODO check used places and rework this
|
|
205
|
-
function isPropertyFilterable(
|
|
203
|
+
function isPropertyFilterable(
|
|
204
|
+
oModel: ODataMetaModel,
|
|
205
|
+
sEntitySetPath: string,
|
|
206
|
+
sProperty: string,
|
|
207
|
+
bSkipHiddenFilter?: boolean
|
|
208
|
+
): boolean | CompiledBindingToolkitExpression {
|
|
206
209
|
if (typeof sProperty !== "string") {
|
|
207
210
|
throw new Error("sProperty parameter must be a string");
|
|
208
211
|
}
|
|
209
212
|
let bIsFilterable;
|
|
210
213
|
|
|
211
214
|
// Parameters should be rendered as filterfields
|
|
212
|
-
if (oModel.getObject(sEntitySetPath
|
|
215
|
+
if (oModel.getObject(`${sEntitySetPath}/@com.sap.vocabularies.Common.v1.ResultContext`) === true) {
|
|
213
216
|
return true;
|
|
214
217
|
}
|
|
215
218
|
|
|
216
|
-
const oNavigationContext = oModel.createBindingContext(sEntitySetPath
|
|
219
|
+
const oNavigationContext = oModel.createBindingContext(`${sEntitySetPath}/${sProperty}`) as Context;
|
|
217
220
|
|
|
218
|
-
if (
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
if (!bSkipHiddenFilter) {
|
|
222
|
+
if (
|
|
223
|
+
oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.Hidden") === true ||
|
|
224
|
+
oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.HiddenFilter") === true
|
|
225
|
+
) {
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
const sHiddenPath = oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.Hidden/$Path");
|
|
229
|
+
const sHiddenFilterPath = oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.HiddenFilter/$Path");
|
|
230
|
+
|
|
231
|
+
if (sHiddenPath && sHiddenFilterPath) {
|
|
232
|
+
return compileExpression(not(or(pathInModel(sHiddenPath), pathInModel(sHiddenFilterPath))));
|
|
233
|
+
} else if (sHiddenPath) {
|
|
234
|
+
return compileExpression(not(pathInModel(sHiddenPath)));
|
|
235
|
+
} else if (sHiddenFilterPath) {
|
|
236
|
+
return compileExpression(not(pathInModel(sHiddenFilterPath)));
|
|
237
|
+
}
|
|
224
238
|
}
|
|
225
239
|
|
|
226
240
|
if (sEntitySetPath.split("/").length === 2 && sProperty.indexOf("/") < 0) {
|
|
@@ -334,7 +348,7 @@ function updateRelateAppsModel(
|
|
|
334
348
|
}
|
|
335
349
|
} else {
|
|
336
350
|
// fallback to Technical Keys if no Semantic Key is present
|
|
337
|
-
const aTechnicalKeys = oMetaModel.getObject(oMetaPath
|
|
351
|
+
const aTechnicalKeys = oMetaModel.getObject(`${oMetaPath}/$Type/$Key`);
|
|
338
352
|
for (const key in aTechnicalKeys) {
|
|
339
353
|
const sObjKey = aTechnicalKeys[key];
|
|
340
354
|
if (!oParam[sObjKey]) {
|
|
@@ -353,7 +367,7 @@ function updateRelateAppsModel(
|
|
|
353
367
|
_getSOIntents(oObjectPageLayout, aManifestSOKeys[key], oParam)
|
|
354
368
|
.then(
|
|
355
369
|
_getRelatedIntents.bind(
|
|
356
|
-
this
|
|
370
|
+
this,
|
|
357
371
|
oManifestData.additionalSemanticObjects[aManifestSOKeys[key]],
|
|
358
372
|
oBindingContext,
|
|
359
373
|
aManifestSOItems
|
|
@@ -377,8 +391,8 @@ function updateRelateAppsModel(
|
|
|
377
391
|
if (aLinks && aLinks.length > 0) {
|
|
378
392
|
const oTargetParams: any = {};
|
|
379
393
|
const aAnnotationsSOItems: any[] = [];
|
|
380
|
-
const sEntitySetPath = oMetaPath
|
|
381
|
-
const sEntityTypePath = oMetaPath
|
|
394
|
+
const sEntitySetPath = `${oMetaPath}@`;
|
|
395
|
+
const sEntityTypePath = `${oMetaPath}/@`;
|
|
382
396
|
const oEntitySetAnnotations = oMetaModel.getObject(sEntitySetPath);
|
|
383
397
|
oSemanticObjectAnnotations = _getSemanticObjectAnnotations(oEntitySetAnnotations, sCurrentSemObj);
|
|
384
398
|
if (!oSemanticObjectAnnotations.bHasEntitySetSO) {
|
|
@@ -420,8 +434,8 @@ function _getSemanticObjectAnnotations(oEntityAnnotations: any, sCurrentSemObj:
|
|
|
420
434
|
|
|
421
435
|
if (key.indexOf("#") > -1) {
|
|
422
436
|
sQualifier = key.split("#")[1];
|
|
423
|
-
sAnnotationMappingTerm = sAnnotationMappingTerm
|
|
424
|
-
sAnnotationActionTerm = sAnnotationActionTerm
|
|
437
|
+
sAnnotationMappingTerm = `${sAnnotationMappingTerm}#${sQualifier}`;
|
|
438
|
+
sAnnotationActionTerm = `${sAnnotationActionTerm}#${sQualifier}`;
|
|
425
439
|
}
|
|
426
440
|
|
|
427
441
|
oSemanticObjectAnnotations.aMappings = oSemanticObjectAnnotations.aMappings.concat(oEntityAnnotations[sAnnotationMappingTerm]);
|
|
@@ -440,7 +454,7 @@ function fnUpdateRelatedAppsDetails(oObjectPageLayout: any) {
|
|
|
440
454
|
const oPath = oBindingContext && oBindingContext.getPath();
|
|
441
455
|
const oMetaPath = oMetaModel.getMetaPath(oPath);
|
|
442
456
|
// Semantic Key Vocabulary
|
|
443
|
-
const sSemanticKeyVocabulary = oMetaPath +
|
|
457
|
+
const sSemanticKeyVocabulary = `${oMetaPath}/` + `@com.sap.vocabularies.Common.v1.SemanticKey`;
|
|
444
458
|
//Semantic Keys
|
|
445
459
|
const aSemKeys = oMetaModel.getObject(sSemanticKeyVocabulary);
|
|
446
460
|
// Unavailable Actions
|
|
@@ -448,8 +462,8 @@ function fnUpdateRelatedAppsDetails(oObjectPageLayout: any) {
|
|
|
448
462
|
if (!oEntry) {
|
|
449
463
|
oBindingContext
|
|
450
464
|
.requestObject()
|
|
451
|
-
.then(function (
|
|
452
|
-
return updateRelateAppsModel(oBindingContext,
|
|
465
|
+
.then(function (requestedObject: any) {
|
|
466
|
+
return updateRelateAppsModel(oBindingContext, requestedObject, oObjectPageLayout, aSemKeys, oMetaModel, oMetaPath);
|
|
453
467
|
})
|
|
454
468
|
.catch(function (oError: any) {
|
|
455
469
|
Log.error("Cannot update the related app details", oError);
|
|
@@ -495,87 +509,7 @@ function getTargetView(oControl: any) {
|
|
|
495
509
|
}
|
|
496
510
|
return oControl;
|
|
497
511
|
}
|
|
498
|
-
/**
|
|
499
|
-
* @param fnProcessFunction
|
|
500
|
-
* @param fnCancelFunction
|
|
501
|
-
* @param oContext
|
|
502
|
-
* @param oController
|
|
503
|
-
* @param bSkipBindingToView
|
|
504
|
-
*/
|
|
505
|
-
function fnProcessDataLossOrDraftDiscardConfirmation(
|
|
506
|
-
fnProcessFunction: any,
|
|
507
|
-
fnCancelFunction: any,
|
|
508
|
-
oContext: any,
|
|
509
|
-
oController: any,
|
|
510
|
-
bSkipBindingToView?: boolean
|
|
511
|
-
) {
|
|
512
|
-
const oModel = oContext.getModel();
|
|
513
|
-
let _bIsModified = false;
|
|
514
|
-
const draftDataContext = oModel.bindContext(oContext.getPath() + "/DraftAdministrativeData").getBoundContext();
|
|
515
|
-
|
|
516
|
-
const collaborationConnected = isConnected(oController.getView());
|
|
517
|
-
const processFunctionForDrafts = !collaborationConnected
|
|
518
|
-
? fnProcessFunction
|
|
519
|
-
: function (...args: any[]) {
|
|
520
|
-
disconnect(oController.getView());
|
|
521
|
-
fnProcessFunction.apply(null, ...args);
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
if (
|
|
525
|
-
oContext &&
|
|
526
|
-
oContext.getObject() &&
|
|
527
|
-
(!oContext.getObject().DraftAdministrativeData || oContext.getObject().IsActiveEntity === true)
|
|
528
|
-
) {
|
|
529
|
-
fnProcessFunction();
|
|
530
|
-
} else {
|
|
531
|
-
draftDataContext
|
|
532
|
-
.requestObject()
|
|
533
|
-
.then(function (draftAdminData: any) {
|
|
534
|
-
if (draftAdminData) {
|
|
535
|
-
_bIsModified = !(draftAdminData.CreationDateTime === draftAdminData.LastChangeDateTime);
|
|
536
|
-
if (_bIsModified) {
|
|
537
|
-
performAfterDiscardorKeepDraft(processFunctionForDrafts, fnCancelFunction, oController, bSkipBindingToView);
|
|
538
|
-
} else {
|
|
539
|
-
processFunctionForDrafts();
|
|
540
|
-
}
|
|
541
|
-
} else {
|
|
542
|
-
fnProcessFunction();
|
|
543
|
-
}
|
|
544
|
-
})
|
|
545
|
-
.catch(function (oError: any) {
|
|
546
|
-
Log.error("Cannot retrieve draftDataContext information", oError);
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
function fnProcessDataLossConfirmation(fnProcess: Function, oControl: any, programmingModel: string) {
|
|
551
|
-
const bUIEditable = oControl.getModel("ui").getProperty("/isEditable"),
|
|
552
|
-
oResourceBundle = (Core as CoreEx).getLibraryResourceBundle("sap.fe.templates"),
|
|
553
|
-
sWarningMsg = oResourceBundle && oResourceBundle.getText("T_COMMON_UTILS_NAVIGATION_AWAY_MSG"),
|
|
554
|
-
sConfirmButtonTxt = oResourceBundle && oResourceBundle.getText("T_COMMON_UTILS_NAVIGATION_AWAY_CONFIRM_BUTTON"),
|
|
555
|
-
sCancelButtonTxt = oResourceBundle && oResourceBundle.getText("T_COMMON_UTILS_NAVIGATION_AWAY_CANCEL_BUTTON");
|
|
556
|
-
|
|
557
|
-
if (programmingModel === ProgrammingModel.Sticky && bUIEditable) {
|
|
558
|
-
return MessageBox.warning(sWarningMsg, {
|
|
559
|
-
actions: [sConfirmButtonTxt, sCancelButtonTxt],
|
|
560
|
-
onClose: function (sAction: any) {
|
|
561
|
-
if (sAction === sConfirmButtonTxt) {
|
|
562
|
-
const oInternalModel = oControl && oControl.getModel("internal");
|
|
563
512
|
|
|
564
|
-
Log.info("Navigation confirmed.");
|
|
565
|
-
if (oInternalModel) {
|
|
566
|
-
oInternalModel.setProperty("/sessionOn", false);
|
|
567
|
-
} else {
|
|
568
|
-
Log.warning("Local UIModel couldn't be found.");
|
|
569
|
-
}
|
|
570
|
-
fnProcess();
|
|
571
|
-
} else {
|
|
572
|
-
Log.info("Navigation rejected.");
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
return fnProcess();
|
|
578
|
-
}
|
|
579
513
|
function isFieldControlPathInapplicable(sFieldControlPath: string, oAttribute: any) {
|
|
580
514
|
let bInapplicable = false;
|
|
581
515
|
const aParts = sFieldControlPath.split("/");
|
|
@@ -601,7 +535,7 @@ function removeSensitiveData(aAttributes: any[], oMetaModel: ODataMetaModel) {
|
|
|
601
535
|
const aProperties = Object.keys(oAttribute);
|
|
602
536
|
for (let j = 0; j < aProperties.length; j++) {
|
|
603
537
|
const sProp = aProperties[j],
|
|
604
|
-
aPropertyAnnotations = oMetaModel.getObject(
|
|
538
|
+
aPropertyAnnotations = oMetaModel.getObject(`/${sEntitySet}/${sProp}@`);
|
|
605
539
|
if (aPropertyAnnotations) {
|
|
606
540
|
if (
|
|
607
541
|
aPropertyAnnotations["@com.sap.vocabularies.PersonalData.v1.IsPotentiallySensitive"] ||
|
|
@@ -633,7 +567,7 @@ function _fnCheckIsMatch(oObject: any, oKeysToCheck: any) {
|
|
|
633
567
|
return true;
|
|
634
568
|
}
|
|
635
569
|
function fnGetContextPathProperties(oMetaModel: ODataMetaModel, sContextPath: string, oFilter?: object) {
|
|
636
|
-
const oEntityType = oMetaModel.getObject(sContextPath
|
|
570
|
+
const oEntityType = oMetaModel.getObject(`${sContextPath}/`) || {},
|
|
637
571
|
oProperties: any = {};
|
|
638
572
|
|
|
639
573
|
for (const sKey in oEntityType) {
|
|
@@ -651,7 +585,7 @@ function fnGetContextPathProperties(oMetaModel: ODataMetaModel, sContextPath: st
|
|
|
651
585
|
function fnGetMandatoryFilterFields(oMetaModel: ODataMetaModel, sContextPath: string) {
|
|
652
586
|
let aMandatoryFilterFields;
|
|
653
587
|
if (oMetaModel && sContextPath) {
|
|
654
|
-
aMandatoryFilterFields = oMetaModel.getObject(sContextPath
|
|
588
|
+
aMandatoryFilterFields = oMetaModel.getObject(`${sContextPath}@Org.OData.Capabilities.V1.FilterRestrictions/RequiredProperties`);
|
|
655
589
|
}
|
|
656
590
|
return aMandatoryFilterFields;
|
|
657
591
|
}
|
|
@@ -728,12 +662,12 @@ function getTranslatedText(sFrameworkKey: string, oResourceBundle: ResourceBundl
|
|
|
728
662
|
// hence we need to do this recurrsively to check if the key exists in any of the bundles the forms the FE resource bundle
|
|
729
663
|
const bResourceKeyExists = _checkIfResourceKeyExists(
|
|
730
664
|
(oResourceBundle as any).aCustomBundles,
|
|
731
|
-
sFrameworkKey
|
|
665
|
+
`${sFrameworkKey}|${sEntitySetName}`
|
|
732
666
|
);
|
|
733
667
|
|
|
734
668
|
// if resource key with entity set name for instance specific text overriding is provided by the application
|
|
735
669
|
// then use the same key otherwise use the Framework key
|
|
736
|
-
sResourceKey = bResourceKeyExists ? sFrameworkKey
|
|
670
|
+
sResourceKey = bResourceKeyExists ? `${sFrameworkKey}|${sEntitySetName}` : sFrameworkKey;
|
|
737
671
|
}
|
|
738
672
|
return oResourceBundle.getText(sResourceKey, oParams);
|
|
739
673
|
}
|
|
@@ -761,18 +695,18 @@ function getActionPath(oAction: any, bReturnOnlyPath: boolean, sActionName?: str
|
|
|
761
695
|
const sEntityTypeName = oAction.getObject(sContextPath).$Type;
|
|
762
696
|
const sEntityName = getEntitySetName(oAction.getModel(), sEntityTypeName);
|
|
763
697
|
if (sEntityName) {
|
|
764
|
-
sContextPath =
|
|
698
|
+
sContextPath = `/${sEntityName}`;
|
|
765
699
|
}
|
|
766
700
|
if (bCheckStaticValue) {
|
|
767
|
-
return oAction.getObject(sContextPath
|
|
701
|
+
return oAction.getObject(`${sContextPath}/${sActionName}@Org.OData.Core.V1.OperationAvailable`);
|
|
768
702
|
}
|
|
769
703
|
if (bReturnOnlyPath) {
|
|
770
|
-
return sContextPath
|
|
704
|
+
return `${sContextPath}/${sActionName}`;
|
|
771
705
|
} else {
|
|
772
706
|
return {
|
|
773
707
|
sContextPath: sContextPath,
|
|
774
|
-
sProperty: oAction.getObject(sContextPath
|
|
775
|
-
sBindingParameter: oAction.getObject(sContextPath
|
|
708
|
+
sProperty: oAction.getObject(`${sContextPath}/${sActionName}@Org.OData.Core.V1.OperationAvailable/$Path`),
|
|
709
|
+
sBindingParameter: oAction.getObject(`${sContextPath}/${sActionName}/@$ui5.overload/0/$Parameter/0/$Name`)
|
|
776
710
|
};
|
|
777
711
|
}
|
|
778
712
|
}
|
|
@@ -807,7 +741,7 @@ function computeDisplayMode(oPropertyAnnotations: any, oCollectionAnnotations?:
|
|
|
807
741
|
}
|
|
808
742
|
function _getEntityType(oContext: any) {
|
|
809
743
|
const oMetaModel = oContext.getModel().getMetaModel();
|
|
810
|
-
return oMetaModel.getObject(oMetaModel.getMetaPath(oContext.getPath())
|
|
744
|
+
return oMetaModel.getObject(`${oMetaModel.getMetaPath(oContext.getPath())}/$Type`);
|
|
811
745
|
}
|
|
812
746
|
function _requestObject(sAction: any, oSelectedContext: any, sProperty: any) {
|
|
813
747
|
let oContext = oSelectedContext;
|
|
@@ -876,16 +810,16 @@ function _setContextsBasedOnOperationAvailable(oInternalModelContext: any, aRequ
|
|
|
876
810
|
* @param aNotApplicable
|
|
877
811
|
*/
|
|
878
812
|
function _setDynamicActionContexts(oInternalModelContext: any, sAction: any, aApplicable: any, aNotApplicable: any) {
|
|
879
|
-
const sDynamicActionPathPrefix = oInternalModelContext.getPath()
|
|
813
|
+
const sDynamicActionPathPrefix = `${oInternalModelContext.getPath()}/dynamicActions/${sAction}`,
|
|
880
814
|
oInternalModel = oInternalModelContext.getModel();
|
|
881
|
-
oInternalModel.setProperty(sDynamicActionPathPrefix
|
|
882
|
-
oInternalModel.setProperty(sDynamicActionPathPrefix
|
|
815
|
+
oInternalModel.setProperty(`${sDynamicActionPathPrefix}/aApplicable`, aApplicable);
|
|
816
|
+
oInternalModel.setProperty(`${sDynamicActionPathPrefix}/aNotApplicable`, aNotApplicable);
|
|
883
817
|
}
|
|
884
818
|
function setActionEnablement(oInternalModelContext: any, oActionOperationAvailableMap: any, aSelectedContexts: any) {
|
|
885
819
|
const aPromises = [];
|
|
886
820
|
for (const sAction in oActionOperationAvailableMap) {
|
|
887
821
|
// Reset all properties before computation
|
|
888
|
-
oInternalModelContext.setProperty(
|
|
822
|
+
oInternalModelContext.setProperty(`dynamicActions/${sAction}`, {
|
|
889
823
|
bEnabled: false,
|
|
890
824
|
aApplicable: [],
|
|
891
825
|
aNotApplicable: []
|
|
@@ -896,7 +830,7 @@ function setActionEnablement(oInternalModelContext: any, oActionOperationAvailab
|
|
|
896
830
|
const aApplicable = [],
|
|
897
831
|
aNotApplicable = [],
|
|
898
832
|
sProperty = oActionOperationAvailableMap[sAction],
|
|
899
|
-
sDynamicActionEnabledPath = oInternalModelContext.getPath()
|
|
833
|
+
sDynamicActionEnabledPath = `${oInternalModelContext.getPath()}/dynamicActions/${sAction}/bEnabled`;
|
|
900
834
|
|
|
901
835
|
if (typeof sProperty === "object" && sProperty !== null && sProperty !== undefined) {
|
|
902
836
|
for (let i = 0; i < aSelectedContexts.length; i++) {
|
|
@@ -905,14 +839,14 @@ function setActionEnablement(oInternalModelContext: any, oActionOperationAvailab
|
|
|
905
839
|
const oContextData = oSelectedContext.getObject();
|
|
906
840
|
const oTransformedBinding = transformRecursively(
|
|
907
841
|
sProperty,
|
|
908
|
-
"
|
|
842
|
+
"PathInModel",
|
|
909
843
|
// eslint-disable-next-line no-loop-func
|
|
910
844
|
function (oBindingExpression: any) {
|
|
911
845
|
return constant(oContextData[oBindingExpression.path]);
|
|
912
846
|
},
|
|
913
847
|
true
|
|
914
848
|
);
|
|
915
|
-
const sResult =
|
|
849
|
+
const sResult = compileExpression(oTransformedBinding);
|
|
916
850
|
if (sResult === "true") {
|
|
917
851
|
oInternalModelContext.getModel().setProperty(sDynamicActionEnabledPath, true);
|
|
918
852
|
aApplicable.push(oSelectedContext);
|
|
@@ -928,7 +862,7 @@ function setActionEnablement(oInternalModelContext: any, oActionOperationAvailab
|
|
|
928
862
|
const oSelectedContext = aSelectedContexts[i];
|
|
929
863
|
if (oSelectedContext) {
|
|
930
864
|
const oContextData = oSelectedContext.getObject();
|
|
931
|
-
if (sProperty === null && !!oContextData[
|
|
865
|
+
if (sProperty === null && !!oContextData[`#${sAction}`]) {
|
|
932
866
|
//look for action advertisement if present and its value is not null
|
|
933
867
|
oInternalModelContext.getModel().setProperty(sDynamicActionEnabledPath, true);
|
|
934
868
|
break;
|
|
@@ -951,7 +885,7 @@ function setActionEnablement(oInternalModelContext: any, oActionOperationAvailab
|
|
|
951
885
|
function setObjectMappings(sSemanticObject: string, oParams: any, aSemanticObjectMappings: any) {
|
|
952
886
|
aSemanticObjectMappings.forEach(function (oItem: any) {
|
|
953
887
|
if (sSemanticObject === oItem.semanticObject) {
|
|
954
|
-
|
|
888
|
+
const oMappings = oItem.items;
|
|
955
889
|
for (let i = 0; i < oMappings.length; i++) {
|
|
956
890
|
const sLocalProperty = oMappings[i].key;
|
|
957
891
|
const sSemanticObjectProperty = oMappings[i].value;
|
|
@@ -1023,7 +957,7 @@ function getOperatorsForProperty(
|
|
|
1023
957
|
let aSemanticDateOps: any[] = [];
|
|
1024
958
|
const oSettings = typeof sSettings === "string" ? JSON.parse(sSettings).customData : sSettings;
|
|
1025
959
|
|
|
1026
|
-
if (oContext.getObject(sEntitySetPath
|
|
960
|
+
if (oContext.getObject(`${sEntitySetPath}/@com.sap.vocabularies.Common.v1.ResultContext`) === true) {
|
|
1027
961
|
return aEqualsOps.toString();
|
|
1028
962
|
}
|
|
1029
963
|
|
|
@@ -1032,7 +966,7 @@ function getOperatorsForProperty(
|
|
|
1032
966
|
} else {
|
|
1033
967
|
aSemanticDateOps = SemanticDateOperators.getSemanticDateOperations();
|
|
1034
968
|
}
|
|
1035
|
-
|
|
969
|
+
const aSingleRangeDateTimeOps = aSemanticDateOps.filter(function (sOperator) {
|
|
1036
970
|
return sOperator !== "DATE" && sOperator !== "DATERANGE" && sOperator !== "FROM" && sOperator !== "TO";
|
|
1037
971
|
});
|
|
1038
972
|
// Get the default Operators for this Property Type
|
|
@@ -1059,15 +993,20 @@ function getOperatorsForProperty(
|
|
|
1059
993
|
sRestrictions = _getRestrictions(aDefaultOperators, aEqualsOps);
|
|
1060
994
|
break;
|
|
1061
995
|
case "SingleRange":
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
996
|
+
let aExpressionOps;
|
|
997
|
+
if (bSemanticDateRange) {
|
|
998
|
+
if (sType === "Edm.Date") {
|
|
999
|
+
aExpressionOps = aSemanticDateOps;
|
|
1000
|
+
} else if (sType === "Edm.DateTimeOffset") {
|
|
1001
|
+
aExpressionOps = aSingleRangeDateTimeOps.concat(aBasicDateTimeOps);
|
|
1002
|
+
} else {
|
|
1003
|
+
aExpressionOps = aSingleRangeOps;
|
|
1004
|
+
}
|
|
1005
|
+
} else if (sType === "Edm.DateTimeOffset") {
|
|
1006
|
+
aExpressionOps = aSingleRangeDTBasicOps;
|
|
1007
|
+
} else {
|
|
1008
|
+
aExpressionOps = aSingleRangeOps;
|
|
1009
|
+
}
|
|
1071
1010
|
const sOperators = _getRestrictions(aDefaultOperators, aExpressionOps);
|
|
1072
1011
|
sRestrictions = sOperators ? sOperators : "";
|
|
1073
1012
|
break;
|
|
@@ -1099,7 +1038,7 @@ function getOperatorsForProperty(
|
|
|
1099
1038
|
}
|
|
1100
1039
|
function getParameterInfo(oMetaModel: any, sContextPath: any) {
|
|
1101
1040
|
const sParameterContextPath = sContextPath.substring(0, sContextPath.lastIndexOf("/"));
|
|
1102
|
-
const bResultContext = oMetaModel.getObject(sParameterContextPath
|
|
1041
|
+
const bResultContext = oMetaModel.getObject(`${sParameterContextPath}/@com.sap.vocabularies.Common.v1.ResultContext`);
|
|
1103
1042
|
const oParameterInfo: any = {};
|
|
1104
1043
|
if (bResultContext && sParameterContextPath !== sContextPath) {
|
|
1105
1044
|
oParameterInfo.contextPath = sParameterContextPath;
|
|
@@ -1177,24 +1116,24 @@ function addSelectionVariantToConditions(oSelectionVariant: any, oConditions: ob
|
|
|
1177
1116
|
const aMetadataParameters = Object.keys(oValidParameterProperties);
|
|
1178
1117
|
aMetadataParameters.forEach(function (sMetadataParameter: string) {
|
|
1179
1118
|
let sSelectOptionName;
|
|
1180
|
-
if (aSelectOptionsPropertyNames.includes(
|
|
1181
|
-
sSelectOptionName =
|
|
1119
|
+
if (aSelectOptionsPropertyNames.includes(`$Parameter.${sMetadataParameter}`)) {
|
|
1120
|
+
sSelectOptionName = `$Parameter.${sMetadataParameter}`;
|
|
1182
1121
|
} else if (aSelectOptionsPropertyNames.includes(sMetadataParameter)) {
|
|
1183
1122
|
sSelectOptionName = sMetadataParameter;
|
|
1184
1123
|
} else if (
|
|
1185
1124
|
sMetadataParameter.startsWith("P_") &&
|
|
1186
|
-
aSelectOptionsPropertyNames.includes(
|
|
1125
|
+
aSelectOptionsPropertyNames.includes(`$Parameter.${sMetadataParameter.slice(2, sMetadataParameter.length)}`)
|
|
1187
1126
|
) {
|
|
1188
|
-
sSelectOptionName =
|
|
1127
|
+
sSelectOptionName = `$Parameter.${sMetadataParameter.slice(2, sMetadataParameter.length)}`;
|
|
1189
1128
|
} else if (
|
|
1190
1129
|
sMetadataParameter.startsWith("P_") &&
|
|
1191
1130
|
aSelectOptionsPropertyNames.includes(sMetadataParameter.slice(2, sMetadataParameter.length))
|
|
1192
1131
|
) {
|
|
1193
1132
|
sSelectOptionName = sMetadataParameter.slice(2, sMetadataParameter.length);
|
|
1194
|
-
} else if (aSelectOptionsPropertyNames.includes(
|
|
1195
|
-
sSelectOptionName =
|
|
1196
|
-
} else if (aSelectOptionsPropertyNames.includes(
|
|
1197
|
-
sSelectOptionName =
|
|
1133
|
+
} else if (aSelectOptionsPropertyNames.includes(`$Parameter.P_${sMetadataParameter}`)) {
|
|
1134
|
+
sSelectOptionName = `$Parameter.P_${sMetadataParameter}`;
|
|
1135
|
+
} else if (aSelectOptionsPropertyNames.includes(`P_${sMetadataParameter}`)) {
|
|
1136
|
+
sSelectOptionName = `P_${sMetadataParameter}`;
|
|
1198
1137
|
}
|
|
1199
1138
|
|
|
1200
1139
|
if (sSelectOptionName) {
|
|
@@ -1221,8 +1160,8 @@ function addSelectionVariantToConditions(oSelectionVariant: any, oConditions: ob
|
|
|
1221
1160
|
aSelectOptionsPropertyNames.includes(sMetadataProperty.slice(2, sMetadataProperty.length))
|
|
1222
1161
|
) {
|
|
1223
1162
|
sSelectOptionName = sMetadataProperty.slice(2, sMetadataProperty.length);
|
|
1224
|
-
} else if (aSelectOptionsPropertyNames.includes(
|
|
1225
|
-
sSelectOptionName =
|
|
1163
|
+
} else if (aSelectOptionsPropertyNames.includes(`P_${sMetadataProperty}`)) {
|
|
1164
|
+
sSelectOptionName = `P_${sMetadataProperty}`;
|
|
1226
1165
|
}
|
|
1227
1166
|
if (sSelectOptionName) {
|
|
1228
1167
|
addSelectOptionsToConditions(
|
|
@@ -1241,9 +1180,9 @@ function addSelectionVariantToConditions(oSelectionVariant: any, oConditions: ob
|
|
|
1241
1180
|
|
|
1242
1181
|
aSelectOptionsPropertyNames.forEach(function (sSelectOption: any) {
|
|
1243
1182
|
if (sSelectOption.indexOf(".") > 0 && !sSelectOption.includes("$Parameter")) {
|
|
1244
|
-
const sFullContextPath =
|
|
1245
|
-
?
|
|
1246
|
-
: sContextPath
|
|
1183
|
+
const sFullContextPath = `/${sSelectOption.replaceAll(".", "/")}`.startsWith(sContextPath)
|
|
1184
|
+
? `/${sSelectOption.replaceAll(".", "/")}`
|
|
1185
|
+
: `${sContextPath}/${sSelectOption.replaceAll(".", "/")}`; // check if the full path, eg SalesOrderManage._Item.Material exists in the metamodel
|
|
1247
1186
|
if (oMetaModel.getObject(sFullContextPath.replace("P_", ""))) {
|
|
1248
1187
|
_createConditionsForNavProperties(
|
|
1249
1188
|
sFullContextPath,
|
|
@@ -1276,20 +1215,20 @@ function _createConditionsForNavProperties(
|
|
|
1276
1215
|
) {
|
|
1277
1216
|
let aNavObjectNames = sSelectOption.split(".");
|
|
1278
1217
|
// Eg: "SalesOrderManage._Item._Material.Material" or "_Item.Material"
|
|
1279
|
-
if (
|
|
1280
|
-
const sFullPath = (
|
|
1281
|
-
sNavPath = sFullPath.replace(sMainEntitySetPath
|
|
1218
|
+
if (`/${sSelectOption.replaceAll(".", "/")}`.startsWith(sMainEntitySetPath)) {
|
|
1219
|
+
const sFullPath = (`/${sSelectOption}` as any).replaceAll(".", "/"),
|
|
1220
|
+
sNavPath = sFullPath.replace(`${sMainEntitySetPath}/`, "");
|
|
1282
1221
|
aNavObjectNames = sNavPath.split("/");
|
|
1283
1222
|
}
|
|
1284
1223
|
let sConditionPath = "";
|
|
1285
1224
|
const sPropertyName = aNavObjectNames[aNavObjectNames.length - 1]; // Material from SalesOrderManage._Item.Material
|
|
1286
1225
|
for (let i = 0; i < aNavObjectNames.length - 1; i++) {
|
|
1287
|
-
if (oMetaModel.getObject(sMainEntitySetPath
|
|
1288
|
-
sConditionPath = sConditionPath + aNavObjectNames[i]
|
|
1226
|
+
if (oMetaModel.getObject(`${sMainEntitySetPath}/${aNavObjectNames[i].replace("P_", "")}`).$isCollection) {
|
|
1227
|
+
sConditionPath = `${sConditionPath + aNavObjectNames[i]}*/`; // _Item*/ in case of 1:n cardinality
|
|
1289
1228
|
} else {
|
|
1290
|
-
sConditionPath = sConditionPath + aNavObjectNames[i]
|
|
1229
|
+
sConditionPath = `${sConditionPath + aNavObjectNames[i]}/`; // _Item/ in case of 1:1 cardinality
|
|
1291
1230
|
}
|
|
1292
|
-
sMainEntitySetPath = sMainEntitySetPath
|
|
1231
|
+
sMainEntitySetPath = `${sMainEntitySetPath}/${aNavObjectNames[i]}`;
|
|
1293
1232
|
}
|
|
1294
1233
|
const sNavPropertyPath = sFullContextPath.slice(0, sFullContextPath.lastIndexOf("/")),
|
|
1295
1234
|
oValidProperties = CommonUtils.getContextPathProperties(oMetaModel, sNavPropertyPath),
|
|
@@ -1299,12 +1238,11 @@ function _createConditionsForNavProperties(
|
|
|
1299
1238
|
sSelectOptionName = sPropertyName;
|
|
1300
1239
|
} else if (sPropertyName.startsWith("P_") && oValidProperties[sPropertyName.replace("P_", "")]) {
|
|
1301
1240
|
sSelectOptionName = sPropertyName.replace("P_", "");
|
|
1302
|
-
} else if (oValidProperties[
|
|
1303
|
-
sSelectOptionName =
|
|
1241
|
+
} else if (oValidProperties[`P_${sPropertyName}`] && aSelectOptionsPropertyNames.includes(`P_${sPropertyName}`)) {
|
|
1242
|
+
sSelectOptionName = `P_${sPropertyName}`;
|
|
1304
1243
|
}
|
|
1305
1244
|
if (sPropertyName.startsWith("P_") && oConditions[sConditionPath + sSelectOptionName]) {
|
|
1306
1245
|
// if there is no SalesOrderManage._Item.Material yet in the oConditions
|
|
1307
|
-
return;
|
|
1308
1246
|
} else if (!sPropertyName.startsWith("P_") && oConditions[sConditionPath + sSelectOptionName]) {
|
|
1309
1247
|
delete oConditions[sConditionPath + sSelectOptionName];
|
|
1310
1248
|
addSelectOptionsToConditions(
|
|
@@ -1358,7 +1296,7 @@ function addExternalStateFiltersToSelectionVariant(oSelectionVariant: any, mFilt
|
|
|
1358
1296
|
break;
|
|
1359
1297
|
case "EndsWith":
|
|
1360
1298
|
oSelectOptionState.option = "CP";
|
|
1361
|
-
oSelectOptionState.low =
|
|
1299
|
+
oSelectOptionState.low = `*${oSelectOptionState.low}`;
|
|
1362
1300
|
break;
|
|
1363
1301
|
case "BT":
|
|
1364
1302
|
case "LE":
|
|
@@ -1394,7 +1332,7 @@ function addExternalStateFiltersToSelectionVariant(oSelectionVariant: any, mFilt
|
|
|
1394
1332
|
break;
|
|
1395
1333
|
case "NotEndsWith":
|
|
1396
1334
|
oSelectOptionState.option = "CP";
|
|
1397
|
-
oSelectOptionState.low =
|
|
1335
|
+
oSelectOptionState.low = `*${oSelectOptionState.low}`;
|
|
1398
1336
|
oSelectOptionState.sign = "E";
|
|
1399
1337
|
break;
|
|
1400
1338
|
case "NotEmpty":
|
|
@@ -1418,29 +1356,29 @@ function addExternalStateFiltersToSelectionVariant(oSelectionVariant: any, mFilt
|
|
|
1418
1356
|
oSelectOptionState.sign = "E";
|
|
1419
1357
|
break;
|
|
1420
1358
|
default:
|
|
1421
|
-
Log.warning(sOperator
|
|
1359
|
+
Log.warning(`${sOperator} is not supported. ${sFilter} could not be added to the navigation context`);
|
|
1422
1360
|
}
|
|
1423
1361
|
return oSelectOptionState;
|
|
1424
1362
|
};
|
|
1425
1363
|
const oFilterConditions = mFilters.filterConditions;
|
|
1426
1364
|
const oFiltersWithoutConflict = mFilters.filterConditionsWithoutConflict ? mFilters.filterConditionsWithoutConflict : {};
|
|
1427
1365
|
const oTablePropertiesWithoutConflict = oTargetInfo.propertiesWithoutConflict ? oTargetInfo.propertiesWithoutConflict : {};
|
|
1428
|
-
const addFiltersToSelectionVariant = function (
|
|
1366
|
+
const addFiltersToSelectionVariant = function (selectionVariant: any, sFilterName: any, sPath?: any) {
|
|
1429
1367
|
const aFilters = oFilterConditions[sFilterName];
|
|
1430
1368
|
for (const item in aFilters) {
|
|
1431
1369
|
const oFilter = aFilters[item];
|
|
1432
1370
|
sLow = (oFilter.values[0] && oFilter.values[0].toString()) || "";
|
|
1433
1371
|
sHigh = (oFilter.values[1] && oFilter.values[1].toString()) || null;
|
|
1434
1372
|
if (oFilter.operator === "TODAY" || oFilter.operator === "DATE") {
|
|
1435
|
-
const aFilter = oFilterInfo[0].aFilters.filter(function (
|
|
1436
|
-
return
|
|
1373
|
+
const aFilter = oFilterInfo[0].aFilters.filter(function (filter: any) {
|
|
1374
|
+
return filter.sPath === sFilterName;
|
|
1437
1375
|
});
|
|
1438
1376
|
sLow = aFilter[0].oValue1 || "";
|
|
1439
1377
|
sHigh = null;
|
|
1440
1378
|
}
|
|
1441
1379
|
const oSelectOptionValues = fnGetSignAndOption(oFilter.operator, sLow, sHigh);
|
|
1442
1380
|
if (oSelectOptionValues.option) {
|
|
1443
|
-
|
|
1381
|
+
selectionVariant.addSelectOption(
|
|
1444
1382
|
sPath ? sPath : sFilterName,
|
|
1445
1383
|
oSelectOptionValues.sign,
|
|
1446
1384
|
oSelectOptionValues.option,
|
|
@@ -1503,12 +1441,13 @@ function addDefaultDisplayCurrency(aMandatoryFilterFields: any[], oSelectionVari
|
|
|
1503
1441
|
}
|
|
1504
1442
|
}
|
|
1505
1443
|
function getNonComputedVisibleFields(oMetaModel: ODataMetaModel, sPath: any, oView?: any) {
|
|
1506
|
-
const aTechnicalKeys = oMetaModel.getObject(sPath
|
|
1507
|
-
const aNonComputedVisibleFields = [];
|
|
1508
|
-
const
|
|
1444
|
+
const aTechnicalKeys = oMetaModel.getObject(`${sPath}/`).$Key;
|
|
1445
|
+
const aNonComputedVisibleFields: any = [];
|
|
1446
|
+
const aImmutableVisibleFields: any = [];
|
|
1447
|
+
const oEntityType = oMetaModel.getObject(`${sPath}/`);
|
|
1509
1448
|
for (const item in oEntityType) {
|
|
1510
1449
|
if (oEntityType[item].$kind && oEntityType[item].$kind === "Property") {
|
|
1511
|
-
const oAnnotations = oMetaModel.getObject(sPath
|
|
1450
|
+
const oAnnotations = oMetaModel.getObject(`${sPath}/${item}@`) || {},
|
|
1512
1451
|
bIsKey = aTechnicalKeys.indexOf(item) > -1,
|
|
1513
1452
|
bIsImmutable = oAnnotations["@Org.OData.Core.V1.Immutable"],
|
|
1514
1453
|
bIsNonComputed = !oAnnotations["@Org.OData.Core.V1.Computed"],
|
|
@@ -1519,11 +1458,13 @@ function getNonComputedVisibleFields(oMetaModel: ODataMetaModel, sPath: any, oVi
|
|
|
1519
1458
|
? bIsComputedDefaultValue && oAnnotations["@com.sap.vocabularies.Common.v1.Text"]
|
|
1520
1459
|
: false;
|
|
1521
1460
|
if (
|
|
1522
|
-
(
|
|
1461
|
+
(bIsKeyComputedDefaultValueWithText || (bIsKey && oEntityType[item].$Type !== "Edm.Guid")) &&
|
|
1523
1462
|
bIsNonComputed &&
|
|
1524
1463
|
bIsVisible
|
|
1525
1464
|
) {
|
|
1526
1465
|
aNonComputedVisibleFields.push(item);
|
|
1466
|
+
} else if (bIsImmutable && bIsNonComputed && bIsVisible) {
|
|
1467
|
+
aImmutableVisibleFields.push(item);
|
|
1527
1468
|
}
|
|
1528
1469
|
|
|
1529
1470
|
if (!bIsNonComputed && bIsComputedDefaultValue && oView) {
|
|
@@ -1539,8 +1480,95 @@ function getNonComputedVisibleFields(oMetaModel: ODataMetaModel, sPath: any, oVi
|
|
|
1539
1480
|
}
|
|
1540
1481
|
}
|
|
1541
1482
|
}
|
|
1542
|
-
|
|
1483
|
+
const aRequiredProperties = CommonUtils.getRequiredPropertiesFromInsertRestrictions(sPath, oMetaModel);
|
|
1484
|
+
if (aRequiredProperties.length) {
|
|
1485
|
+
aRequiredProperties.forEach(function (sProperty: any) {
|
|
1486
|
+
const oAnnotations = oMetaModel.getObject(`${sPath}/${sProperty}@`),
|
|
1487
|
+
bIsVisible = !oAnnotations || !oAnnotations["@com.sap.vocabularies.UI.v1.Hidden"];
|
|
1488
|
+
if (bIsVisible && aNonComputedVisibleFields.indexOf(sProperty) === -1 && aImmutableVisibleFields.indexOf(sProperty) === -1) {
|
|
1489
|
+
aNonComputedVisibleFields.push(sProperty);
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
return aNonComputedVisibleFields.concat(aImmutableVisibleFields);
|
|
1543
1494
|
}
|
|
1495
|
+
|
|
1496
|
+
function getRequiredProperties(sPath: any, oMetaModel: any, bCheckUpdateRestrictions: boolean = false) {
|
|
1497
|
+
const aPathParts = sPath.split("/");
|
|
1498
|
+
const aRequiredProperties: any = [];
|
|
1499
|
+
let aRequiredPropertiesWithPaths: any = [];
|
|
1500
|
+
let oEntitySetAnnotations = oMetaModel.getObject(`${sPath}@`);
|
|
1501
|
+
if (aPathParts.length > 2) {
|
|
1502
|
+
const sNavigationPath = aPathParts[aPathParts.length - 1];
|
|
1503
|
+
aPathParts.splice(-1, 1); // removing NavigationProperty from the end.
|
|
1504
|
+
const sParentEntitySetPath = aPathParts.join("/");
|
|
1505
|
+
const oNavigationRestrictions = CommonUtils.getNavigationRestrictions(oMetaModel, sParentEntitySetPath, sNavigationPath);
|
|
1506
|
+
oEntitySetAnnotations = oMetaModel.getObject(`${sParentEntitySetPath}/$NavigationPropertyBinding/${sNavigationPath}@`);
|
|
1507
|
+
if (CommonUtils.hasRestrictedPropertiesInAnnotations(oNavigationRestrictions, true, bCheckUpdateRestrictions)) {
|
|
1508
|
+
aRequiredPropertiesWithPaths = bCheckUpdateRestrictions
|
|
1509
|
+
? oNavigationRestrictions["UpdateRestrictions"].RequiredProperties
|
|
1510
|
+
: oNavigationRestrictions["InsertRestrictions"].RequiredProperties;
|
|
1511
|
+
}
|
|
1512
|
+
if (
|
|
1513
|
+
(!aRequiredPropertiesWithPaths || !aRequiredPropertiesWithPaths.length) &&
|
|
1514
|
+
CommonUtils.hasRestrictedPropertiesInAnnotations(oEntitySetAnnotations, false, bCheckUpdateRestrictions)
|
|
1515
|
+
) {
|
|
1516
|
+
aRequiredPropertiesWithPaths = CommonUtils.getRequiredPropertiesFromAnnotations(
|
|
1517
|
+
oEntitySetAnnotations,
|
|
1518
|
+
bCheckUpdateRestrictions
|
|
1519
|
+
);
|
|
1520
|
+
}
|
|
1521
|
+
} else if (CommonUtils.hasRestrictedPropertiesInAnnotations(oEntitySetAnnotations, false, bCheckUpdateRestrictions)) {
|
|
1522
|
+
aRequiredPropertiesWithPaths = CommonUtils.getRequiredPropertiesFromAnnotations(oEntitySetAnnotations, bCheckUpdateRestrictions);
|
|
1523
|
+
}
|
|
1524
|
+
aRequiredPropertiesWithPaths.forEach(function (oRequiredProperty: any) {
|
|
1525
|
+
const sProperty = oRequiredProperty["$PropertyPath"];
|
|
1526
|
+
aRequiredProperties.push(sProperty);
|
|
1527
|
+
});
|
|
1528
|
+
return aRequiredProperties;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
function getRequiredPropertiesFromInsertRestrictions(sPath: any, oMetaModel: any) {
|
|
1532
|
+
return CommonUtils.getRequiredProperties(sPath, oMetaModel);
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
function getRequiredPropertiesFromUpdateRestrictions(sPath: any, oMetaModel: any) {
|
|
1536
|
+
return CommonUtils.getRequiredProperties(sPath, oMetaModel, true);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
function getRequiredPropertiesFromAnnotations(oAnnotations: any, bCheckUpdateRestrictions: boolean = false) {
|
|
1540
|
+
if (bCheckUpdateRestrictions) {
|
|
1541
|
+
return oAnnotations["@Org.OData.Capabilities.V1.UpdateRestrictions"].RequiredProperties;
|
|
1542
|
+
}
|
|
1543
|
+
return oAnnotations["@Org.OData.Capabilities.V1.InsertRestrictions"].RequiredProperties;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
function hasRestrictedPropertiesInAnnotations(
|
|
1547
|
+
oAnnotations: any,
|
|
1548
|
+
bIsNavigationRestrictions: boolean = false,
|
|
1549
|
+
bCheckUpdateRestrictions: boolean = false
|
|
1550
|
+
) {
|
|
1551
|
+
if (bIsNavigationRestrictions) {
|
|
1552
|
+
if (bCheckUpdateRestrictions) {
|
|
1553
|
+
return oAnnotations && oAnnotations["UpdateRestrictions"] && oAnnotations["UpdateRestrictions"].RequiredProperties
|
|
1554
|
+
? true
|
|
1555
|
+
: false;
|
|
1556
|
+
}
|
|
1557
|
+
return oAnnotations && oAnnotations["InsertRestrictions"] && oAnnotations["InsertRestrictions"].RequiredProperties ? true : false;
|
|
1558
|
+
} else if (bCheckUpdateRestrictions) {
|
|
1559
|
+
return oAnnotations &&
|
|
1560
|
+
oAnnotations["@Org.OData.Capabilities.V1.UpdateRestrictions"] &&
|
|
1561
|
+
oAnnotations["@Org.OData.Capabilities.V1.UpdateRestrictions"].RequiredProperties
|
|
1562
|
+
? true
|
|
1563
|
+
: false;
|
|
1564
|
+
}
|
|
1565
|
+
return oAnnotations &&
|
|
1566
|
+
oAnnotations["@Org.OData.Capabilities.V1.InsertRestrictions"] &&
|
|
1567
|
+
oAnnotations["@Org.OData.Capabilities.V1.InsertRestrictions"].RequiredProperties
|
|
1568
|
+
? true
|
|
1569
|
+
: false;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1544
1572
|
function setUserDefaults(
|
|
1545
1573
|
oAppComponent: AppComponent,
|
|
1546
1574
|
aParameters: any[],
|
|
@@ -1556,7 +1584,7 @@ function setUserDefaults(
|
|
|
1556
1584
|
if (!oShellServices.hasUShell()) {
|
|
1557
1585
|
aParameters.forEach(function (oParameter: any) {
|
|
1558
1586
|
const sPropertyName = bIsAction
|
|
1559
|
-
?
|
|
1587
|
+
? `/${oParameter.$Name}`
|
|
1560
1588
|
: oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
|
|
1561
1589
|
const sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
|
|
1562
1590
|
if (oActionDefaultValues && bIsCreate) {
|
|
@@ -1574,7 +1602,7 @@ function setUserDefaults(
|
|
|
1574
1602
|
aExtendedParameters = (oData.selectionVariant && oData.selectionVariant.SelectOptions) || [];
|
|
1575
1603
|
aParameters.forEach(function (oParameter: any) {
|
|
1576
1604
|
const sPropertyName = bIsAction
|
|
1577
|
-
?
|
|
1605
|
+
? `/${oParameter.$Name}`
|
|
1578
1606
|
: oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
|
|
1579
1607
|
const sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
|
|
1580
1608
|
if (oActionDefaultValues && bIsCreate) {
|
|
@@ -1587,7 +1615,9 @@ function setUserDefaults(
|
|
|
1587
1615
|
for (const i in aExtendedParameters) {
|
|
1588
1616
|
const oExtendedParameter = aExtendedParameters[i];
|
|
1589
1617
|
if (oExtendedParameter.PropertyName === sParameterName) {
|
|
1590
|
-
const oRange = oExtendedParameter.Ranges.length
|
|
1618
|
+
const oRange = oExtendedParameter.Ranges.length
|
|
1619
|
+
? oExtendedParameter.Ranges[oExtendedParameter.Ranges.length - 1]
|
|
1620
|
+
: undefined;
|
|
1591
1621
|
if (oRange && oRange.Sign === "I" && oRange.Option === "EQ") {
|
|
1592
1622
|
oModel.setProperty(sPropertyName, oRange.Low); // high is ignored when Option=EQ
|
|
1593
1623
|
}
|
|
@@ -1678,7 +1708,7 @@ function getHeaderFacetItemConfigForExternalNavigation(oViewData: any, oCrossNav
|
|
|
1678
1708
|
semanticObjectMapping: aSemanticObjectMapping
|
|
1679
1709
|
};
|
|
1680
1710
|
} else {
|
|
1681
|
-
Log.error(
|
|
1711
|
+
Log.error(`Cross navigation outbound is configured without semantic object and action for ${sOutbound}`);
|
|
1682
1712
|
}
|
|
1683
1713
|
}
|
|
1684
1714
|
}
|
|
@@ -1706,9 +1736,9 @@ function setSemanticObjectMappings(oSelectionVariant: any, vMappings: object) {
|
|
|
1706
1736
|
}
|
|
1707
1737
|
function fnGetSemanticObjectsFromPath(oMetaModel: any, sPath: any) {
|
|
1708
1738
|
return new Promise(function (resolve: (value: any) => void) {
|
|
1709
|
-
const sSemanticObject = oMetaModel.getObject(sPath
|
|
1739
|
+
const sSemanticObject = oMetaModel.getObject(`${sPath}@com.sap.vocabularies.Common.v1.SemanticObject`);
|
|
1710
1740
|
const aSemanticObjectUnavailableActions = oMetaModel.getObject(
|
|
1711
|
-
sPath
|
|
1741
|
+
`${sPath}@com.sap.vocabularies.Common.v1.SemanticObjectUnavailableActions`
|
|
1712
1742
|
);
|
|
1713
1743
|
const aSemanticObjectForGetLinks = [{ semanticObject: sSemanticObject }];
|
|
1714
1744
|
const oSemanticObject = {
|
|
@@ -1886,7 +1916,7 @@ function fnGetSemanticTargetsFromPageModel(oController: any, sPageModel: string)
|
|
|
1886
1916
|
element.semanticObject.semanticObject &&
|
|
1887
1917
|
typeof element.semanticObject.semanticObject === "object"
|
|
1888
1918
|
) {
|
|
1889
|
-
sSemObjExpression =
|
|
1919
|
+
sSemObjExpression = compileExpression(pathInModel(element.semanticObject.semanticObject.$Path));
|
|
1890
1920
|
element.semanticObject.semanticObject = sSemObjExpression;
|
|
1891
1921
|
element.semanticObjectForGetLinks[0].semanticObject = sSemObjExpression;
|
|
1892
1922
|
return true;
|
|
@@ -1952,7 +1982,7 @@ function getFilterRestrictions(oFilterRestrictionsAnnotation: any, sRestriction:
|
|
|
1952
1982
|
function getFilterRestrictionsByPath(sEntitySetPath: any, oMetaModel: any) {
|
|
1953
1983
|
const oRet: any = {},
|
|
1954
1984
|
FilterRestrictions = CommonUtils.FilterRestrictions,
|
|
1955
|
-
oFilterRestrictions = sEntitySetPath ? oMetaModel.getObject(sEntitySetPath
|
|
1985
|
+
oFilterRestrictions = sEntitySetPath ? oMetaModel.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.FilterRestrictions`) : {};
|
|
1956
1986
|
oRet[FilterRestrictions.REQUIRED_PROPERTIES] = getFilterRestrictions(oFilterRestrictions, FilterRestrictions.REQUIRED_PROPERTIES) || [];
|
|
1957
1987
|
oRet[FilterRestrictions.NON_FILTERABLE_PROPERTIES] =
|
|
1958
1988
|
getFilterRestrictions(oFilterRestrictions, FilterRestrictions.NON_FILTERABLE_PROPERTIES) || [];
|
|
@@ -2018,10 +2048,10 @@ function getSingletonPath(path: string, metaModel: ODataMetaModel): string | und
|
|
|
2018
2048
|
const parts = path.split("/").filter(Boolean),
|
|
2019
2049
|
propertyName = parts.pop(),
|
|
2020
2050
|
navigationPath = parts.join("/"),
|
|
2021
|
-
entitySet = navigationPath && metaModel.getObject(
|
|
2051
|
+
entitySet = navigationPath && metaModel.getObject(`/${navigationPath}`);
|
|
2022
2052
|
if (entitySet?.$kind === "Singleton") {
|
|
2023
2053
|
const singletonName = parts[parts.length - 1];
|
|
2024
|
-
return
|
|
2054
|
+
return `/${singletonName}/${propertyName}`;
|
|
2025
2055
|
}
|
|
2026
2056
|
return undefined;
|
|
2027
2057
|
}
|
|
@@ -2083,10 +2113,10 @@ function loadMacroLibrary() {
|
|
|
2083
2113
|
function fnOnStrictHandlingFailed(sGroupId: string, actionName: string, oModel: ODataModel, aMessages: any[]) {
|
|
2084
2114
|
const localI18nRef = (Core as CoreEx).getLibraryResourceBundle("sap.fe.core"),
|
|
2085
2115
|
sActionName = actionName,
|
|
2086
|
-
sCancelButtonTxt = localI18nRef.getText("
|
|
2116
|
+
sCancelButtonTxt = localI18nRef.getText("C_COMMON_DIALOG_CANCEL");
|
|
2087
2117
|
if (aMessages.length === 1) {
|
|
2088
|
-
const sMessage = aMessages[0].message
|
|
2089
|
-
|
|
2118
|
+
const sMessage = `${aMessages[0].message}\n${localI18nRef.getText("PROCEED")}`;
|
|
2119
|
+
return new Promise(function (resolve) {
|
|
2090
2120
|
MessageBox.warning(sMessage, {
|
|
2091
2121
|
title: localI18nRef.getText("WARNING"),
|
|
2092
2122
|
actions: [sActionName, sCancelButtonTxt],
|
|
@@ -2101,7 +2131,6 @@ function fnOnStrictHandlingFailed(sGroupId: string, actionName: string, oModel:
|
|
|
2101
2131
|
}
|
|
2102
2132
|
});
|
|
2103
2133
|
});
|
|
2104
|
-
return dialogPromise;
|
|
2105
2134
|
}
|
|
2106
2135
|
return new Promise(function (resolve) {
|
|
2107
2136
|
const oMessageDialogModel = new JSONModel();
|
|
@@ -2144,6 +2173,67 @@ function fnOnStrictHandlingFailed(sGroupId: string, actionName: string, oModel:
|
|
|
2144
2173
|
});
|
|
2145
2174
|
}
|
|
2146
2175
|
|
|
2176
|
+
function getMessageColumn(oControl: any): string {
|
|
2177
|
+
if (!oControl || oControl.isA("sap.ui.core.mvc.XMLView")) {
|
|
2178
|
+
return "";
|
|
2179
|
+
}
|
|
2180
|
+
const headerInfoTitlePath = oControl.getParent().getTableDefinition().headerInfoTitle;
|
|
2181
|
+
const oMetaModel = oControl && oControl.getModel().getMetaModel(),
|
|
2182
|
+
sCurrentEntitySetName = oControl.data("metaPath");
|
|
2183
|
+
const aTechnicalKeys = oMetaModel.getObject(`${sCurrentEntitySetName}/$Type/$Key`);
|
|
2184
|
+
const aFilteredTechnicalKeys: string[] = [];
|
|
2185
|
+
|
|
2186
|
+
aTechnicalKeys.forEach(function (technicalKey: string) {
|
|
2187
|
+
if (technicalKey !== "IsActiveEntity") {
|
|
2188
|
+
aFilteredTechnicalKeys.push(technicalKey);
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
const semanticKeyColumns = oControl.getParent().getTableDefinition().semanticKeys;
|
|
2192
|
+
|
|
2193
|
+
const aVisibleColumns: any = [];
|
|
2194
|
+
const aTableColumns = oControl.getColumns();
|
|
2195
|
+
aTableColumns.forEach(function (oColumn: any) {
|
|
2196
|
+
const columnPathSplit = oColumn.getId().split("::");
|
|
2197
|
+
aVisibleColumns.push(columnPathSplit[columnPathSplit.length - 1]);
|
|
2198
|
+
});
|
|
2199
|
+
let subtitleColumn: string = ""; //set the corressponding subtitle column
|
|
2200
|
+
if (headerInfoTitlePath !== undefined && aVisibleColumns.indexOf(headerInfoTitlePath) !== -1) {
|
|
2201
|
+
subtitleColumn = headerInfoTitlePath;
|
|
2202
|
+
} else if (
|
|
2203
|
+
semanticKeyColumns !== undefined &&
|
|
2204
|
+
semanticKeyColumns.length === 1 &&
|
|
2205
|
+
aVisibleColumns.indexOf(semanticKeyColumns[0]) !== -1
|
|
2206
|
+
) {
|
|
2207
|
+
subtitleColumn = semanticKeyColumns[0];
|
|
2208
|
+
}
|
|
2209
|
+
// set correct context to correct message in message model
|
|
2210
|
+
else if (aFilteredTechnicalKeys !== undefined && aFilteredTechnicalKeys.length === 1) {
|
|
2211
|
+
subtitleColumn = aFilteredTechnicalKeys[0];
|
|
2212
|
+
}
|
|
2213
|
+
return subtitleColumn;
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
function getKeys(oMetaModel: any, sPath: string, sEntitySetName: string): string {
|
|
2217
|
+
const sMetaPath = oMetaModel.getMetaPath(sPath);
|
|
2218
|
+
const aTechnicalKeys = oMetaModel.getObject(`${sMetaPath}/$Type/$Key`);
|
|
2219
|
+
let sKey: string = "";
|
|
2220
|
+
const semanticKey = SemanticKeyHelper.getSemanticKeys(oMetaModel, sEntitySetName);
|
|
2221
|
+
if (semanticKey !== undefined && semanticKey.length === 1) {
|
|
2222
|
+
sKey = semanticKey[0].$PropertyPath;
|
|
2223
|
+
} else if (aTechnicalKeys) {
|
|
2224
|
+
const aFilteredTechnicalKeys: string[] = [];
|
|
2225
|
+
aTechnicalKeys.forEach(function (technicalKey: string) {
|
|
2226
|
+
if (technicalKey !== "IsActiveEntity") {
|
|
2227
|
+
aFilteredTechnicalKeys.push(technicalKey);
|
|
2228
|
+
}
|
|
2229
|
+
});
|
|
2230
|
+
if (aFilteredTechnicalKeys !== undefined && aFilteredTechnicalKeys.length === 1) {
|
|
2231
|
+
sKey = aFilteredTechnicalKeys[0];
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
return sKey;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2147
2237
|
function getMessageStripText(
|
|
2148
2238
|
view: any,
|
|
2149
2239
|
aIgnoredLabels: any,
|
|
@@ -2165,19 +2255,15 @@ function getMessageStripText(
|
|
|
2165
2255
|
} else if (aIgnoredLabels.length === 1 && bIsDraftSupported) {
|
|
2166
2256
|
sText = oResourceBundle.getText("C_MULTIVIZ_CHART_IGNORED_FILTER_DRAFT_DATA");
|
|
2167
2257
|
} else {
|
|
2168
|
-
const sResource =
|
|
2169
|
-
"
|
|
2170
|
-
|
|
2171
|
-
"_IGNORED_FILTER_" +
|
|
2172
|
-
(system.desktop ? "LARGE" : "SMALL");
|
|
2258
|
+
const sResource = `C_LR_MULTIVIZ_CHART_${aIgnoredLabels.length === 1 ? "SINGLE" : "MULTI"}_IGNORED_FILTER_${
|
|
2259
|
+
system.desktop ? "LARGE" : "SMALL"
|
|
2260
|
+
}`;
|
|
2173
2261
|
sText = oResourceBundle.getText(sResource, [aIgnoredLabels.join(", ")]);
|
|
2174
2262
|
}
|
|
2175
2263
|
} else {
|
|
2176
|
-
const sResource =
|
|
2177
|
-
"
|
|
2178
|
-
|
|
2179
|
-
"_IGNORED_FILTER_" +
|
|
2180
|
-
(system.desktop ? "LARGE" : "SMALL"),
|
|
2264
|
+
const sResource = `C_LR_MULTITABLES_${aIgnoredLabels.length === 1 ? "SINGLE" : "MULTI"}_IGNORED_FILTER_${
|
|
2265
|
+
system.desktop ? "LARGE" : "SMALL"
|
|
2266
|
+
}`,
|
|
2181
2267
|
sLocalizedTableTitle = fnGetLocalizedText(sTabTitle, oFilterBar);
|
|
2182
2268
|
sText = oResourceBundle.getText(sResource, [aIgnoredLabels.join(", "), sLocalizedTableTitle]);
|
|
2183
2269
|
}
|
|
@@ -2194,7 +2280,6 @@ const CommonUtils = {
|
|
|
2194
2280
|
updateRelatedAppsDetails: fnUpdateRelatedAppsDetails,
|
|
2195
2281
|
resolveStringtoBoolean: fnResolveStringtoBoolean,
|
|
2196
2282
|
getAppComponent: getAppComponent,
|
|
2197
|
-
processDataLossConfirmation: fnProcessDataLossConfirmation,
|
|
2198
2283
|
getMandatoryFilterFields: fnGetMandatoryFilterFields,
|
|
2199
2284
|
getContextPathProperties: fnGetContextPathProperties,
|
|
2200
2285
|
getParameterInfo: getParameterInfo,
|
|
@@ -2238,11 +2323,17 @@ const CommonUtils = {
|
|
|
2238
2323
|
ALLOWED_EXPRESSIONS: "FilterAllowedExpressions"
|
|
2239
2324
|
},
|
|
2240
2325
|
AllowedExpressionsPrio: ["SingleValue", "MultiValue", "SingleRange", "MultiRange", "SearchExpression", "MultiRangeOrSearchExpression"],
|
|
2241
|
-
fnProcessDataLossOrDraftDiscardConfirmation: fnProcessDataLossOrDraftDiscardConfirmation,
|
|
2242
2326
|
normalizeSearchTerm: normalizeSearchTerm,
|
|
2243
2327
|
fnOnStrictHandlingFailed: fnOnStrictHandlingFailed,
|
|
2244
2328
|
getSingletonPath: getSingletonPath,
|
|
2245
|
-
getMessageStripText: getMessageStripText
|
|
2329
|
+
getMessageStripText: getMessageStripText,
|
|
2330
|
+
getMessageColumn: getMessageColumn,
|
|
2331
|
+
getRequiredPropertiesFromUpdateRestrictions: getRequiredPropertiesFromUpdateRestrictions,
|
|
2332
|
+
getRequiredPropertiesFromInsertRestrictions: getRequiredPropertiesFromInsertRestrictions,
|
|
2333
|
+
hasRestrictedPropertiesInAnnotations: hasRestrictedPropertiesInAnnotations,
|
|
2334
|
+
getRequiredPropertiesFromAnnotations: getRequiredPropertiesFromAnnotations,
|
|
2335
|
+
getRequiredProperties: getRequiredProperties,
|
|
2336
|
+
getKeys: getKeys
|
|
2246
2337
|
};
|
|
2247
2338
|
|
|
2248
2339
|
export default CommonUtils;
|