@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,5 +1,8 @@
|
|
|
1
|
-
import { EntityType, Property, TypeDefinition } from "@sap-ux/
|
|
2
|
-
import {
|
|
1
|
+
import type { EntityType, EnumValue, PathAnnotationExpression, Property, PropertyPath, TypeDefinition } from "@sap-ux/vocabularies-types";
|
|
2
|
+
import type { FilterFunctions } from "@sap-ux/vocabularies-types/vocabularies/Capabilities";
|
|
3
|
+
import type { SemanticKey } from "@sap-ux/vocabularies-types/vocabularies/Common";
|
|
4
|
+
import { CommonAnnotationTerms } from "@sap-ux/vocabularies-types/vocabularies/Common";
|
|
5
|
+
import type {
|
|
3
6
|
CriticalityType,
|
|
4
7
|
DataField,
|
|
5
8
|
DataFieldAbstractTypes,
|
|
@@ -9,70 +12,53 @@ import {
|
|
|
9
12
|
DataFieldTypes,
|
|
10
13
|
DataPoint,
|
|
11
14
|
DataPointTypeTypes,
|
|
12
|
-
EnumValue,
|
|
13
15
|
FieldGroupType,
|
|
14
16
|
LineItem,
|
|
15
|
-
PathAnnotationExpression,
|
|
16
17
|
PresentationVariantTypeTypes,
|
|
17
|
-
PropertyPath,
|
|
18
18
|
SelectionVariantType,
|
|
19
|
-
SelectOptionType
|
|
20
|
-
|
|
21
|
-
} from "@sap-ux/vocabularies-types";
|
|
22
|
-
import {
|
|
23
|
-
import { CommonAnnotationTerms } from "@sap-ux/vocabularies-types/dist/generated/Common";
|
|
24
|
-
import { SemanticKey } from "@sap-ux/vocabularies-types/types/generated/Common";
|
|
19
|
+
SelectOptionType
|
|
20
|
+
} from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
21
|
+
import { UIAnnotationTypes } from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
22
|
+
import type { ComplexPropertyInfo } from "sap/fe/core/converters/annotations/DataField";
|
|
25
23
|
import {
|
|
26
24
|
collectRelatedProperties,
|
|
27
25
|
collectRelatedPropertiesRecursively,
|
|
28
|
-
ComplexPropertyInfo,
|
|
29
26
|
getDataFieldDataType,
|
|
30
27
|
getSemanticObjectPath,
|
|
31
28
|
isDataFieldAlwaysHidden,
|
|
32
29
|
isDataFieldForActionAbstract,
|
|
33
30
|
isDataFieldTypes
|
|
34
31
|
} from "sap/fe/core/converters/annotations/DataField";
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
BaseAction,
|
|
38
|
-
CustomAction,
|
|
39
|
-
getActionsFromManifest,
|
|
40
|
-
isActionNavigable,
|
|
41
|
-
removeDuplicateActions
|
|
42
|
-
} from "sap/fe/core/converters/controls/Common/Action";
|
|
32
|
+
import type { AnnotationAction, BaseAction, CustomAction } from "sap/fe/core/converters/controls/Common/Action";
|
|
33
|
+
import { getActionsFromManifest, isActionNavigable, removeDuplicateActions } from "sap/fe/core/converters/controls/Common/Action";
|
|
43
34
|
import { bindingContextPathVisitor, Entity, UI } from "sap/fe/core/converters/helpers/BindingHelper";
|
|
44
|
-
import { ConfigurableObject, CustomElement
|
|
35
|
+
import type { ConfigurableObject, CustomElement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
36
|
+
import { insertCustomElements, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
45
37
|
import { IssueCategory, IssueCategoryType, IssueSeverity, IssueType } from "sap/fe/core/converters/helpers/IssueManager";
|
|
46
38
|
import { KeyHelper } from "sap/fe/core/converters/helpers/Key";
|
|
47
39
|
import tableFormatters from "sap/fe/core/formatters/TableFormatter";
|
|
48
40
|
import { MessageType } from "sap/fe/core/formatters/TableFormatterTypes";
|
|
41
|
+
import type { BindingToolkitExpression, CompiledBindingToolkitExpression } from "sap/fe/core/helpers/BindingToolkit";
|
|
49
42
|
import {
|
|
50
43
|
and,
|
|
51
|
-
|
|
52
|
-
BindingExpression,
|
|
53
|
-
bindingExpression,
|
|
54
|
-
BindingExpressionExpression,
|
|
55
|
-
compileBinding,
|
|
44
|
+
compileExpression,
|
|
56
45
|
constant,
|
|
57
46
|
equal,
|
|
58
|
-
Expression,
|
|
59
|
-
ExpressionOrPrimitive,
|
|
60
47
|
formatResult,
|
|
48
|
+
getExpressionFromAnnotation,
|
|
61
49
|
ifElse,
|
|
62
50
|
isConstant,
|
|
51
|
+
isPathInModelExpression,
|
|
63
52
|
not,
|
|
64
53
|
or,
|
|
54
|
+
pathInModel,
|
|
65
55
|
resolveBindingString
|
|
66
|
-
} from "sap/fe/core/helpers/
|
|
56
|
+
} from "sap/fe/core/helpers/BindingToolkit";
|
|
67
57
|
import { replaceSpecialChars } from "sap/fe/core/helpers/StableIdHelper";
|
|
68
|
-
import {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
isPathSearchable,
|
|
73
|
-
isPathUpdatable
|
|
74
|
-
} from "sap/fe/core/templating/DataModelPathHelper";
|
|
75
|
-
import { DisplayMode, EDM_TYPE_MAPPING, getDisplayMode } from "sap/fe/core/templating/DisplayModeFormatter";
|
|
58
|
+
import type { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
|
|
59
|
+
import { getTargetObjectPath, isPathDeletable, isPathSearchable, isPathUpdatable } from "sap/fe/core/templating/DataModelPathHelper";
|
|
60
|
+
import type { DisplayMode } from "sap/fe/core/templating/DisplayModeFormatter";
|
|
61
|
+
import { EDM_TYPE_MAPPING, getDisplayMode } from "sap/fe/core/templating/DisplayModeFormatter";
|
|
76
62
|
import { getNonSortablePropertiesRestrictions } from "sap/fe/core/templating/EntitySetHelper";
|
|
77
63
|
import {
|
|
78
64
|
getAssociatedCurrencyProperty,
|
|
@@ -82,30 +68,33 @@ import {
|
|
|
82
68
|
isPathExpression,
|
|
83
69
|
isProperty
|
|
84
70
|
} from "sap/fe/core/templating/PropertyHelper";
|
|
85
|
-
import ConverterContext from "../../ConverterContext";
|
|
71
|
+
import type ConverterContext from "../../ConverterContext";
|
|
86
72
|
import { AggregationHelper } from "../../helpers/Aggregation";
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
ActionType,
|
|
90
|
-
AvailabilityType,
|
|
91
|
-
CreationMode,
|
|
73
|
+
import { getTableID } from "../../helpers/ID";
|
|
74
|
+
import type {
|
|
92
75
|
FormatOptionsType,
|
|
93
|
-
HorizontalAlign,
|
|
94
|
-
Importance,
|
|
95
76
|
ManifestTableColumn,
|
|
96
77
|
NavigationSettingsConfiguration,
|
|
97
78
|
NavigationTargetConfiguration,
|
|
98
|
-
SelectionMode,
|
|
99
79
|
TableColumnSettings,
|
|
100
80
|
TableManifestConfiguration,
|
|
101
81
|
TableManifestSettingsConfiguration,
|
|
82
|
+
ViewPathConfiguration
|
|
83
|
+
} from "../../ManifestSettings";
|
|
84
|
+
import {
|
|
85
|
+
ActionType,
|
|
86
|
+
AvailabilityType,
|
|
87
|
+
CreationMode,
|
|
88
|
+
HorizontalAlign,
|
|
89
|
+
Importance,
|
|
90
|
+
SelectionMode,
|
|
102
91
|
TemplateType,
|
|
103
92
|
VariantManagementType,
|
|
104
|
-
ViewPathConfiguration,
|
|
105
93
|
VisualizationType
|
|
106
94
|
} from "../../ManifestSettings";
|
|
107
|
-
import ManifestWrapper from "../../ManifestWrapper";
|
|
95
|
+
import type ManifestWrapper from "../../ManifestWrapper";
|
|
108
96
|
import { getMessageTypeFromCriticalityType } from "./Criticality";
|
|
97
|
+
import type { StandardActionConfigType } from "./table/StandardActions";
|
|
109
98
|
import {
|
|
110
99
|
generateStandardActionsContext,
|
|
111
100
|
getCreateVisibility,
|
|
@@ -119,8 +108,7 @@ import {
|
|
|
119
108
|
getStandardActionMassEdit,
|
|
120
109
|
getStandardActionPaste,
|
|
121
110
|
isDraftOrStickySupported,
|
|
122
|
-
isInDisplayMode
|
|
123
|
-
StandardActionConfigType
|
|
111
|
+
isInDisplayMode
|
|
124
112
|
} from "./table/StandardActions";
|
|
125
113
|
|
|
126
114
|
export type TableAnnotationConfiguration = {
|
|
@@ -134,9 +122,9 @@ export type TableAnnotationConfiguration = {
|
|
|
134
122
|
row?: {
|
|
135
123
|
action?: string;
|
|
136
124
|
press?: string;
|
|
137
|
-
rowHighlighting:
|
|
138
|
-
rowNavigated:
|
|
139
|
-
visible?:
|
|
125
|
+
rowHighlighting: CompiledBindingToolkitExpression;
|
|
126
|
+
rowNavigated: CompiledBindingToolkitExpression;
|
|
127
|
+
visible?: CompiledBindingToolkitExpression;
|
|
140
128
|
};
|
|
141
129
|
selectionMode: string | undefined;
|
|
142
130
|
standardActions: {
|
|
@@ -217,6 +205,7 @@ export type TableControlConfiguration = {
|
|
|
217
205
|
enableMassEdit: boolean | undefined;
|
|
218
206
|
enableAutoColumnWidth: boolean;
|
|
219
207
|
dataStateIndicatorFilter: string | undefined;
|
|
208
|
+
isCompactType?: boolean;
|
|
220
209
|
};
|
|
221
210
|
|
|
222
211
|
export type TableType = "GridTable" | "ResponsiveTable" | "AnalyticalTable";
|
|
@@ -257,7 +246,7 @@ export type AnnotationTableColumn = BaseTableColumn & {
|
|
|
257
246
|
tooltip?: string;
|
|
258
247
|
groupLabel?: string;
|
|
259
248
|
group?: string;
|
|
260
|
-
FieldGroupHiddenExpressions?:
|
|
249
|
+
FieldGroupHiddenExpressions?: CompiledBindingToolkitExpression;
|
|
261
250
|
showDataFieldsLabel?: boolean;
|
|
262
251
|
isKey?: boolean;
|
|
263
252
|
unit?: string;
|
|
@@ -338,11 +327,11 @@ type SorterType = {
|
|
|
338
327
|
/**
|
|
339
328
|
* Returns an array of all annotation-based and manifest-based table actions.
|
|
340
329
|
*
|
|
341
|
-
* @param
|
|
342
|
-
* @param
|
|
343
|
-
* @param
|
|
344
|
-
* @param
|
|
345
|
-
* @returns
|
|
330
|
+
* @param lineItemAnnotation
|
|
331
|
+
* @param visualizationPath
|
|
332
|
+
* @param converterContext
|
|
333
|
+
* @param navigationSettings
|
|
334
|
+
* @returns The complete table actions
|
|
346
335
|
*/
|
|
347
336
|
export function getTableActions(
|
|
348
337
|
lineItemAnnotation: LineItem,
|
|
@@ -378,11 +367,11 @@ export function getTableActions(
|
|
|
378
367
|
* Returns an array of all columns, annotation-based as well as manifest based.
|
|
379
368
|
* They are sorted and some properties can be overwritten via the manifest (check out the keys that can be overwritten).
|
|
380
369
|
*
|
|
381
|
-
* @param
|
|
382
|
-
* @param
|
|
383
|
-
* @param
|
|
384
|
-
* @param
|
|
385
|
-
* @returns
|
|
370
|
+
* @param lineItemAnnotation Collection of data fields for representation in a table or list
|
|
371
|
+
* @param visualizationPath
|
|
372
|
+
* @param converterContext
|
|
373
|
+
* @param navigationSettings
|
|
374
|
+
* @returns Returns all table columns that should be available, regardless of templating or personalization or their origin
|
|
386
375
|
*/
|
|
387
376
|
export function getTableColumns(
|
|
388
377
|
lineItemAnnotation: LineItem,
|
|
@@ -482,9 +471,9 @@ export const getAggregateDefinitionsFromEntityType = function (
|
|
|
482
471
|
};
|
|
483
472
|
const aContextDefiningProperties: string[] = [];
|
|
484
473
|
aRawContextDefiningProperties.forEach((contextDefiningPropertyName) => {
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
aContextDefiningProperties.push(
|
|
474
|
+
const foundColumn = findColumnFromPath(contextDefiningPropertyName);
|
|
475
|
+
if (foundColumn) {
|
|
476
|
+
aContextDefiningProperties.push(foundColumn.name);
|
|
488
477
|
}
|
|
489
478
|
});
|
|
490
479
|
|
|
@@ -630,7 +619,7 @@ function getSemanticKeysAndTitleInfo(converterContext: ConverterContext) {
|
|
|
630
619
|
?.path;
|
|
631
620
|
const semanticKeyAnnotations: any[] | undefined = converterContext.getAnnotationEntityType()?.annotations?.Common?.SemanticKey;
|
|
632
621
|
|
|
633
|
-
|
|
622
|
+
const semanticKeyColumns: string[] = [];
|
|
634
623
|
if (semanticKeyAnnotations) {
|
|
635
624
|
semanticKeyAnnotations.forEach(function (oColumn: any) {
|
|
636
625
|
semanticKeyColumns.push(oColumn.value);
|
|
@@ -719,7 +708,7 @@ export function createDefaultTableVisualization(converterContext: ConverterConte
|
|
|
719
708
|
*
|
|
720
709
|
* @param lineItemAnnotation The instance of the line item
|
|
721
710
|
* @param converterContext The instance of the converter context
|
|
722
|
-
* @returns
|
|
711
|
+
* @returns The record containing all action names and their corresponding Core.OperationAvailable property paths
|
|
723
712
|
*/
|
|
724
713
|
function getOperationAvailableMap(lineItemAnnotation: LineItem | undefined, converterContext: ConverterContext): Record<string, any> {
|
|
725
714
|
const operationAvailableMap: Record<string, any> = {};
|
|
@@ -740,14 +729,14 @@ function getOperationAvailableMap(lineItemAnnotation: LineItem | undefined, conv
|
|
|
740
729
|
addToMap(actionName, null);
|
|
741
730
|
} else if (actionTarget?.parameters?.length) {
|
|
742
731
|
const bindingParameterFullName = actionTarget.parameters[0].fullyQualifiedName,
|
|
743
|
-
targetExpression =
|
|
732
|
+
targetExpression = getExpressionFromAnnotation(
|
|
744
733
|
actionTarget?.annotations?.Core?.OperationAvailable,
|
|
745
734
|
[],
|
|
746
735
|
undefined,
|
|
747
736
|
(path: string) => bindingContextPathVisitor(path, converterContext, bindingParameterFullName)
|
|
748
|
-
)
|
|
737
|
+
);
|
|
749
738
|
|
|
750
|
-
if (targetExpression
|
|
739
|
+
if (isPathInModelExpression(targetExpression)) {
|
|
751
740
|
addToMap(actionName, targetExpression.path);
|
|
752
741
|
} else if (actionTarget?.annotations?.Core?.OperationAvailable !== undefined) {
|
|
753
742
|
addToMap(actionName, targetExpression);
|
|
@@ -765,7 +754,7 @@ function getOperationAvailableMap(lineItemAnnotation: LineItem | undefined, conv
|
|
|
765
754
|
* Gets updatable propertyPath for the current entityset if valid.
|
|
766
755
|
*
|
|
767
756
|
* @param converterContext The instance of the converter context
|
|
768
|
-
* @returns
|
|
757
|
+
* @returns The updatable property for the rows
|
|
769
758
|
*/
|
|
770
759
|
function getCurrentEntitySetUpdatablePath(converterContext: ConverterContext): string {
|
|
771
760
|
const restrictions = getRestrictions(converterContext);
|
|
@@ -780,9 +769,9 @@ function getCurrentEntitySetUpdatablePath(converterContext: ConverterContext): s
|
|
|
780
769
|
/**
|
|
781
770
|
* Method to retrieve all property paths assigned to the Core.OperationAvailable annotation.
|
|
782
771
|
*
|
|
783
|
-
* @param
|
|
784
|
-
* @param
|
|
785
|
-
* @returns
|
|
772
|
+
* @param operationAvailableMap The record consisting of actions and their Core.OperationAvailable property paths
|
|
773
|
+
* @param converterContext The instance of the converter context
|
|
774
|
+
* @returns The CSV string of all property paths associated with the Core.OperationAvailable annotation
|
|
786
775
|
*/
|
|
787
776
|
function getOperationAvailableProperties(operationAvailableMap: Record<string, any>, converterContext: ConverterContext): string {
|
|
788
777
|
const properties = new Set();
|
|
@@ -826,8 +815,8 @@ function getUIHiddenExpForActionsRequiringContext(
|
|
|
826
815
|
currentEntityType: EntityType,
|
|
827
816
|
contextDataModelObjectPath: DataModelObjectPath,
|
|
828
817
|
isEntitySet: boolean
|
|
829
|
-
):
|
|
830
|
-
const aUiHiddenPathExpressions:
|
|
818
|
+
): BindingToolkitExpression<boolean>[] {
|
|
819
|
+
const aUiHiddenPathExpressions: BindingToolkitExpression<boolean>[] = [];
|
|
831
820
|
lineItemAnnotation.forEach((dataField) => {
|
|
832
821
|
// Check if the lineItem context is the same as that of the action:
|
|
833
822
|
if (
|
|
@@ -870,7 +859,7 @@ function getBindingExpFromContext(
|
|
|
870
859
|
source: DataFieldForAction | DataFieldForIntentBasedNavigation | CustomAction,
|
|
871
860
|
contextDataModelObjectPath: DataModelObjectPath,
|
|
872
861
|
isEntitySet: boolean
|
|
873
|
-
):
|
|
862
|
+
): BindingToolkitExpression<any> {
|
|
874
863
|
let sExpression: any | undefined;
|
|
875
864
|
if (
|
|
876
865
|
(source as DataFieldForAction)?.$Type === UIAnnotationTypes.DataFieldForAction ||
|
|
@@ -898,13 +887,13 @@ function getBindingExpFromContext(
|
|
|
898
887
|
contextDataModelObjectPath?.targetObject?._type === "NavigationProperty" &&
|
|
899
888
|
contextDataModelObjectPath.targetObject.partner === sNavigationPath
|
|
900
889
|
) {
|
|
901
|
-
return
|
|
890
|
+
return pathInModel(aSplitPath.slice(1).join("/"));
|
|
902
891
|
} else {
|
|
903
892
|
return constant(true);
|
|
904
893
|
}
|
|
905
894
|
// In case there is no navigation property, if it's an entitySet, the expression binding has to be returned:
|
|
906
895
|
} else if (isEntitySet) {
|
|
907
|
-
return
|
|
896
|
+
return pathInModel(sPath);
|
|
908
897
|
// otherwise the expression binding cannot be taken into account for the selection mode evaluation:
|
|
909
898
|
} else {
|
|
910
899
|
return constant(true);
|
|
@@ -919,7 +908,7 @@ function getBindingExpFromContext(
|
|
|
919
908
|
*
|
|
920
909
|
* @param lineItemAnnotation Collection of data fields for representation in a table or list
|
|
921
910
|
* @param currentEntityType Current Entity Type
|
|
922
|
-
* @returns
|
|
911
|
+
* @returns `true` if there is at least 1 action that meets the criteria
|
|
923
912
|
*/
|
|
924
913
|
function hasBoundActionsAlwaysVisibleInToolBar(lineItemAnnotation: LineItem, currentEntityType: EntityType): boolean {
|
|
925
914
|
return lineItemAnnotation.some((dataField) => {
|
|
@@ -957,8 +946,8 @@ function hasCustomActionsAlwaysVisibleInToolBar(manifestActions: Record<string,
|
|
|
957
946
|
* @param manifestActions The actions defined in the manifest
|
|
958
947
|
* @returns Array<Expression<boolean>> All the visible path expressions of the actions that meet the criteria
|
|
959
948
|
*/
|
|
960
|
-
function getVisibleExpForCustomActionsRequiringContext(manifestActions: Record<string, CustomAction>):
|
|
961
|
-
const aVisiblePathExpressions:
|
|
949
|
+
function getVisibleExpForCustomActionsRequiringContext(manifestActions: Record<string, CustomAction>): BindingToolkitExpression<boolean>[] {
|
|
950
|
+
const aVisiblePathExpressions: BindingToolkitExpression<boolean>[] = [];
|
|
962
951
|
if (manifestActions) {
|
|
963
952
|
Object.keys(manifestActions).forEach((actionKey) => {
|
|
964
953
|
const action = manifestActions[actionKey];
|
|
@@ -982,7 +971,7 @@ function getVisibleExpForCustomActionsRequiringContext(manifestActions: Record<s
|
|
|
982
971
|
* Evaluate if the path is statically deletable or updatable.
|
|
983
972
|
*
|
|
984
973
|
* @param converterContext
|
|
985
|
-
* @returns
|
|
974
|
+
* @returns The table capabilities
|
|
986
975
|
*/
|
|
987
976
|
export function getCapabilityRestriction(converterContext: ConverterContext): TableCapabilityRestriction {
|
|
988
977
|
const isDeletable = isPathDeletable(converterContext.getDataModelObjectPath());
|
|
@@ -999,16 +988,16 @@ export function getSelectionMode(
|
|
|
999
988
|
converterContext: ConverterContext,
|
|
1000
989
|
isEntitySet: boolean,
|
|
1001
990
|
targetCapabilities: TableCapabilityRestriction,
|
|
1002
|
-
deleteButtonVisibilityExpression?:
|
|
1003
|
-
massEditVisibilityExpression:
|
|
991
|
+
deleteButtonVisibilityExpression?: BindingToolkitExpression<boolean>,
|
|
992
|
+
massEditVisibilityExpression: BindingToolkitExpression<boolean> = constant(false)
|
|
1004
993
|
): string | undefined {
|
|
1005
994
|
if (!lineItemAnnotation) {
|
|
1006
995
|
return SelectionMode.None;
|
|
1007
996
|
}
|
|
1008
997
|
const tableManifestSettings = converterContext.getManifestControlConfiguration(visualizationPath);
|
|
1009
998
|
let selectionMode = tableManifestSettings.tableSettings?.selectionMode;
|
|
1010
|
-
let aHiddenBindingExpressions:
|
|
1011
|
-
aVisibleBindingExpressions:
|
|
999
|
+
let aHiddenBindingExpressions: BindingToolkitExpression<boolean>[] = [],
|
|
1000
|
+
aVisibleBindingExpressions: BindingToolkitExpression<boolean>[] = [];
|
|
1012
1001
|
const manifestActions = getActionsFromManifest(
|
|
1013
1002
|
converterContext.getManifestControlConfiguration(visualizationPath).actions,
|
|
1014
1003
|
converterContext,
|
|
@@ -1019,14 +1008,14 @@ export function getSelectionMode(
|
|
|
1019
1008
|
let isParentDeletable, parentEntitySetDeletable;
|
|
1020
1009
|
if (converterContext.getTemplateType() === TemplateType.ObjectPage) {
|
|
1021
1010
|
isParentDeletable = isPathDeletable(converterContext.getDataModelObjectPath());
|
|
1022
|
-
parentEntitySetDeletable = isParentDeletable ?
|
|
1011
|
+
parentEntitySetDeletable = isParentDeletable ? compileExpression(isParentDeletable, true) : isParentDeletable;
|
|
1023
1012
|
}
|
|
1024
1013
|
|
|
1025
1014
|
const bMassEditEnabled: boolean = !isConstant(massEditVisibilityExpression) || massEditVisibilityExpression.value !== false;
|
|
1026
1015
|
if (selectionMode && selectionMode === SelectionMode.None && deleteButtonVisibilityExpression) {
|
|
1027
1016
|
if (converterContext.getTemplateType() === TemplateType.ObjectPage && bMassEditEnabled) {
|
|
1028
1017
|
// Mass Edit in OP is enabled only in edit mode.
|
|
1029
|
-
return
|
|
1018
|
+
return compileExpression(
|
|
1030
1019
|
ifElse(
|
|
1031
1020
|
and(UI.IsEditable, massEditVisibilityExpression),
|
|
1032
1021
|
constant("Multi"),
|
|
@@ -1037,7 +1026,7 @@ export function getSelectionMode(
|
|
|
1037
1026
|
return SelectionMode.Multi;
|
|
1038
1027
|
}
|
|
1039
1028
|
|
|
1040
|
-
return
|
|
1029
|
+
return compileExpression(ifElse(deleteButtonVisibilityExpression, constant("Multi"), constant("None")));
|
|
1041
1030
|
}
|
|
1042
1031
|
if (!selectionMode || selectionMode === SelectionMode.Auto) {
|
|
1043
1032
|
selectionMode = SelectionMode.Multi;
|
|
@@ -1075,7 +1064,7 @@ export function getSelectionMode(
|
|
|
1075
1064
|
deleteButtonVisibilityExpression || true, // default delete visibility as true
|
|
1076
1065
|
massEditVisibilityExpression
|
|
1077
1066
|
);
|
|
1078
|
-
return
|
|
1067
|
+
return compileExpression(
|
|
1079
1068
|
ifElse(and(UI.IsEditable, buttonVisibilityExpression), constant(selectionMode), constant(SelectionMode.None))
|
|
1080
1069
|
);
|
|
1081
1070
|
} else {
|
|
@@ -1086,7 +1075,7 @@ export function getSelectionMode(
|
|
|
1086
1075
|
// example: LR scenario
|
|
1087
1076
|
return selectionMode;
|
|
1088
1077
|
} else if (targetCapabilities.isDeletable && deleteButtonVisibilityExpression) {
|
|
1089
|
-
return
|
|
1078
|
+
return compileExpression(ifElse(deleteButtonVisibilityExpression, constant(selectionMode), constant("None")));
|
|
1090
1079
|
// EntitySet not deletable:
|
|
1091
1080
|
} else {
|
|
1092
1081
|
return SelectionMode.None;
|
|
@@ -1101,7 +1090,7 @@ export function getSelectionMode(
|
|
|
1101
1090
|
massEditVisibilityExpression,
|
|
1102
1091
|
constant(true)
|
|
1103
1092
|
);
|
|
1104
|
-
return
|
|
1093
|
+
return compileExpression(
|
|
1105
1094
|
ifElse(
|
|
1106
1095
|
and(UI.IsEditable, editModebuttonVisibilityExpression),
|
|
1107
1096
|
constant(selectionMode),
|
|
@@ -1113,7 +1102,7 @@ export function getSelectionMode(
|
|
|
1113
1102
|
)
|
|
1114
1103
|
);
|
|
1115
1104
|
} else {
|
|
1116
|
-
return
|
|
1105
|
+
return compileExpression(
|
|
1117
1106
|
ifElse(
|
|
1118
1107
|
or(...aHiddenBindingExpressions.concat(aVisibleBindingExpressions)),
|
|
1119
1108
|
constant(selectionMode),
|
|
@@ -1127,7 +1116,7 @@ export function getSelectionMode(
|
|
|
1127
1116
|
return selectionMode;
|
|
1128
1117
|
//EntitySet not deletable:
|
|
1129
1118
|
} else {
|
|
1130
|
-
return
|
|
1119
|
+
return compileExpression(
|
|
1131
1120
|
ifElse(
|
|
1132
1121
|
or(...aHiddenBindingExpressions.concat(aVisibleBindingExpressions), massEditVisibilityExpression),
|
|
1133
1122
|
constant(selectionMode),
|
|
@@ -1143,7 +1132,7 @@ export function getSelectionMode(
|
|
|
1143
1132
|
* @param lineItemAnnotation
|
|
1144
1133
|
* @param visualizationPath
|
|
1145
1134
|
* @param converterContext
|
|
1146
|
-
* @returns
|
|
1135
|
+
* @returns The table annotation actions
|
|
1147
1136
|
*/
|
|
1148
1137
|
function getTableAnnotationActions(lineItemAnnotation: LineItem, visualizationPath: string, converterContext: ConverterContext) {
|
|
1149
1138
|
const tableActions: BaseAction[] = [];
|
|
@@ -1164,10 +1153,10 @@ function getTableAnnotationActions(lineItemAnnotation: LineItem, visualizationPa
|
|
|
1164
1153
|
type: ActionType.DataFieldForAction,
|
|
1165
1154
|
annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
|
|
1166
1155
|
key: key,
|
|
1167
|
-
visible:
|
|
1156
|
+
visible: compileExpression(
|
|
1168
1157
|
not(
|
|
1169
1158
|
equal(
|
|
1170
|
-
|
|
1159
|
+
getExpressionFromAnnotation(
|
|
1171
1160
|
dataField.annotations?.UI?.Hidden,
|
|
1172
1161
|
[],
|
|
1173
1162
|
undefined,
|
|
@@ -1186,10 +1175,10 @@ function getTableAnnotationActions(lineItemAnnotation: LineItem, visualizationPa
|
|
|
1186
1175
|
type: ActionType.DataFieldForIntentBasedNavigation,
|
|
1187
1176
|
annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
|
|
1188
1177
|
key: key,
|
|
1189
|
-
visible:
|
|
1178
|
+
visible: compileExpression(
|
|
1190
1179
|
not(
|
|
1191
1180
|
equal(
|
|
1192
|
-
|
|
1181
|
+
getExpressionFromAnnotation(
|
|
1193
1182
|
dataField.annotations?.UI?.Hidden,
|
|
1194
1183
|
[],
|
|
1195
1184
|
undefined,
|
|
@@ -1225,11 +1214,11 @@ function getHighlightRowBinding(
|
|
|
1225
1214
|
criticalityAnnotation: PathAnnotationExpression<CriticalityType> | EnumValue<CriticalityType> | undefined,
|
|
1226
1215
|
isDraftRoot: boolean,
|
|
1227
1216
|
targetEntityType?: EntityType
|
|
1228
|
-
):
|
|
1229
|
-
let defaultHighlightRowDefinition: MessageType |
|
|
1217
|
+
): BindingToolkitExpression<MessageType> {
|
|
1218
|
+
let defaultHighlightRowDefinition: MessageType | BindingToolkitExpression<MessageType> = MessageType.None;
|
|
1230
1219
|
if (criticalityAnnotation) {
|
|
1231
1220
|
if (typeof criticalityAnnotation === "object") {
|
|
1232
|
-
defaultHighlightRowDefinition =
|
|
1221
|
+
defaultHighlightRowDefinition = getExpressionFromAnnotation(criticalityAnnotation) as BindingToolkitExpression<MessageType>;
|
|
1233
1222
|
} else {
|
|
1234
1223
|
// Enum Value so we get the corresponding static part
|
|
1235
1224
|
defaultHighlightRowDefinition = getMessageTypeFromCriticalityType(criticalityAnnotation);
|
|
@@ -1239,14 +1228,14 @@ function getHighlightRowBinding(
|
|
|
1239
1228
|
const aMissingKeys: any[] = [];
|
|
1240
1229
|
targetEntityType?.keys.forEach((key: any) => {
|
|
1241
1230
|
if (key.name !== "IsActiveEntity") {
|
|
1242
|
-
aMissingKeys.push(
|
|
1231
|
+
aMissingKeys.push(pathInModel(key.name, undefined));
|
|
1243
1232
|
}
|
|
1244
1233
|
});
|
|
1245
1234
|
|
|
1246
1235
|
return formatResult(
|
|
1247
1236
|
[
|
|
1248
1237
|
defaultHighlightRowDefinition,
|
|
1249
|
-
|
|
1238
|
+
pathInModel(`filteredMessages`, "internal"),
|
|
1250
1239
|
isDraftRoot && Entity.HasActive,
|
|
1251
1240
|
isDraftRoot && Entity.IsActive,
|
|
1252
1241
|
`${isDraftRoot}`,
|
|
@@ -1322,7 +1311,7 @@ const _getRowConfigurationProperty = function (
|
|
|
1322
1311
|
targetPath: string
|
|
1323
1312
|
) {
|
|
1324
1313
|
let pressProperty, navigationTarget;
|
|
1325
|
-
let criticalityProperty:
|
|
1314
|
+
let criticalityProperty: BindingToolkitExpression<MessageType> = constant(MessageType.None);
|
|
1326
1315
|
const targetEntityType = converterContext.getEntityType();
|
|
1327
1316
|
if (navigationSettings && lineItemAnnotation) {
|
|
1328
1317
|
navigationTarget = navigationSettings.display?.target || navigationSettings.detail?.outbound;
|
|
@@ -1351,17 +1340,17 @@ const _getRowConfigurationProperty = function (
|
|
|
1351
1340
|
}
|
|
1352
1341
|
}
|
|
1353
1342
|
}
|
|
1354
|
-
const rowNavigatedExpression:
|
|
1355
|
-
[
|
|
1343
|
+
const rowNavigatedExpression: BindingToolkitExpression<boolean> = formatResult(
|
|
1344
|
+
[pathInModel("/deepestPath", "internal")],
|
|
1356
1345
|
tableFormatters.navigatedRow,
|
|
1357
1346
|
targetEntityType
|
|
1358
1347
|
);
|
|
1359
1348
|
return {
|
|
1360
1349
|
press: pressProperty,
|
|
1361
1350
|
action: pressProperty ? "Navigation" : undefined,
|
|
1362
|
-
rowHighlighting:
|
|
1363
|
-
rowNavigated:
|
|
1364
|
-
visible:
|
|
1351
|
+
rowHighlighting: compileExpression(criticalityProperty),
|
|
1352
|
+
rowNavigated: compileExpression(rowNavigatedExpression),
|
|
1353
|
+
visible: compileExpression(not(UI.IsInactive))
|
|
1365
1354
|
};
|
|
1366
1355
|
};
|
|
1367
1356
|
|
|
@@ -1374,7 +1363,7 @@ const _getRowConfigurationProperty = function (
|
|
|
1374
1363
|
* @param nonSortableColumns The array of all non sortable column names.
|
|
1375
1364
|
* @param converterContext The converter context.
|
|
1376
1365
|
* @param tableType The table type.
|
|
1377
|
-
* @returns
|
|
1366
|
+
* @returns The column from the entityType
|
|
1378
1367
|
*/
|
|
1379
1368
|
export const getColumnsFromEntityType = function (
|
|
1380
1369
|
columnsToBeCreated: Record<string, Property>,
|
|
@@ -1468,15 +1457,16 @@ export const getColumnsFromEntityType = function (
|
|
|
1468
1457
|
|
|
1469
1458
|
/**
|
|
1470
1459
|
* Create a column definition from a property.
|
|
1471
|
-
*
|
|
1472
|
-
* @param
|
|
1473
|
-
* @param
|
|
1474
|
-
* @param
|
|
1475
|
-
* @param
|
|
1476
|
-
* @param
|
|
1477
|
-
* @param
|
|
1478
|
-
* @param
|
|
1479
|
-
* @
|
|
1460
|
+
*
|
|
1461
|
+
* @param property Entity type property for which the column is created
|
|
1462
|
+
* @param fullPropertyPath The full path to the target property
|
|
1463
|
+
* @param relativePath The relative path to the target property based on the context
|
|
1464
|
+
* @param useDataFieldPrefix Should be prefixed with "DataField::", else it will be prefixed with "Property::"
|
|
1465
|
+
* @param availableForAdaptation Decides whether the column should be available for adaptation
|
|
1466
|
+
* @param nonSortableColumns The array of all non-sortable column names
|
|
1467
|
+
* @param aggregationHelper The aggregationHelper for the entity
|
|
1468
|
+
* @param converterContext The converter context
|
|
1469
|
+
* @returns The annotation column definition
|
|
1480
1470
|
*/
|
|
1481
1471
|
const getColumnDefinitionFromProperty = function (
|
|
1482
1472
|
property: Property,
|
|
@@ -1488,7 +1478,7 @@ const getColumnDefinitionFromProperty = function (
|
|
|
1488
1478
|
aggregationHelper: AggregationHelper,
|
|
1489
1479
|
converterContext: ConverterContext
|
|
1490
1480
|
): AnnotationTableColumn {
|
|
1491
|
-
const name = useDataFieldPrefix ? relativePath :
|
|
1481
|
+
const name = useDataFieldPrefix ? relativePath : `Property::${relativePath}`;
|
|
1492
1482
|
const key = (useDataFieldPrefix ? "DataField::" : "Property::") + replaceSpecialChars(relativePath);
|
|
1493
1483
|
const semanticObjectAnnotationPath = getSemanticObjectPath(converterContext, property);
|
|
1494
1484
|
const isHidden = property.annotations?.UI?.Hidden?.valueOf() === true;
|
|
@@ -1575,8 +1565,8 @@ const getColumnDefinitionFromProperty = function (
|
|
|
1575
1565
|
/**
|
|
1576
1566
|
* Returns Boolean true for valid columns, false for invalid columns.
|
|
1577
1567
|
*
|
|
1578
|
-
* @param
|
|
1579
|
-
* @returns
|
|
1568
|
+
* @param dataField Different DataField types defined in the annotations
|
|
1569
|
+
* @returns True for valid columns, false for invalid columns
|
|
1580
1570
|
* @private
|
|
1581
1571
|
*/
|
|
1582
1572
|
const _isValidColumn = function (dataField: DataFieldAbstractTypes) {
|
|
@@ -1596,23 +1586,20 @@ const _isValidColumn = function (dataField: DataFieldAbstractTypes) {
|
|
|
1596
1586
|
// throw new Error("Unhandled DataField Abstract type: " + dataField.$Type);
|
|
1597
1587
|
}
|
|
1598
1588
|
};
|
|
1599
|
-
|
|
1600
1589
|
/**
|
|
1601
1590
|
* Returns the binding expression to evaluate the visibility of a DataField or DataPoint annotation.
|
|
1602
1591
|
*
|
|
1603
1592
|
* SAP Fiori elements will evaluate either the UI.Hidden annotation defined on the annotation itself or on the target property.
|
|
1604
1593
|
*
|
|
1605
|
-
* @param
|
|
1606
|
-
* @param
|
|
1607
|
-
* @param
|
|
1608
|
-
* @
|
|
1609
|
-
* @returns {BindingExpression<string>} An expression that you can bind to the UI.
|
|
1594
|
+
* @param dataFieldModelPath The metapath referring to the annotation that is evaluated by SAP Fiori elements.
|
|
1595
|
+
* @param [formatOptions] FormatOptions optional.
|
|
1596
|
+
* @param formatOptions.isAnalytics This flag is used to check if the analytic table has GroupHeader expanded.
|
|
1597
|
+
* @returns An expression that you can bind to the UI.
|
|
1610
1598
|
*/
|
|
1611
1599
|
export const _getVisibleExpression = function (
|
|
1612
1600
|
dataFieldModelPath: DataModelObjectPath,
|
|
1613
|
-
formatOptions?: any
|
|
1614
|
-
|
|
1615
|
-
): BindingExpression<string> {
|
|
1601
|
+
formatOptions?: any
|
|
1602
|
+
): BindingToolkitExpression<any> {
|
|
1616
1603
|
const targetObject: DataFieldAbstractTypes | DataPointTypeTypes = dataFieldModelPath.targetObject;
|
|
1617
1604
|
let propertyValue;
|
|
1618
1605
|
if (targetObject) {
|
|
@@ -1644,41 +1631,43 @@ export const _getVisibleExpression = function (
|
|
|
1644
1631
|
// - the UI.Hidden expression in the original annotation does not evaluate to 'true'
|
|
1645
1632
|
// - the UI.Hidden expression in the target property does not evaluate to 'true'
|
|
1646
1633
|
// - in case of Analytics it's not visible for an expanded GroupHeader
|
|
1647
|
-
|
|
1634
|
+
return and(
|
|
1648
1635
|
...[
|
|
1649
|
-
not(equal(
|
|
1650
|
-
ifElse(
|
|
1636
|
+
not(equal(getExpressionFromAnnotation(targetObject?.annotations?.UI?.Hidden), true)),
|
|
1637
|
+
ifElse(
|
|
1638
|
+
!!propertyValue,
|
|
1639
|
+
propertyValue && not(equal(getExpressionFromAnnotation(propertyValue.annotations?.UI?.Hidden), true)),
|
|
1640
|
+
true
|
|
1641
|
+
),
|
|
1651
1642
|
or(not(isAnalyticalGroupHeaderExpanded), isAnalyticalLeaf)
|
|
1652
1643
|
]
|
|
1653
1644
|
);
|
|
1654
|
-
return returnExpression ? (expression as any as BindingExpression<string>) : compileBinding(expression);
|
|
1655
1645
|
};
|
|
1656
1646
|
|
|
1657
1647
|
/**
|
|
1658
1648
|
* Returns hidden binding expressions for a field group.
|
|
1659
|
-
*
|
|
1660
|
-
* @param
|
|
1661
|
-
* @param
|
|
1662
|
-
* @
|
|
1649
|
+
*
|
|
1650
|
+
* @param dataFieldGroup DataField defined in the annotations
|
|
1651
|
+
* @param fieldFormatOptions FormatOptions optional.
|
|
1652
|
+
* @param fieldFormatOptions.isAnalytics This flag is used to check if the analytic table has GroupHeader expanded.
|
|
1653
|
+
* @returns Compile binding of field group expressions.
|
|
1663
1654
|
* @private
|
|
1664
1655
|
*/
|
|
1665
1656
|
const _getFieldGroupHiddenExpressions = function (
|
|
1666
1657
|
dataFieldGroup: DataFieldAbstractTypes,
|
|
1667
1658
|
fieldFormatOptions: any
|
|
1668
|
-
):
|
|
1669
|
-
const aFieldGroupHiddenExpressions:
|
|
1659
|
+
): CompiledBindingToolkitExpression | undefined {
|
|
1660
|
+
const aFieldGroupHiddenExpressions: BindingToolkitExpression<any>[] = [];
|
|
1670
1661
|
if (
|
|
1671
1662
|
dataFieldGroup.$Type === UIAnnotationTypes.DataFieldForAnnotation &&
|
|
1672
1663
|
dataFieldGroup.Target?.$target?.$Type === UIAnnotationTypes.FieldGroupType
|
|
1673
1664
|
) {
|
|
1674
1665
|
dataFieldGroup.Target.$target.Data?.forEach((innerDataField: DataFieldAbstractTypes | DataPointTypeTypes) => {
|
|
1675
1666
|
aFieldGroupHiddenExpressions.push(
|
|
1676
|
-
_getVisibleExpression({ targetObject: innerDataField } as DataModelObjectPath, fieldFormatOptions
|
|
1667
|
+
_getVisibleExpression({ targetObject: innerDataField } as DataModelObjectPath, fieldFormatOptions)
|
|
1677
1668
|
);
|
|
1678
1669
|
});
|
|
1679
|
-
return
|
|
1680
|
-
ifElse(or(...(aFieldGroupHiddenExpressions as any as ExpressionOrPrimitive<boolean>[])), constant(true), constant(false))
|
|
1681
|
-
);
|
|
1670
|
+
return compileExpression(ifElse(or(...aFieldGroupHiddenExpressions), constant(true), constant(false)));
|
|
1682
1671
|
} else {
|
|
1683
1672
|
return undefined;
|
|
1684
1673
|
}
|
|
@@ -1686,9 +1675,10 @@ const _getFieldGroupHiddenExpressions = function (
|
|
|
1686
1675
|
|
|
1687
1676
|
/**
|
|
1688
1677
|
* Returns the label for the property and dataField.
|
|
1689
|
-
*
|
|
1678
|
+
*
|
|
1679
|
+
* @param [property] Property or DataField defined in the annotations
|
|
1690
1680
|
* @param isGroup
|
|
1691
|
-
* @returns
|
|
1681
|
+
* @returns Label of the property or DataField
|
|
1692
1682
|
* @private
|
|
1693
1683
|
*/
|
|
1694
1684
|
const _getLabel = function (property: DataFieldAbstractTypes | Property, isGroup: boolean = false): string | undefined {
|
|
@@ -1698,26 +1688,26 @@ const _getLabel = function (property: DataFieldAbstractTypes | Property, isGroup
|
|
|
1698
1688
|
if (isProperty(property)) {
|
|
1699
1689
|
const dataFieldDefault = property.annotations?.UI?.DataFieldDefault;
|
|
1700
1690
|
if (dataFieldDefault && !dataFieldDefault.qualifier && dataFieldDefault.Label?.valueOf()) {
|
|
1701
|
-
return
|
|
1691
|
+
return compileExpression(getExpressionFromAnnotation(dataFieldDefault.Label?.valueOf()));
|
|
1702
1692
|
}
|
|
1703
|
-
return
|
|
1693
|
+
return compileExpression(getExpressionFromAnnotation(property.annotations.Common?.Label?.valueOf() || property.name));
|
|
1704
1694
|
} else if (isDataFieldTypes(property)) {
|
|
1705
1695
|
if (!!isGroup && property.$Type === UIAnnotationTypes.DataFieldWithIntentBasedNavigation) {
|
|
1706
|
-
return
|
|
1696
|
+
return compileExpression(getExpressionFromAnnotation(property.Label?.valueOf()));
|
|
1707
1697
|
}
|
|
1708
|
-
return
|
|
1709
|
-
|
|
1698
|
+
return compileExpression(
|
|
1699
|
+
getExpressionFromAnnotation(
|
|
1710
1700
|
property.Label?.valueOf() || property.Value?.$target?.annotations?.Common?.Label?.valueOf() || property.Value?.$target?.name
|
|
1711
1701
|
)
|
|
1712
1702
|
);
|
|
1713
1703
|
} else if (property.$Type === UIAnnotationTypes.DataFieldForAnnotation) {
|
|
1714
|
-
return
|
|
1715
|
-
|
|
1704
|
+
return compileExpression(
|
|
1705
|
+
getExpressionFromAnnotation(
|
|
1716
1706
|
property.Label?.valueOf() || (property.Target?.$target as DataPoint)?.Value?.$target?.annotations?.Common?.Label?.valueOf()
|
|
1717
1707
|
)
|
|
1718
1708
|
);
|
|
1719
1709
|
} else {
|
|
1720
|
-
return
|
|
1710
|
+
return compileExpression(getExpressionFromAnnotation(property.Label?.valueOf()));
|
|
1721
1711
|
}
|
|
1722
1712
|
};
|
|
1723
1713
|
|
|
@@ -1728,36 +1718,36 @@ const _getTooltip = function (source: DataFieldAbstractTypes | Property): string
|
|
|
1728
1718
|
|
|
1729
1719
|
if (isProperty(source)) {
|
|
1730
1720
|
return source.annotations.Common?.QuickInfo
|
|
1731
|
-
?
|
|
1721
|
+
? compileExpression(getExpressionFromAnnotation(source.annotations.Common.QuickInfo.valueOf()))
|
|
1732
1722
|
: undefined;
|
|
1733
1723
|
} else if (isDataFieldTypes(source)) {
|
|
1734
1724
|
return source.Value?.$target?.annotations?.Common?.QuickInfo
|
|
1735
|
-
?
|
|
1725
|
+
? compileExpression(getExpressionFromAnnotation(source.Value.$target.annotations.Common.QuickInfo.valueOf()))
|
|
1736
1726
|
: undefined;
|
|
1737
1727
|
} else if (source.$Type === UIAnnotationTypes.DataFieldForAnnotation) {
|
|
1738
1728
|
const datapointTarget = source.Target?.$target as DataPoint;
|
|
1739
1729
|
return datapointTarget?.Value?.$target?.annotations?.Common?.QuickInfo
|
|
1740
|
-
?
|
|
1730
|
+
? compileExpression(getExpressionFromAnnotation(datapointTarget.Value.$target.annotations.Common.QuickInfo.valueOf()))
|
|
1741
1731
|
: undefined;
|
|
1742
1732
|
} else {
|
|
1743
1733
|
return undefined;
|
|
1744
1734
|
}
|
|
1745
1735
|
};
|
|
1746
|
-
export function getRowStatusVisibility():
|
|
1736
|
+
export function getRowStatusVisibility(): BindingToolkitExpression<boolean> {
|
|
1747
1737
|
return formatResult(
|
|
1748
|
-
[
|
|
1738
|
+
[pathInModel(`semanticKeyHasDraftIndicator`, "internal"), pathInModel(`filteredMessages`, "internal")],
|
|
1749
1739
|
tableFormatters.getErrorStatusTextVisibilityFormatter
|
|
1750
1740
|
);
|
|
1751
1741
|
}
|
|
1752
1742
|
/**
|
|
1753
1743
|
* Creates a PropertyInfo for each identified property consumed by a LineItem.
|
|
1754
1744
|
*
|
|
1755
|
-
* @param
|
|
1745
|
+
* @param columnsToBeCreated Identified properties.
|
|
1756
1746
|
* @param existingColumns The list of columns created for LineItems and Properties of entityType.
|
|
1757
1747
|
* @param nonSortableColumns The array of column names which cannot be sorted.
|
|
1758
1748
|
* @param converterContext The converter context.
|
|
1759
1749
|
* @param entityType The entity type for the LineItem
|
|
1760
|
-
* @returns
|
|
1750
|
+
* @returns The array of columns created.
|
|
1761
1751
|
*/
|
|
1762
1752
|
const _createRelatedColumns = function (
|
|
1763
1753
|
columnsToBeCreated: Record<string, Property>,
|
|
@@ -1798,7 +1788,7 @@ const _createRelatedColumns = function (
|
|
|
1798
1788
|
// Case 3: This is a self reference from an existing column and
|
|
1799
1789
|
// both cases require a dummy PropertyInfo for setting correct export settings.
|
|
1800
1790
|
|
|
1801
|
-
const newName =
|
|
1791
|
+
const newName = `Property::${name}`;
|
|
1802
1792
|
|
|
1803
1793
|
// Checking whether the related property column has already been created in a previous iteration.
|
|
1804
1794
|
if (!existingColumns.some((column) => column.name === newName)) {
|
|
@@ -1838,8 +1828,8 @@ const _createRelatedColumns = function (
|
|
|
1838
1828
|
* If it points to a DataField with one property or DataPoint with one property, it will use the property name
|
|
1839
1829
|
* here to be consistent with the existing flex changes.
|
|
1840
1830
|
*
|
|
1841
|
-
* @param
|
|
1842
|
-
* @returns
|
|
1831
|
+
* @param dataField Different DataField types defined in the annotations
|
|
1832
|
+
* @returns The name of annotation columns
|
|
1843
1833
|
* @private
|
|
1844
1834
|
*/
|
|
1845
1835
|
const _getAnnotationColumnName = function (dataField: DataFieldAbstractTypes) {
|
|
@@ -1856,10 +1846,11 @@ const _getAnnotationColumnName = function (dataField: DataFieldAbstractTypes) {
|
|
|
1856
1846
|
|
|
1857
1847
|
/**
|
|
1858
1848
|
* Determines if the data field labels have to be displayed in the table.
|
|
1859
|
-
*
|
|
1860
|
-
* @param
|
|
1861
|
-
* @param
|
|
1862
|
-
* @
|
|
1849
|
+
*
|
|
1850
|
+
* @param fieldGroupName The `DataField` name being processed.
|
|
1851
|
+
* @param visualizationPath
|
|
1852
|
+
* @param converterContext
|
|
1853
|
+
* @returns `showDataFieldsLabel` value from the manifest
|
|
1863
1854
|
* @private
|
|
1864
1855
|
*/
|
|
1865
1856
|
const _getShowDataFieldsLabel = function (fieldGroupName: string, visualizationPath: string, converterContext: ConverterContext): boolean {
|
|
@@ -1875,8 +1866,9 @@ const _getShowDataFieldsLabel = function (fieldGroupName: string, visualizationP
|
|
|
1875
1866
|
|
|
1876
1867
|
/**
|
|
1877
1868
|
* Determines the relative path of the property with respect to the root entity.
|
|
1869
|
+
*
|
|
1878
1870
|
* @param dataField The `DataField` being processed.
|
|
1879
|
-
* @returns
|
|
1871
|
+
* @returns The relative path
|
|
1880
1872
|
*/
|
|
1881
1873
|
const _getRelativePath = function (dataField: DataFieldAbstractTypes): string {
|
|
1882
1874
|
let relativePath: string = "";
|
|
@@ -1896,6 +1888,8 @@ const _getRelativePath = function (dataField: DataFieldAbstractTypes): string {
|
|
|
1896
1888
|
|
|
1897
1889
|
case UIAnnotationTypes.DataFieldForAction:
|
|
1898
1890
|
case UIAnnotationTypes.DataFieldForIntentBasedNavigation:
|
|
1891
|
+
case UIAnnotationTypes.DataFieldForActionGroup:
|
|
1892
|
+
case UIAnnotationTypes.DataFieldWithActionGroup:
|
|
1899
1893
|
relativePath = KeyHelper.generateKeyFromDataField(dataField);
|
|
1900
1894
|
break;
|
|
1901
1895
|
}
|
|
@@ -1918,33 +1912,23 @@ const _sliceAtSlash = function (path: string, isLastSlash: boolean, isLastPart:
|
|
|
1918
1912
|
* @param dataField The data field being processed
|
|
1919
1913
|
* @param propertyPath The property path
|
|
1920
1914
|
* @param nonSortableColumns Collection of non-sortable column names as per annotation
|
|
1921
|
-
* @returns
|
|
1915
|
+
* @returns True if the column is sortable
|
|
1922
1916
|
*/
|
|
1923
1917
|
const _isColumnSortable = function (dataField: DataFieldAbstractTypes, propertyPath: string, nonSortableColumns: string[]): boolean {
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
break;
|
|
1932
|
-
|
|
1933
|
-
case UIAnnotationTypes.DataFieldForIntentBasedNavigation:
|
|
1934
|
-
case UIAnnotationTypes.DataFieldForAction:
|
|
1935
|
-
// Action columns are not sortable
|
|
1936
|
-
isSortable = false;
|
|
1937
|
-
break;
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
return isSortable;
|
|
1918
|
+
return (
|
|
1919
|
+
nonSortableColumns.indexOf(propertyPath) === -1 && // Column is not marked as non-sortable via annotation
|
|
1920
|
+
(dataField.$Type === UIAnnotationTypes.DataField ||
|
|
1921
|
+
dataField.$Type === UIAnnotationTypes.DataFieldWithUrl ||
|
|
1922
|
+
dataField.$Type === UIAnnotationTypes.DataFieldWithIntentBasedNavigation ||
|
|
1923
|
+
dataField.$Type === UIAnnotationTypes.DataFieldWithAction)
|
|
1924
|
+
);
|
|
1941
1925
|
};
|
|
1942
1926
|
|
|
1943
1927
|
/**
|
|
1944
1928
|
* Returns whether filtering on the table is case sensitive.
|
|
1945
1929
|
*
|
|
1946
|
-
* @param
|
|
1947
|
-
* @returns
|
|
1930
|
+
* @param converterContext The instance of the converter context
|
|
1931
|
+
* @returns Returns 'false' if FilterFunctions annotation supports 'tolower', else 'true'
|
|
1948
1932
|
*/
|
|
1949
1933
|
export const isFilteringCaseSensitive = function (converterContext: ConverterContext): boolean {
|
|
1950
1934
|
const filterFunctions: FilterFunctions | undefined =
|
|
@@ -1956,7 +1940,7 @@ export const isFilteringCaseSensitive = function (converterContext: ConverterCon
|
|
|
1956
1940
|
/**
|
|
1957
1941
|
* Returns default format options for text fields in a table.
|
|
1958
1942
|
*
|
|
1959
|
-
* @returns
|
|
1943
|
+
* @returns Collection of format options with default values
|
|
1960
1944
|
*/
|
|
1961
1945
|
function getDefaultFormatOptionsForTable(): FormatOptionsType {
|
|
1962
1946
|
return {
|
|
@@ -2026,11 +2010,12 @@ function _findSemanticKeyValuesInFieldGroup(dataFieldGroup: DataFieldAbstractTyp
|
|
|
2026
2010
|
|
|
2027
2011
|
/**
|
|
2028
2012
|
* Returns default format options with draftIndicator for a column.
|
|
2013
|
+
*
|
|
2029
2014
|
* @param name
|
|
2030
2015
|
* @param semanticKeys
|
|
2031
2016
|
* @param isFieldGroupColumn
|
|
2032
2017
|
* @param dataFieldGroup
|
|
2033
|
-
* @returns
|
|
2018
|
+
* @returns Collection of format options with default values
|
|
2034
2019
|
*/
|
|
2035
2020
|
function getDefaultDraftIndicatorForColumn(
|
|
2036
2021
|
name: string,
|
|
@@ -2047,18 +2032,16 @@ function getDefaultDraftIndicatorForColumn(
|
|
|
2047
2032
|
return {
|
|
2048
2033
|
hasDraftIndicator: true,
|
|
2049
2034
|
semantickeys: semanticKey.values,
|
|
2050
|
-
objectStatusTextVisibility:
|
|
2035
|
+
objectStatusTextVisibility: compileExpression(getRowStatusVisibility())
|
|
2051
2036
|
};
|
|
2037
|
+
} else if (!semanticKeyInFieldGroup.semanticKeyHasPropertyInFieldGroup) {
|
|
2038
|
+
return {};
|
|
2052
2039
|
} else {
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
FieldGroupDraftIndicatorPropertyPath: semanticKeyInFieldGroup.propertyPath,
|
|
2059
|
-
FieldGroupName: name
|
|
2060
|
-
};
|
|
2061
|
-
}
|
|
2040
|
+
// Semantic Key has a property in a FieldGroup
|
|
2041
|
+
return {
|
|
2042
|
+
FieldGroupDraftIndicatorPropertyPath: semanticKeyInFieldGroup.propertyPath,
|
|
2043
|
+
FieldGroupName: name
|
|
2044
|
+
};
|
|
2062
2045
|
}
|
|
2063
2046
|
}
|
|
2064
2047
|
|
|
@@ -2104,7 +2087,7 @@ function _getMaxImportance(fields: DataFieldTypes[]): Importance {
|
|
|
2104
2087
|
*
|
|
2105
2088
|
* @param dataField
|
|
2106
2089
|
* @param semanticKeys
|
|
2107
|
-
* @returns
|
|
2090
|
+
* @returns The importance value
|
|
2108
2091
|
*/
|
|
2109
2092
|
export function getImportance(dataField: DataFieldAbstractTypes, semanticKeys: SemanticKey): Importance | undefined {
|
|
2110
2093
|
//Evaluate default Importance is not set explicitly
|
|
@@ -2158,10 +2141,10 @@ export function getImportance(dataField: DataFieldAbstractTypes, semanticKeys: S
|
|
|
2158
2141
|
/**
|
|
2159
2142
|
* Returns line items from metadata annotations.
|
|
2160
2143
|
*
|
|
2161
|
-
* @param
|
|
2162
|
-
* @param
|
|
2163
|
-
* @param
|
|
2164
|
-
* @returns
|
|
2144
|
+
* @param lineItemAnnotation Collection of data fields with their annotations
|
|
2145
|
+
* @param visualizationPath The visualization path
|
|
2146
|
+
* @param converterContext The converter context
|
|
2147
|
+
* @returns The columns from the annotations
|
|
2165
2148
|
*/
|
|
2166
2149
|
const getColumnsFromAnnotations = function (
|
|
2167
2150
|
lineItemAnnotation: LineItem,
|
|
@@ -2205,7 +2188,7 @@ const getColumnsFromAnnotations = function (
|
|
|
2205
2188
|
...getDefaultFormatOptionsForTable(),
|
|
2206
2189
|
...getDefaultDraftIndicatorForColumn(name, semanticKeys, isFieldGroupColumn, lineItem)
|
|
2207
2190
|
};
|
|
2208
|
-
let fieldGroupHiddenExpressions:
|
|
2191
|
+
let fieldGroupHiddenExpressions: CompiledBindingToolkitExpression;
|
|
2209
2192
|
if (
|
|
2210
2193
|
lineItem.$Type === UIAnnotationTypes.DataFieldForAnnotation &&
|
|
2211
2194
|
lineItem.Target?.$target?.$Type === UIAnnotationTypes.FieldGroupType
|
|
@@ -2247,7 +2230,7 @@ const getColumnsFromAnnotations = function (
|
|
|
2247
2230
|
// In case of text arrangement annotation with display mode as text only, exclude text property from the width calculation
|
|
2248
2231
|
visualSettings = {
|
|
2249
2232
|
widthCalculation: {
|
|
2250
|
-
excludeProperties: [
|
|
2233
|
+
excludeProperties: [`Property::${relatedPropertiesInfo.visualSettingsToBeExcluded}`]
|
|
2251
2234
|
}
|
|
2252
2235
|
};
|
|
2253
2236
|
} else if (!dataType || !oTypeConfig) {
|
|
@@ -2269,7 +2252,7 @@ const getColumnsFromAnnotations = function (
|
|
|
2269
2252
|
showDataFieldsLabel: showDataFieldsLabel,
|
|
2270
2253
|
relativePath: relativePath,
|
|
2271
2254
|
sortable: _isColumnSortable(lineItem, relativePath, nonSortableColumns),
|
|
2272
|
-
propertyInfos: relatedPropertyNames.length
|
|
2255
|
+
propertyInfos: relatedPropertyNames.length ? relatedPropertyNames : undefined,
|
|
2273
2256
|
additionalPropertyInfos: additionalPropertyNames.length > 0 ? additionalPropertyNames : undefined,
|
|
2274
2257
|
exportSettings: exportSettings,
|
|
2275
2258
|
width: lineItem.annotations?.HTML5?.CssDefaults?.width || undefined,
|
|
@@ -2290,14 +2273,14 @@ const getColumnsFromAnnotations = function (
|
|
|
2290
2273
|
annotationColumns.push(oColumn as AnnotationTableColumn);
|
|
2291
2274
|
|
|
2292
2275
|
// Collect information of related columns to be created.
|
|
2293
|
-
relatedPropertyNames.forEach((
|
|
2294
|
-
columnsToBeCreated[
|
|
2276
|
+
relatedPropertyNames.forEach((relatedPropertyName) => {
|
|
2277
|
+
columnsToBeCreated[relatedPropertyName] = relatedPropertiesInfo.properties[relatedPropertyName];
|
|
2295
2278
|
});
|
|
2296
2279
|
|
|
2297
2280
|
// Create columns for additional properties identified for ALP use case.
|
|
2298
|
-
additionalPropertyNames.forEach((
|
|
2281
|
+
additionalPropertyNames.forEach((additionalPropertyName) => {
|
|
2299
2282
|
// Intentional overwrite as we require only one new PropertyInfo for a related Property.
|
|
2300
|
-
columnsToBeCreated[
|
|
2283
|
+
columnsToBeCreated[additionalPropertyName] = relatedPropertiesInfo.additionalProperties[additionalPropertyName];
|
|
2301
2284
|
});
|
|
2302
2285
|
});
|
|
2303
2286
|
}
|
|
@@ -2323,11 +2306,12 @@ const getColumnsFromAnnotations = function (
|
|
|
2323
2306
|
/**
|
|
2324
2307
|
* Gets the property names from the manifest and checks against existing properties already added by annotations.
|
|
2325
2308
|
* If a not yet stored property is found it adds it for sorting and filtering only to the annotationColumns.
|
|
2326
|
-
*
|
|
2327
|
-
* @param
|
|
2328
|
-
* @param
|
|
2309
|
+
*
|
|
2310
|
+
* @param properties
|
|
2311
|
+
* @param annotationColumns
|
|
2312
|
+
* @param converterContext
|
|
2329
2313
|
* @param entityType
|
|
2330
|
-
* @returns
|
|
2314
|
+
* @returns The columns from the annotations
|
|
2331
2315
|
*/
|
|
2332
2316
|
const _getPropertyNames = function (
|
|
2333
2317
|
properties: string[] | undefined,
|
|
@@ -2374,10 +2358,10 @@ const _appendCustomTemplate = function (properties: string[]): string {
|
|
|
2374
2358
|
* Manifest defined property value for custom / annotation columns
|
|
2375
2359
|
* Default property value for custom column if not overwritten in manifest.
|
|
2376
2360
|
*
|
|
2377
|
-
* @param
|
|
2378
|
-
* @param
|
|
2379
|
-
* @param
|
|
2380
|
-
* @returns
|
|
2361
|
+
* @param property The column property defined in the manifest
|
|
2362
|
+
* @param defaultValue The default value of the property
|
|
2363
|
+
* @param isAnnotationColumn Whether the column, defined in manifest, corresponds to an existing annotation column.
|
|
2364
|
+
* @returns Determined property value for the column
|
|
2381
2365
|
*/
|
|
2382
2366
|
const _getManifestOrDefaultValue = function (property: any, defaultValue: any, isAnnotationColumn: boolean): any {
|
|
2383
2367
|
if (property === undefined) {
|
|
@@ -2391,12 +2375,13 @@ const _getManifestOrDefaultValue = function (property: any, defaultValue: any, i
|
|
|
2391
2375
|
|
|
2392
2376
|
/**
|
|
2393
2377
|
* Returns table column definitions from manifest.
|
|
2378
|
+
*
|
|
2394
2379
|
* @param columns
|
|
2395
2380
|
* @param annotationColumns
|
|
2396
2381
|
* @param converterContext
|
|
2397
2382
|
* @param entityType
|
|
2398
2383
|
* @param navigationSettings
|
|
2399
|
-
* @returns
|
|
2384
|
+
* @returns The columns from the manifest
|
|
2400
2385
|
*/
|
|
2401
2386
|
const getColumnsFromManifest = function (
|
|
2402
2387
|
columns: Record<string, ManifestTableColumn>,
|
|
@@ -2419,7 +2404,7 @@ const getColumnsFromManifest = function (
|
|
|
2419
2404
|
entityType
|
|
2420
2405
|
);
|
|
2421
2406
|
if (!manifestColumn?.template && manifestColumn?.type !== "Slot" && !isAnnotationColumn) {
|
|
2422
|
-
const Message =
|
|
2407
|
+
const Message = `The annotation column '${key}' referenced in the manifest is not found`;
|
|
2423
2408
|
converterContext
|
|
2424
2409
|
.getDiagnostics()
|
|
2425
2410
|
.addIssue(
|
|
@@ -2432,8 +2417,8 @@ const getColumnsFromManifest = function (
|
|
|
2432
2417
|
} else {
|
|
2433
2418
|
internalColumns[key] = {
|
|
2434
2419
|
key: key,
|
|
2435
|
-
id:
|
|
2436
|
-
name:
|
|
2420
|
+
id: `CustomColumn::${key}`,
|
|
2421
|
+
name: `CustomColumn::${key}`,
|
|
2437
2422
|
header: manifestColumn.header,
|
|
2438
2423
|
width: manifestColumn.width || undefined,
|
|
2439
2424
|
importance: _getManifestOrDefaultValue(manifestColumn?.importance, Importance.None, isAnnotationColumn),
|
|
@@ -2545,9 +2530,9 @@ export function getP13nMode(
|
|
|
2545
2530
|
* Chart has a dependency to filter bar (issue with loading data). Once resolved, the check for chart should be removed here.
|
|
2546
2531
|
* Until then, hiding filter bar is now allowed if a chart is being used on LR.
|
|
2547
2532
|
*
|
|
2548
|
-
* @param
|
|
2549
|
-
* @param
|
|
2550
|
-
* @returns
|
|
2533
|
+
* @param manifestWrapper Manifest settings getter for the page
|
|
2534
|
+
* @param converterContext The instance of the converter context
|
|
2535
|
+
* @returns Boolean suggesting if a filter bar is being used on the page.
|
|
2551
2536
|
*/
|
|
2552
2537
|
function _isFilterBarHidden(manifestWrapper: ManifestWrapper, converterContext: ConverterContext): boolean {
|
|
2553
2538
|
return (
|
|
@@ -2561,9 +2546,9 @@ function _isFilterBarHidden(manifestWrapper: ManifestWrapper, converterContext:
|
|
|
2561
2546
|
* Returns a JSON string containing the sort conditions for the presentation variant.
|
|
2562
2547
|
*
|
|
2563
2548
|
* @param converterContext The instance of the converter context
|
|
2564
|
-
* @param
|
|
2549
|
+
* @param presentationVariantAnnotation Presentation variant annotation
|
|
2565
2550
|
* @param columns Table columns processed by the converter
|
|
2566
|
-
* @returns
|
|
2551
|
+
* @returns Sort conditions for a presentation variant.
|
|
2567
2552
|
*/
|
|
2568
2553
|
function getSortConditions(
|
|
2569
2554
|
converterContext: ConverterContext,
|
|
@@ -2623,9 +2608,10 @@ function convertPropertyPathsToInfoNames(paths: PropertyPath[], columns: TableCo
|
|
|
2623
2608
|
/**
|
|
2624
2609
|
* Returns a JSON string containing Presentation Variant group conditions.
|
|
2625
2610
|
*
|
|
2626
|
-
* @param
|
|
2611
|
+
* @param presentationVariantAnnotation Presentation variant annotation
|
|
2627
2612
|
* @param columns Converter processed table columns
|
|
2628
|
-
* @
|
|
2613
|
+
* @param tableType The table type.
|
|
2614
|
+
* @returns Group conditions for a Presentation variant.
|
|
2629
2615
|
*/
|
|
2630
2616
|
function getGroupConditions(
|
|
2631
2617
|
presentationVariantAnnotation: PresentationVariantTypeTypes | undefined,
|
|
@@ -2634,7 +2620,7 @@ function getGroupConditions(
|
|
|
2634
2620
|
): string | undefined {
|
|
2635
2621
|
let groupConditions: string | undefined;
|
|
2636
2622
|
if (presentationVariantAnnotation?.GroupBy) {
|
|
2637
|
-
let aGroupBy = presentationVariantAnnotation.GroupBy
|
|
2623
|
+
let aGroupBy = presentationVariantAnnotation.GroupBy;
|
|
2638
2624
|
if (tableType === "ResponsiveTable") {
|
|
2639
2625
|
aGroupBy = aGroupBy.slice(0, 1);
|
|
2640
2626
|
}
|
|
@@ -2650,9 +2636,9 @@ function getGroupConditions(
|
|
|
2650
2636
|
/**
|
|
2651
2637
|
* Returns a JSON string containing Presentation Variant aggregate conditions.
|
|
2652
2638
|
*
|
|
2653
|
-
* @param
|
|
2639
|
+
* @param presentationVariantAnnotation Presentation variant annotation
|
|
2654
2640
|
* @param columns Converter processed table columns
|
|
2655
|
-
* @returns
|
|
2641
|
+
* @returns Group conditions for a Presentation variant.
|
|
2656
2642
|
*/
|
|
2657
2643
|
function getAggregateConditions(
|
|
2658
2644
|
presentationVariantAnnotation: PresentationVariantTypeTypes | undefined,
|
|
@@ -2660,7 +2646,7 @@ function getAggregateConditions(
|
|
|
2660
2646
|
): string | undefined {
|
|
2661
2647
|
let aggregateConditions: string | undefined;
|
|
2662
2648
|
if (presentationVariantAnnotation?.Total) {
|
|
2663
|
-
const aTotals = presentationVariantAnnotation.Total
|
|
2649
|
+
const aTotals = presentationVariantAnnotation.Total;
|
|
2664
2650
|
const aggregates: Record<string, object> = {};
|
|
2665
2651
|
convertPropertyPathsToInfoNames(aTotals, columns).forEach((infoName) => {
|
|
2666
2652
|
aggregates[infoName] = {};
|
|
@@ -2688,7 +2674,7 @@ export function getTableAnnotationConfiguration(
|
|
|
2688
2674
|
const pageManifestSettings: ManifestWrapper = converterContext.getManifestWrapper();
|
|
2689
2675
|
const hasAbsolutePath = navigationPropertyPath.length === 0,
|
|
2690
2676
|
p13nMode: string | undefined = getP13nMode(visualizationPath, converterContext, tableManifestConfiguration),
|
|
2691
|
-
id = navigationPropertyPath ?
|
|
2677
|
+
id = navigationPropertyPath ? getTableID(visualizationPath) : getTableID(converterContext.getContextPath(), "LineItem");
|
|
2692
2678
|
const targetCapabilities = getCapabilityRestriction(converterContext);
|
|
2693
2679
|
const navigationTargetPath = getNavigationTargetPath(converterContext, navigationPropertyPath);
|
|
2694
2680
|
const navigationSettings = pageManifestSettings.getNavigationConfiguration(navigationTargetPath);
|
|
@@ -2712,7 +2698,7 @@ export function getTableAnnotationConfiguration(
|
|
|
2712
2698
|
const isInsertUpdateTemplated = getInsertUpdateActionsTemplating(
|
|
2713
2699
|
standardActionsContext,
|
|
2714
2700
|
isDraftOrStickySupported(converterContext),
|
|
2715
|
-
|
|
2701
|
+
compileExpression(createButtonVisibilityExpression) === "false"
|
|
2716
2702
|
);
|
|
2717
2703
|
|
|
2718
2704
|
const selectionMode = getSelectionMode(
|
|
@@ -2813,7 +2799,7 @@ function _getExportDataType(dataType: string, isComplexProperty: boolean = false
|
|
|
2813
2799
|
* Split the visualization path into the navigation property path and annotation.
|
|
2814
2800
|
*
|
|
2815
2801
|
* @param visualizationPath
|
|
2816
|
-
* @returns
|
|
2802
|
+
* @returns The split path
|
|
2817
2803
|
*/
|
|
2818
2804
|
export function splitPath(visualizationPath: string) {
|
|
2819
2805
|
let [navigationPropertyPath, annotationPath] = visualizationPath.split("@");
|
|
@@ -2836,9 +2822,9 @@ export function getSelectionVariantConfiguration(
|
|
|
2836
2822
|
const propertyNames: string[] = [];
|
|
2837
2823
|
selection.SelectOptions?.forEach((selectOption: SelectOptionType) => {
|
|
2838
2824
|
const propertyName: any = selectOption.PropertyName;
|
|
2839
|
-
const
|
|
2840
|
-
if (propertyNames.indexOf(
|
|
2841
|
-
propertyNames.push(
|
|
2825
|
+
const propertyPath: string = propertyName.value;
|
|
2826
|
+
if (propertyNames.indexOf(propertyPath) === -1) {
|
|
2827
|
+
propertyNames.push(propertyPath);
|
|
2842
2828
|
}
|
|
2843
2829
|
});
|
|
2844
2830
|
return {
|
|
@@ -2954,7 +2940,7 @@ function _getFilterConfiguration(
|
|
|
2954
2940
|
let quickSelectionVariant: any;
|
|
2955
2941
|
let filters;
|
|
2956
2942
|
tableSettings?.quickVariantSelection?.paths?.forEach((path: { annotationPath: string }) => {
|
|
2957
|
-
quickSelectionVariant = targetEntityType.resolvePath(
|
|
2943
|
+
quickSelectionVariant = targetEntityType.resolvePath(`@${path.annotationPath}`);
|
|
2958
2944
|
filters = _getFilters(tableSettings, quickFilterPaths, quickSelectionVariant, path, converterContext);
|
|
2959
2945
|
});
|
|
2960
2946
|
|
|
@@ -3011,7 +2997,8 @@ export function getTableManifestConfiguration(
|
|
|
3011
2997
|
showRowCount:
|
|
3012
2998
|
!tableSettings?.quickVariantSelection?.showCounts && !converterContext.getManifestWrapper().getViewConfiguration()?.showCounts,
|
|
3013
2999
|
type: tableType,
|
|
3014
|
-
useCondensedTableLayout: condensedTableLayout && isCondensedTableLayoutCompliant
|
|
3000
|
+
useCondensedTableLayout: condensedTableLayout && isCondensedTableLayoutCompliant,
|
|
3001
|
+
isCompactType: converterContext.getManifestWrapper().isCompactType()
|
|
3015
3002
|
};
|
|
3016
3003
|
|
|
3017
3004
|
return { ...oConfiguration, ...oFilterConfiguration };
|
|
@@ -3068,7 +3055,7 @@ export function getTypeConfig(oProperty: Property | DataFieldAbstractTypes, data
|
|
|
3068
3055
|
isDigitSequence:
|
|
3069
3056
|
propertyTypeConfig.type === "sap.ui.model.odata.type.String" &&
|
|
3070
3057
|
oTargetMapping.constraints?.["@com.sap.vocabularies.Common.v1.IsDigitSequence"] &&
|
|
3071
|
-
|
|
3058
|
+
oProperty.annotations?.Common?.IsDigitSequence
|
|
3072
3059
|
? true
|
|
3073
3060
|
: undefined
|
|
3074
3061
|
};
|