@sapui5/sap.fe.core 1.102.3 → 1.105.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 +6 -6
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/ActionRuntime.js +120 -0
- package/src/sap/fe/core/ActionRuntime.ts +108 -0
- package/src/sap/fe/core/AppComponent.js +81 -35
- package/src/sap/fe/core/AppComponent.ts +68 -44
- package/src/sap/fe/core/AppStateHandler.js +82 -70
- package/src/sap/fe/core/AppStateHandler.ts +32 -37
- package/src/sap/fe/core/BaseController.js +12 -10
- package/src/sap/fe/core/BaseController.ts +15 -13
- package/src/sap/fe/core/CommonUtils.js +291 -218
- package/src/sap/fe/core/CommonUtils.ts +315 -251
- package/src/sap/fe/core/ExtensionAPI.js +25 -28
- package/src/sap/fe/core/ExtensionAPI.ts +36 -38
- package/src/sap/fe/core/PageController.js +5 -5
- package/src/sap/fe/core/PageController.ts +4 -5
- package/src/sap/fe/core/TemplateComponent.js +21 -10
- package/src/sap/fe/core/TemplateComponent.ts +9 -6
- package/src/sap/fe/core/TemplateModel.js +2 -2
- package/src/sap/fe/core/TemplateModel.ts +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +11 -3
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +8 -2
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +197 -43
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +164 -24
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFormatter.js +14 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFormatter.ts +5 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +609 -230
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +275 -128
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +30 -30
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +32 -29
- package/src/sap/fe/core/controllerextensions/BusyLocker.js +1 -1
- package/src/sap/fe/core/controllerextensions/EditFlow.js +761 -700
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +478 -514
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +10 -10
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +10 -10
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +104 -75
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +71 -79
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +68 -68
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +76 -76
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +162 -102
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +177 -121
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +67 -69
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +106 -123
- package/src/sap/fe/core/controllerextensions/MassEdit.js +10 -10
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +20 -27
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +21 -13
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +21 -14
- package/src/sap/fe/core/controllerextensions/PageReady.js +98 -26
- package/src/sap/fe/core/controllerextensions/PageReady.ts +98 -34
- package/src/sap/fe/core/controllerextensions/Paginator.js +31 -32
- package/src/sap/fe/core/controllerextensions/Paginator.ts +33 -34
- package/src/sap/fe/core/controllerextensions/Placeholder.js +5 -7
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
- package/src/sap/fe/core/controllerextensions/Routing.js +11 -12
- package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
- package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
- package/src/sap/fe/core/controllerextensions/Share.js +171 -140
- package/src/sap/fe/core/controllerextensions/Share.ts +117 -118
- package/src/sap/fe/core/controllerextensions/SideEffects.js +47 -51
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +56 -60
- package/src/sap/fe/core/controllerextensions/ViewState.js +201 -132
- package/src/sap/fe/core/controllerextensions/ViewState.ts +141 -148
- 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 +13 -12
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +17 -20
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +13 -12
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +15 -15
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +57 -18
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +60 -28
- package/src/sap/fe/core/controllerextensions/collaboration/ManageDialog.fragment.xml +29 -21
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1424 -940
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +799 -836
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +410 -377
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +275 -358
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js +309 -0
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.ts +320 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +752 -579
- package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +631 -599
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +92 -74
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +49 -52
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +78 -41
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +110 -84
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +69 -81
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +64 -73
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +18 -2
- package/src/sap/fe/core/controls/ActionParameterDialogFieldValueHelp.fragment.xml +35 -0
- package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +25 -24
- 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 +12 -26
- package/src/sap/fe/core/controls/CommandExecution.ts +11 -25
- package/src/sap/fe/core/controls/ConditionalWrapper.js +3 -3
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +3 -3
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +26 -26
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +25 -24
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +3 -3
- 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 +3 -3
- package/src/sap/fe/core/controls/FieldWrapper.ts +3 -3
- package/src/sap/fe/core/controls/FileWrapper.js +9 -4
- package/src/sap/fe/core/controls/FileWrapper.ts +16 -12
- package/src/sap/fe/core/controls/FilterBar.js +7 -3
- package/src/sap/fe/core/controls/FilterBar.ts +13 -9
- package/src/sap/fe/core/controls/FormElementWrapper.js +2 -2
- 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/MultiValueParameterDelegate.js +1 -1
- package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +44 -19
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +2 -2
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +17 -13
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -22
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +4 -4
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +8 -8
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +49 -49
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +54 -54
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +8 -2
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +22 -35
- 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 +48 -34
- package/src/sap/fe/core/converters/ConverterContext.ts +81 -67
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +18 -15
- 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 +74 -40
- package/src/sap/fe/core/converters/MetaModelConverter.ts +176 -140
- 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 +58 -35
- package/src/sap/fe/core/converters/annotations/DataField.ts +102 -76
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +1956 -1494
- package/src/sap/fe/core/converters/controls/Common/Action.js +78 -51
- package/src/sap/fe/core/converters/controls/Common/Action.ts +87 -52
- package/src/sap/fe/core/converters/controls/Common/Chart.js +22 -16
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +42 -43
- 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 +65 -29
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +93 -62
- package/src/sap/fe/core/converters/controls/Common/Form.js +31 -31
- package/src/sap/fe/core/converters/controls/Common/Form.ts +46 -57
- package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -11
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +49 -52
- package/src/sap/fe/core/converters/controls/Common/Table.js +251 -264
- package/src/sap/fe/core/converters/controls/Common/Table.ts +344 -370
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +119 -119
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +147 -144
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +89 -59
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +118 -71
- 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 +131 -95
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +123 -87
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +98 -87
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +121 -117
- package/src/sap/fe/core/converters/helpers/Aggregation.js +2 -4
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +12 -15
- 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 +8 -6
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +18 -10
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.js +136 -0
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.ts +139 -0
- package/src/sap/fe/core/converters/helpers/ID.js +48 -46
- package/src/sap/fe/core/converters/helpers/ID.ts +26 -25
- package/src/sap/fe/core/converters/helpers/IssueManager.js +1 -1
- 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 -5
- 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 +53 -75
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +59 -90
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +58 -57
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +93 -86
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +58 -44
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +87 -80
- 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 +96 -0
- package/src/sap/fe/core/formatters/StandardFormatter.ts +70 -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/TableFormatterTypes.js +1 -1
- 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 +33 -7
- package/src/sap/fe/core/fpm/Component.ts +14 -0
- package/src/sap/fe/core/helpers/AnnotationEnum.js +1 -1
- package/src/sap/fe/core/helpers/AppStartupHelper.js +19 -18
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +41 -43
- package/src/sap/fe/core/helpers/BindingToolkit.js +1836 -0
- package/src/sap/fe/core/helpers/{BindingExpression.ts → BindingToolkit.ts} +397 -270
- package/src/sap/fe/core/helpers/ClassSupport.js +49 -12
- package/src/sap/fe/core/helpers/ClassSupport.ts +37 -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/KeepAliveRefreshTypes.js +1 -1
- package/src/sap/fe/core/helpers/MassEditHelper.js +306 -280
- package/src/sap/fe/core/helpers/MassEditHelper.ts +380 -360
- package/src/sap/fe/core/helpers/MessageStrip.js +81 -0
- package/src/sap/fe/core/helpers/MessageStrip.ts +79 -0
- 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/helpers/Synchronization.js +1 -1
- package/src/sap/fe/core/helpers/ToES6Promise.js +32 -0
- package/src/sap/fe/core/helpers/ToES6Promise.ts +19 -0
- package/src/sap/fe/core/jsx-runtime/Fragment.js +16 -0
- package/src/sap/fe/core/jsx-runtime/Fragment.ts +3 -0
- package/src/sap/fe/core/jsx-runtime/ViewLoader.js +109 -0
- package/src/sap/fe/core/jsx-runtime/ViewLoader.tsx +47 -0
- package/src/sap/fe/core/jsx-runtime/jsx-control.js +110 -0
- package/src/sap/fe/core/jsx-runtime/jsx-control.ts +92 -0
- package/src/sap/fe/core/jsx-runtime/jsx-xml.js +105 -0
- package/src/sap/fe/core/jsx-runtime/jsx-xml.ts +89 -0
- package/src/sap/fe/core/jsx-runtime/jsx.js +12 -90
- package/src/sap/fe/core/jsx-runtime/jsx.ts +24 -85
- package/src/sap/fe/core/jsx-runtime/jsxs.js +1 -1
- package/src/sap/fe/core/jsx-runtime/useMDXComponents.js +179 -0
- package/src/sap/fe/core/jsx-runtime/useMDXComponents.tsx +150 -0
- package/src/sap/fe/core/library.js +42 -3
- package/src/sap/fe/core/library.support.js +1 -1
- 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 +39 -67
- package/src/sap/fe/core/messagebundle_ar.properties +27 -44
- package/src/sap/fe/core/messagebundle_bg.properties +27 -44
- package/src/sap/fe/core/messagebundle_ca.properties +27 -44
- package/src/sap/fe/core/messagebundle_cs.properties +27 -44
- package/src/sap/fe/core/messagebundle_cy.properties +26 -43
- package/src/sap/fe/core/messagebundle_da.properties +27 -44
- package/src/sap/fe/core/messagebundle_de.properties +25 -42
- package/src/sap/fe/core/messagebundle_el.properties +28 -45
- package/src/sap/fe/core/messagebundle_en.properties +27 -44
- package/src/sap/fe/core/messagebundle_en_GB.properties +27 -44
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +25 -42
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +26 -40
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +25 -42
- package/src/sap/fe/core/messagebundle_es.properties +27 -44
- package/src/sap/fe/core/messagebundle_es_MX.properties +27 -44
- package/src/sap/fe/core/messagebundle_et.properties +27 -44
- package/src/sap/fe/core/messagebundle_fi.properties +27 -44
- package/src/sap/fe/core/messagebundle_fr.properties +26 -43
- package/src/sap/fe/core/messagebundle_fr_CA.properties +25 -42
- package/src/sap/fe/core/messagebundle_hi.properties +27 -44
- package/src/sap/fe/core/messagebundle_hr.properties +27 -44
- package/src/sap/fe/core/messagebundle_hu.properties +27 -44
- package/src/sap/fe/core/messagebundle_id.properties +27 -44
- package/src/sap/fe/core/messagebundle_it.properties +43 -60
- package/src/sap/fe/core/messagebundle_iw.properties +27 -44
- package/src/sap/fe/core/messagebundle_ja.properties +27 -44
- package/src/sap/fe/core/messagebundle_kk.properties +27 -44
- package/src/sap/fe/core/messagebundle_ko.properties +30 -47
- package/src/sap/fe/core/messagebundle_lt.properties +27 -44
- package/src/sap/fe/core/messagebundle_lv.properties +27 -44
- package/src/sap/fe/core/messagebundle_ms.properties +27 -44
- package/src/sap/fe/core/messagebundle_nl.properties +29 -46
- package/src/sap/fe/core/messagebundle_no.properties +27 -44
- package/src/sap/fe/core/messagebundle_pl.properties +28 -45
- package/src/sap/fe/core/messagebundle_pt.properties +28 -45
- package/src/sap/fe/core/messagebundle_pt_PT.properties +27 -44
- package/src/sap/fe/core/messagebundle_ro.properties +27 -44
- package/src/sap/fe/core/messagebundle_ru.properties +27 -44
- package/src/sap/fe/core/messagebundle_sh.properties +27 -44
- package/src/sap/fe/core/messagebundle_sk.properties +27 -44
- package/src/sap/fe/core/messagebundle_sl.properties +27 -44
- package/src/sap/fe/core/messagebundle_sv.properties +27 -44
- package/src/sap/fe/core/messagebundle_th.properties +25 -42
- package/src/sap/fe/core/messagebundle_tr.properties +27 -44
- package/src/sap/fe/core/messagebundle_uk.properties +27 -44
- package/src/sap/fe/core/messagebundle_vi.properties +27 -44
- package/src/sap/fe/core/messagebundle_zh_CN.properties +27 -44
- package/src/sap/fe/core/messagebundle_zh_TW.properties +27 -44
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +3 -3
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +5 -5
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +103 -75
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +72 -73
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +2 -2
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -2
- package/src/sap/fe/core/services/NavigationServiceFactory.js +62 -50
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +63 -52
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +3 -3
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +4 -4
- package/src/sap/fe/core/services/RoutingServiceFactory.js +56 -56
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +67 -65
- package/src/sap/fe/core/services/ShellServicesFactory.js +93 -77
- package/src/sap/fe/core/services/ShellServicesFactory.ts +95 -82
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +64 -64
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +102 -92
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +232 -200
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +145 -142
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +2 -2
- package/src/sap/fe/core/support/AnnotationIssue.support.js +1 -1
- package/src/sap/fe/core/support/CollectionFacetMissingID.support.js +1 -1
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +1 -1
- 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/support/InvalidAnnotationColumnKey.support.js +1 -1
- package/src/sap/fe/core/templating/CommonFormatters.js +85 -0
- package/src/sap/fe/core/templating/CommonFormatters.ts +90 -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 +23 -15
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +47 -34
- 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 +18 -17
- package/src/sap/fe/core/templating/FilterHelper.ts +18 -18
- 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 +152 -95
- package/src/sap/fe/core/templating/UIFormatters.ts +202 -128
- package/src/sap/fe/core/type/DateTimeWithTimezone.js +2 -2
- package/src/sap/fe/core/type/Email.js +3 -3
- package/src/sap/fe/core/type/Email.ts +2 -2
- package/src/sap/fe/core/helpers/BindingExpression.js +0 -1732
|
@@ -1,78 +1,62 @@
|
|
|
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,
|
|
6
9
|
DataFieldForAction,
|
|
7
|
-
DataFieldForAnnotation,
|
|
8
10
|
DataFieldForIntentBasedNavigation,
|
|
9
11
|
DataFieldTypes,
|
|
10
12
|
DataPoint,
|
|
11
13
|
DataPointTypeTypes,
|
|
12
|
-
EnumValue,
|
|
13
14
|
FieldGroupType,
|
|
14
15
|
LineItem,
|
|
15
|
-
|
|
16
|
-
PresentationVariantTypeTypes,
|
|
17
|
-
PropertyPath,
|
|
16
|
+
PresentationVariantType,
|
|
18
17
|
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";
|
|
18
|
+
SelectOptionType
|
|
19
|
+
} from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
20
|
+
import { UIAnnotationTypes } from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
21
|
+
import type { ComplexPropertyInfo } from "sap/fe/core/converters/annotations/DataField";
|
|
25
22
|
import {
|
|
26
23
|
collectRelatedProperties,
|
|
27
24
|
collectRelatedPropertiesRecursively,
|
|
28
|
-
ComplexPropertyInfo,
|
|
29
25
|
getDataFieldDataType,
|
|
30
26
|
getSemanticObjectPath,
|
|
31
27
|
isDataFieldAlwaysHidden,
|
|
32
28
|
isDataFieldForActionAbstract,
|
|
33
29
|
isDataFieldTypes
|
|
34
30
|
} from "sap/fe/core/converters/annotations/DataField";
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
isActionNavigable,
|
|
41
|
-
removeDuplicateActions
|
|
42
|
-
} from "sap/fe/core/converters/controls/Common/Action";
|
|
43
|
-
import { bindingContextPathVisitor, Entity, UI } from "sap/fe/core/converters/helpers/BindingHelper";
|
|
44
|
-
import { ConfigurableObject, CustomElement, insertCustomElements, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
31
|
+
import type { AnnotationAction, BaseAction, CombinedAction, CustomAction } from "sap/fe/core/converters/controls/Common/Action";
|
|
32
|
+
import { getActionsFromManifest, isActionNavigable, removeDuplicateActions } from "sap/fe/core/converters/controls/Common/Action";
|
|
33
|
+
import { Entity, UI } from "sap/fe/core/converters/helpers/BindingHelper";
|
|
34
|
+
import type { ConfigurableObject, CustomElement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
35
|
+
import { insertCustomElements, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
45
36
|
import { IssueCategory, IssueCategoryType, IssueSeverity, IssueType } from "sap/fe/core/converters/helpers/IssueManager";
|
|
46
37
|
import { KeyHelper } from "sap/fe/core/converters/helpers/Key";
|
|
47
38
|
import tableFormatters from "sap/fe/core/formatters/TableFormatter";
|
|
48
39
|
import { MessageType } from "sap/fe/core/formatters/TableFormatterTypes";
|
|
40
|
+
import type { BindingToolkitExpression, CompiledBindingToolkitExpression } from "sap/fe/core/helpers/BindingToolkit";
|
|
49
41
|
import {
|
|
50
42
|
and,
|
|
51
|
-
|
|
52
|
-
BindingExpression,
|
|
53
|
-
bindingExpression,
|
|
54
|
-
BindingExpressionExpression,
|
|
55
|
-
compileBinding,
|
|
43
|
+
compileExpression,
|
|
56
44
|
constant,
|
|
57
45
|
equal,
|
|
58
|
-
Expression,
|
|
59
|
-
ExpressionOrPrimitive,
|
|
60
46
|
formatResult,
|
|
47
|
+
getExpressionFromAnnotation,
|
|
61
48
|
ifElse,
|
|
62
49
|
isConstant,
|
|
63
50
|
not,
|
|
64
51
|
or,
|
|
52
|
+
pathInModel,
|
|
65
53
|
resolveBindingString
|
|
66
|
-
} from "sap/fe/core/helpers/
|
|
54
|
+
} from "sap/fe/core/helpers/BindingToolkit";
|
|
67
55
|
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";
|
|
56
|
+
import type { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
|
|
57
|
+
import { getTargetObjectPath, isPathDeletable, isPathSearchable, isPathUpdatable } from "sap/fe/core/templating/DataModelPathHelper";
|
|
58
|
+
import type { DisplayMode } from "sap/fe/core/templating/DisplayModeFormatter";
|
|
59
|
+
import { EDM_TYPE_MAPPING, getDisplayMode } from "sap/fe/core/templating/DisplayModeFormatter";
|
|
76
60
|
import { getNonSortablePropertiesRestrictions } from "sap/fe/core/templating/EntitySetHelper";
|
|
77
61
|
import {
|
|
78
62
|
getAssociatedCurrencyProperty,
|
|
@@ -82,30 +66,35 @@ import {
|
|
|
82
66
|
isPathExpression,
|
|
83
67
|
isProperty
|
|
84
68
|
} from "sap/fe/core/templating/PropertyHelper";
|
|
85
|
-
import
|
|
69
|
+
import ActionHelper from "sap/fe/macros/internal/helpers/ActionHelper";
|
|
70
|
+
import type ConverterContext from "../../ConverterContext";
|
|
86
71
|
import { AggregationHelper } from "../../helpers/Aggregation";
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
|
|
90
|
-
AvailabilityType,
|
|
91
|
-
CreationMode,
|
|
72
|
+
import { isReferencePropertyStaticallyHidden } from "../../helpers/DataFieldHelper";
|
|
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;
|
|
@@ -287,6 +276,7 @@ export type AnnotationTableColumn = BaseTableColumn & {
|
|
|
287
276
|
additionalPropertyInfos?: string[];
|
|
288
277
|
visualSettings?: VisualSettings;
|
|
289
278
|
typeConfig?: object;
|
|
279
|
+
isPartOfLineItem?: boolean; // temporary indicator to only allow filtering on navigation properties when they're part of a line item
|
|
290
280
|
};
|
|
291
281
|
|
|
292
282
|
export type VisualSettings = {
|
|
@@ -321,6 +311,7 @@ export type TableVisualization = {
|
|
|
321
311
|
control: TableControlConfiguration;
|
|
322
312
|
columns: TableColumn[];
|
|
323
313
|
actions: BaseAction[];
|
|
314
|
+
commandActions?: Record<string, CustomAction>;
|
|
324
315
|
aggregates?: Record<string, AggregateData>;
|
|
325
316
|
enableAnalytics?: boolean;
|
|
326
317
|
enableAnalyticsSearch?: boolean;
|
|
@@ -338,51 +329,53 @@ type SorterType = {
|
|
|
338
329
|
/**
|
|
339
330
|
* Returns an array of all annotation-based and manifest-based table actions.
|
|
340
331
|
*
|
|
341
|
-
* @param
|
|
342
|
-
* @param
|
|
343
|
-
* @param
|
|
344
|
-
* @param
|
|
345
|
-
* @returns
|
|
332
|
+
* @param lineItemAnnotation
|
|
333
|
+
* @param visualizationPath
|
|
334
|
+
* @param converterContext
|
|
335
|
+
* @param navigationSettings
|
|
336
|
+
* @returns The complete table actions
|
|
346
337
|
*/
|
|
347
338
|
export function getTableActions(
|
|
348
339
|
lineItemAnnotation: LineItem,
|
|
349
340
|
visualizationPath: string,
|
|
350
341
|
converterContext: ConverterContext,
|
|
351
342
|
navigationSettings?: NavigationSettingsConfiguration
|
|
352
|
-
):
|
|
343
|
+
): CombinedAction {
|
|
353
344
|
const aTableActions = getTableAnnotationActions(lineItemAnnotation, visualizationPath, converterContext);
|
|
354
345
|
const aAnnotationActions = aTableActions.tableActions;
|
|
355
346
|
const aHiddenActions = aTableActions.hiddenTableActions;
|
|
356
|
-
|
|
347
|
+
const manifestActions = getActionsFromManifest(
|
|
348
|
+
converterContext.getManifestControlConfiguration(visualizationPath).actions,
|
|
349
|
+
converterContext,
|
|
357
350
|
aAnnotationActions,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
aAnnotationActions,
|
|
362
|
-
navigationSettings,
|
|
363
|
-
true,
|
|
364
|
-
aHiddenActions
|
|
365
|
-
),
|
|
366
|
-
{
|
|
367
|
-
isNavigable: "overwrite",
|
|
368
|
-
enableOnSelect: "overwrite",
|
|
369
|
-
enableAutoScroll: "overwrite",
|
|
370
|
-
enabled: "overwrite",
|
|
371
|
-
defaultValuesExtensionFunction: "overwrite",
|
|
372
|
-
command: "overwrite"
|
|
373
|
-
}
|
|
351
|
+
navigationSettings,
|
|
352
|
+
true,
|
|
353
|
+
aHiddenActions
|
|
374
354
|
);
|
|
355
|
+
const actions = insertCustomElements(aAnnotationActions, manifestActions.actions, {
|
|
356
|
+
isNavigable: "overwrite",
|
|
357
|
+
enableOnSelect: "overwrite",
|
|
358
|
+
enableAutoScroll: "overwrite",
|
|
359
|
+
enabled: "overwrite",
|
|
360
|
+
defaultValuesExtensionFunction: "overwrite",
|
|
361
|
+
command: "overwrite"
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
return {
|
|
365
|
+
"actions": actions,
|
|
366
|
+
"commandActions": manifestActions.commandActions
|
|
367
|
+
};
|
|
375
368
|
}
|
|
376
369
|
|
|
377
370
|
/**
|
|
378
371
|
* Returns an array of all columns, annotation-based as well as manifest based.
|
|
379
372
|
* They are sorted and some properties can be overwritten via the manifest (check out the keys that can be overwritten).
|
|
380
373
|
*
|
|
381
|
-
* @param
|
|
382
|
-
* @param
|
|
383
|
-
* @param
|
|
384
|
-
* @param
|
|
385
|
-
* @returns
|
|
374
|
+
* @param lineItemAnnotation Collection of data fields for representation in a table or list
|
|
375
|
+
* @param visualizationPath
|
|
376
|
+
* @param converterContext
|
|
377
|
+
* @param navigationSettings
|
|
378
|
+
* @returns Returns all table columns that should be available, regardless of templating or personalization or their origin
|
|
386
379
|
*/
|
|
387
380
|
export function getTableColumns(
|
|
388
381
|
lineItemAnnotation: LineItem,
|
|
@@ -482,9 +475,9 @@ export const getAggregateDefinitionsFromEntityType = function (
|
|
|
482
475
|
};
|
|
483
476
|
const aContextDefiningProperties: string[] = [];
|
|
484
477
|
aRawContextDefiningProperties.forEach((contextDefiningPropertyName) => {
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
aContextDefiningProperties.push(
|
|
478
|
+
const foundColumn = findColumnFromPath(contextDefiningPropertyName);
|
|
479
|
+
if (foundColumn) {
|
|
480
|
+
aContextDefiningProperties.push(foundColumn.name);
|
|
488
481
|
}
|
|
489
482
|
});
|
|
490
483
|
|
|
@@ -510,7 +503,7 @@ function updateTableVisualizationForAnalytics(
|
|
|
510
503
|
tableVisualization: TableVisualization,
|
|
511
504
|
entityType: EntityType,
|
|
512
505
|
converterContext: ConverterContext,
|
|
513
|
-
presentationVariantAnnotation?:
|
|
506
|
+
presentationVariantAnnotation?: PresentationVariantType
|
|
514
507
|
) {
|
|
515
508
|
if (tableVisualization.control.type === "AnalyticalTable") {
|
|
516
509
|
const aggregatesDefinitions = getAggregateDefinitionsFromEntityType(entityType, tableVisualization.columns, converterContext),
|
|
@@ -630,7 +623,7 @@ function getSemanticKeysAndTitleInfo(converterContext: ConverterContext) {
|
|
|
630
623
|
?.path;
|
|
631
624
|
const semanticKeyAnnotations: any[] | undefined = converterContext.getAnnotationEntityType()?.annotations?.Common?.SemanticKey;
|
|
632
625
|
|
|
633
|
-
|
|
626
|
+
const semanticKeyColumns: string[] = [];
|
|
634
627
|
if (semanticKeyAnnotations) {
|
|
635
628
|
semanticKeyAnnotations.forEach(function (oColumn: any) {
|
|
636
629
|
semanticKeyColumns.push(oColumn.value);
|
|
@@ -644,7 +637,7 @@ export function createTableVisualization(
|
|
|
644
637
|
lineItemAnnotation: LineItem,
|
|
645
638
|
visualizationPath: string,
|
|
646
639
|
converterContext: ConverterContext,
|
|
647
|
-
presentationVariantAnnotation?:
|
|
640
|
+
presentationVariantAnnotation?: PresentationVariantType,
|
|
648
641
|
isCondensedTableLayoutCompliant?: boolean,
|
|
649
642
|
viewConfiguration?: ViewPathConfiguration
|
|
650
643
|
): TableVisualization {
|
|
@@ -660,6 +653,7 @@ export function createTableVisualization(
|
|
|
660
653
|
const columns = getTableColumns(lineItemAnnotation, visualizationPath, converterContext, navigationSettings);
|
|
661
654
|
const operationAvailableMap = getOperationAvailableMap(lineItemAnnotation, converterContext);
|
|
662
655
|
const semanticKeysAndHeaderInfoTitle = getSemanticKeysAndTitleInfo(converterContext);
|
|
656
|
+
const tableActions = getTableActions(lineItemAnnotation, visualizationPath, converterContext, navigationSettings);
|
|
663
657
|
const oVisualization: TableVisualization = {
|
|
664
658
|
type: VisualizationType.Table,
|
|
665
659
|
annotation: getTableAnnotationConfiguration(
|
|
@@ -672,7 +666,8 @@ export function createTableVisualization(
|
|
|
672
666
|
viewConfiguration
|
|
673
667
|
),
|
|
674
668
|
control: tableManifestConfig,
|
|
675
|
-
actions: removeDuplicateActions(
|
|
669
|
+
actions: removeDuplicateActions(tableActions.actions),
|
|
670
|
+
commandActions: tableActions.commandActions,
|
|
676
671
|
columns: columns,
|
|
677
672
|
operationAvailableMap: JSON.stringify(operationAvailableMap),
|
|
678
673
|
operationAvailableProperties: getOperationAvailableProperties(operationAvailableMap, converterContext),
|
|
@@ -719,53 +714,17 @@ export function createDefaultTableVisualization(converterContext: ConverterConte
|
|
|
719
714
|
*
|
|
720
715
|
* @param lineItemAnnotation The instance of the line item
|
|
721
716
|
* @param converterContext The instance of the converter context
|
|
722
|
-
* @returns
|
|
717
|
+
* @returns The record containing all action names and their corresponding Core.OperationAvailable property paths
|
|
723
718
|
*/
|
|
724
719
|
function getOperationAvailableMap(lineItemAnnotation: LineItem | undefined, converterContext: ConverterContext): Record<string, any> {
|
|
725
|
-
|
|
726
|
-
const addToMap = function (key: string, value: any) {
|
|
727
|
-
if (key) {
|
|
728
|
-
operationAvailableMap[key] = value;
|
|
729
|
-
}
|
|
730
|
-
};
|
|
731
|
-
|
|
732
|
-
if (lineItemAnnotation) {
|
|
733
|
-
lineItemAnnotation.forEach((dataField) => {
|
|
734
|
-
if (dataField.$Type === UIAnnotationTypes.DataFieldForAction) {
|
|
735
|
-
const actionName = dataField.Action as string;
|
|
736
|
-
if (actionName?.indexOf("/") < 0 && !dataField.Determining) {
|
|
737
|
-
const actionTarget = dataField.ActionTarget;
|
|
738
|
-
if (actionTarget?.annotations?.Core?.OperationAvailable === null) {
|
|
739
|
-
// Annotation explicitly configured with null (action advertisement related)
|
|
740
|
-
addToMap(actionName, null);
|
|
741
|
-
} else if (actionTarget?.parameters?.length) {
|
|
742
|
-
const bindingParameterFullName = actionTarget.parameters[0].fullyQualifiedName,
|
|
743
|
-
targetExpression = annotationExpression(
|
|
744
|
-
actionTarget?.annotations?.Core?.OperationAvailable,
|
|
745
|
-
[],
|
|
746
|
-
undefined,
|
|
747
|
-
(path: string) => bindingContextPathVisitor(path, converterContext, bindingParameterFullName)
|
|
748
|
-
) as BindingExpressionExpression<string>;
|
|
749
|
-
|
|
750
|
-
if (targetExpression?.path) {
|
|
751
|
-
addToMap(actionName, targetExpression.path);
|
|
752
|
-
} else if (actionTarget?.annotations?.Core?.OperationAvailable !== undefined) {
|
|
753
|
-
addToMap(actionName, targetExpression);
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
return operationAvailableMap;
|
|
720
|
+
return ActionHelper.getOperationAvailableMap(lineItemAnnotation, "table", converterContext);
|
|
762
721
|
}
|
|
763
722
|
|
|
764
723
|
/**
|
|
765
724
|
* Gets updatable propertyPath for the current entityset if valid.
|
|
766
725
|
*
|
|
767
726
|
* @param converterContext The instance of the converter context
|
|
768
|
-
* @returns
|
|
727
|
+
* @returns The updatable property for the rows
|
|
769
728
|
*/
|
|
770
729
|
function getCurrentEntitySetUpdatablePath(converterContext: ConverterContext): string {
|
|
771
730
|
const restrictions = getRestrictions(converterContext);
|
|
@@ -780,9 +739,9 @@ function getCurrentEntitySetUpdatablePath(converterContext: ConverterContext): s
|
|
|
780
739
|
/**
|
|
781
740
|
* Method to retrieve all property paths assigned to the Core.OperationAvailable annotation.
|
|
782
741
|
*
|
|
783
|
-
* @param
|
|
784
|
-
* @param
|
|
785
|
-
* @returns
|
|
742
|
+
* @param operationAvailableMap The record consisting of actions and their Core.OperationAvailable property paths
|
|
743
|
+
* @param converterContext The instance of the converter context
|
|
744
|
+
* @returns The CSV string of all property paths associated with the Core.OperationAvailable annotation
|
|
786
745
|
*/
|
|
787
746
|
function getOperationAvailableProperties(operationAvailableMap: Record<string, any>, converterContext: ConverterContext): string {
|
|
788
747
|
const properties = new Set();
|
|
@@ -826,8 +785,8 @@ function getUIHiddenExpForActionsRequiringContext(
|
|
|
826
785
|
currentEntityType: EntityType,
|
|
827
786
|
contextDataModelObjectPath: DataModelObjectPath,
|
|
828
787
|
isEntitySet: boolean
|
|
829
|
-
):
|
|
830
|
-
const aUiHiddenPathExpressions:
|
|
788
|
+
): BindingToolkitExpression<boolean>[] {
|
|
789
|
+
const aUiHiddenPathExpressions: BindingToolkitExpression<boolean>[] = [];
|
|
831
790
|
lineItemAnnotation.forEach((dataField) => {
|
|
832
791
|
// Check if the lineItem context is the same as that of the action:
|
|
833
792
|
if (
|
|
@@ -839,16 +798,7 @@ function getUIHiddenExpForActionsRequiringContext(
|
|
|
839
798
|
dataField?.Inline?.valueOf() !== true)
|
|
840
799
|
) {
|
|
841
800
|
if (typeof dataField.annotations?.UI?.Hidden?.valueOf() === "object") {
|
|
842
|
-
aUiHiddenPathExpressions.push(
|
|
843
|
-
equal(
|
|
844
|
-
getBindingExpFromContext(
|
|
845
|
-
dataField as DataFieldForAction | DataFieldForIntentBasedNavigation,
|
|
846
|
-
contextDataModelObjectPath,
|
|
847
|
-
isEntitySet
|
|
848
|
-
),
|
|
849
|
-
false
|
|
850
|
-
)
|
|
851
|
-
);
|
|
801
|
+
aUiHiddenPathExpressions.push(equal(getBindingExpFromContext(dataField, contextDataModelObjectPath, isEntitySet), false));
|
|
852
802
|
}
|
|
853
803
|
}
|
|
854
804
|
});
|
|
@@ -870,7 +820,7 @@ function getBindingExpFromContext(
|
|
|
870
820
|
source: DataFieldForAction | DataFieldForIntentBasedNavigation | CustomAction,
|
|
871
821
|
contextDataModelObjectPath: DataModelObjectPath,
|
|
872
822
|
isEntitySet: boolean
|
|
873
|
-
):
|
|
823
|
+
): BindingToolkitExpression<any> {
|
|
874
824
|
let sExpression: any | undefined;
|
|
875
825
|
if (
|
|
876
826
|
(source as DataFieldForAction)?.$Type === UIAnnotationTypes.DataFieldForAction ||
|
|
@@ -898,13 +848,13 @@ function getBindingExpFromContext(
|
|
|
898
848
|
contextDataModelObjectPath?.targetObject?._type === "NavigationProperty" &&
|
|
899
849
|
contextDataModelObjectPath.targetObject.partner === sNavigationPath
|
|
900
850
|
) {
|
|
901
|
-
return
|
|
851
|
+
return pathInModel(aSplitPath.slice(1).join("/"));
|
|
902
852
|
} else {
|
|
903
853
|
return constant(true);
|
|
904
854
|
}
|
|
905
855
|
// In case there is no navigation property, if it's an entitySet, the expression binding has to be returned:
|
|
906
856
|
} else if (isEntitySet) {
|
|
907
|
-
return
|
|
857
|
+
return pathInModel(sPath);
|
|
908
858
|
// otherwise the expression binding cannot be taken into account for the selection mode evaluation:
|
|
909
859
|
} else {
|
|
910
860
|
return constant(true);
|
|
@@ -919,7 +869,7 @@ function getBindingExpFromContext(
|
|
|
919
869
|
*
|
|
920
870
|
* @param lineItemAnnotation Collection of data fields for representation in a table or list
|
|
921
871
|
* @param currentEntityType Current Entity Type
|
|
922
|
-
* @returns
|
|
872
|
+
* @returns `true` if there is at least 1 action that meets the criteria
|
|
923
873
|
*/
|
|
924
874
|
function hasBoundActionsAlwaysVisibleInToolBar(lineItemAnnotation: LineItem, currentEntityType: EntityType): boolean {
|
|
925
875
|
return lineItemAnnotation.some((dataField) => {
|
|
@@ -957,8 +907,8 @@ function hasCustomActionsAlwaysVisibleInToolBar(manifestActions: Record<string,
|
|
|
957
907
|
* @param manifestActions The actions defined in the manifest
|
|
958
908
|
* @returns Array<Expression<boolean>> All the visible path expressions of the actions that meet the criteria
|
|
959
909
|
*/
|
|
960
|
-
function getVisibleExpForCustomActionsRequiringContext(manifestActions: Record<string, CustomAction>):
|
|
961
|
-
const aVisiblePathExpressions:
|
|
910
|
+
function getVisibleExpForCustomActionsRequiringContext(manifestActions: Record<string, CustomAction>): BindingToolkitExpression<boolean>[] {
|
|
911
|
+
const aVisiblePathExpressions: BindingToolkitExpression<boolean>[] = [];
|
|
962
912
|
if (manifestActions) {
|
|
963
913
|
Object.keys(manifestActions).forEach((actionKey) => {
|
|
964
914
|
const action = manifestActions[actionKey];
|
|
@@ -982,7 +932,7 @@ function getVisibleExpForCustomActionsRequiringContext(manifestActions: Record<s
|
|
|
982
932
|
* Evaluate if the path is statically deletable or updatable.
|
|
983
933
|
*
|
|
984
934
|
* @param converterContext
|
|
985
|
-
* @returns
|
|
935
|
+
* @returns The table capabilities
|
|
986
936
|
*/
|
|
987
937
|
export function getCapabilityRestriction(converterContext: ConverterContext): TableCapabilityRestriction {
|
|
988
938
|
const isDeletable = isPathDeletable(converterContext.getDataModelObjectPath());
|
|
@@ -999,16 +949,16 @@ export function getSelectionMode(
|
|
|
999
949
|
converterContext: ConverterContext,
|
|
1000
950
|
isEntitySet: boolean,
|
|
1001
951
|
targetCapabilities: TableCapabilityRestriction,
|
|
1002
|
-
deleteButtonVisibilityExpression?:
|
|
1003
|
-
massEditVisibilityExpression:
|
|
952
|
+
deleteButtonVisibilityExpression?: BindingToolkitExpression<boolean>,
|
|
953
|
+
massEditVisibilityExpression: BindingToolkitExpression<boolean> = constant(false)
|
|
1004
954
|
): string | undefined {
|
|
1005
955
|
if (!lineItemAnnotation) {
|
|
1006
956
|
return SelectionMode.None;
|
|
1007
957
|
}
|
|
1008
958
|
const tableManifestSettings = converterContext.getManifestControlConfiguration(visualizationPath);
|
|
1009
959
|
let selectionMode = tableManifestSettings.tableSettings?.selectionMode;
|
|
1010
|
-
let aHiddenBindingExpressions:
|
|
1011
|
-
aVisibleBindingExpressions:
|
|
960
|
+
let aHiddenBindingExpressions: BindingToolkitExpression<boolean>[] = [],
|
|
961
|
+
aVisibleBindingExpressions: BindingToolkitExpression<boolean>[] = [];
|
|
1012
962
|
const manifestActions = getActionsFromManifest(
|
|
1013
963
|
converterContext.getManifestControlConfiguration(visualizationPath).actions,
|
|
1014
964
|
converterContext,
|
|
@@ -1019,14 +969,14 @@ export function getSelectionMode(
|
|
|
1019
969
|
let isParentDeletable, parentEntitySetDeletable;
|
|
1020
970
|
if (converterContext.getTemplateType() === TemplateType.ObjectPage) {
|
|
1021
971
|
isParentDeletable = isPathDeletable(converterContext.getDataModelObjectPath());
|
|
1022
|
-
parentEntitySetDeletable = isParentDeletable ?
|
|
972
|
+
parentEntitySetDeletable = isParentDeletable ? compileExpression(isParentDeletable, true) : isParentDeletable;
|
|
1023
973
|
}
|
|
1024
974
|
|
|
1025
975
|
const bMassEditEnabled: boolean = !isConstant(massEditVisibilityExpression) || massEditVisibilityExpression.value !== false;
|
|
1026
976
|
if (selectionMode && selectionMode === SelectionMode.None && deleteButtonVisibilityExpression) {
|
|
1027
977
|
if (converterContext.getTemplateType() === TemplateType.ObjectPage && bMassEditEnabled) {
|
|
1028
978
|
// Mass Edit in OP is enabled only in edit mode.
|
|
1029
|
-
return
|
|
979
|
+
return compileExpression(
|
|
1030
980
|
ifElse(
|
|
1031
981
|
and(UI.IsEditable, massEditVisibilityExpression),
|
|
1032
982
|
constant("Multi"),
|
|
@@ -1037,7 +987,7 @@ export function getSelectionMode(
|
|
|
1037
987
|
return SelectionMode.Multi;
|
|
1038
988
|
}
|
|
1039
989
|
|
|
1040
|
-
return
|
|
990
|
+
return compileExpression(ifElse(deleteButtonVisibilityExpression, constant("Multi"), constant("None")));
|
|
1041
991
|
}
|
|
1042
992
|
if (!selectionMode || selectionMode === SelectionMode.Auto) {
|
|
1043
993
|
selectionMode = SelectionMode.Multi;
|
|
@@ -1049,7 +999,7 @@ export function getSelectionMode(
|
|
|
1049
999
|
|
|
1050
1000
|
if (
|
|
1051
1001
|
hasBoundActionsAlwaysVisibleInToolBar(lineItemAnnotation, converterContext.getEntityType()) ||
|
|
1052
|
-
hasCustomActionsAlwaysVisibleInToolBar(manifestActions)
|
|
1002
|
+
hasCustomActionsAlwaysVisibleInToolBar(manifestActions.actions)
|
|
1053
1003
|
) {
|
|
1054
1004
|
return selectionMode;
|
|
1055
1005
|
}
|
|
@@ -1059,7 +1009,7 @@ export function getSelectionMode(
|
|
|
1059
1009
|
converterContext.getDataModelObjectPath(),
|
|
1060
1010
|
isEntitySet
|
|
1061
1011
|
);
|
|
1062
|
-
aVisibleBindingExpressions = getVisibleExpForCustomActionsRequiringContext(manifestActions);
|
|
1012
|
+
aVisibleBindingExpressions = getVisibleExpForCustomActionsRequiringContext(manifestActions.actions);
|
|
1063
1013
|
|
|
1064
1014
|
// No action requiring a context:
|
|
1065
1015
|
if (
|
|
@@ -1075,7 +1025,7 @@ export function getSelectionMode(
|
|
|
1075
1025
|
deleteButtonVisibilityExpression || true, // default delete visibility as true
|
|
1076
1026
|
massEditVisibilityExpression
|
|
1077
1027
|
);
|
|
1078
|
-
return
|
|
1028
|
+
return compileExpression(
|
|
1079
1029
|
ifElse(and(UI.IsEditable, buttonVisibilityExpression), constant(selectionMode), constant(SelectionMode.None))
|
|
1080
1030
|
);
|
|
1081
1031
|
} else {
|
|
@@ -1086,7 +1036,7 @@ export function getSelectionMode(
|
|
|
1086
1036
|
// example: LR scenario
|
|
1087
1037
|
return selectionMode;
|
|
1088
1038
|
} else if (targetCapabilities.isDeletable && deleteButtonVisibilityExpression) {
|
|
1089
|
-
return
|
|
1039
|
+
return compileExpression(ifElse(deleteButtonVisibilityExpression, constant(selectionMode), constant("None")));
|
|
1090
1040
|
// EntitySet not deletable:
|
|
1091
1041
|
} else {
|
|
1092
1042
|
return SelectionMode.None;
|
|
@@ -1101,7 +1051,7 @@ export function getSelectionMode(
|
|
|
1101
1051
|
massEditVisibilityExpression,
|
|
1102
1052
|
constant(true)
|
|
1103
1053
|
);
|
|
1104
|
-
return
|
|
1054
|
+
return compileExpression(
|
|
1105
1055
|
ifElse(
|
|
1106
1056
|
and(UI.IsEditable, editModebuttonVisibilityExpression),
|
|
1107
1057
|
constant(selectionMode),
|
|
@@ -1113,7 +1063,7 @@ export function getSelectionMode(
|
|
|
1113
1063
|
)
|
|
1114
1064
|
);
|
|
1115
1065
|
} else {
|
|
1116
|
-
return
|
|
1066
|
+
return compileExpression(
|
|
1117
1067
|
ifElse(
|
|
1118
1068
|
or(...aHiddenBindingExpressions.concat(aVisibleBindingExpressions)),
|
|
1119
1069
|
constant(selectionMode),
|
|
@@ -1127,7 +1077,7 @@ export function getSelectionMode(
|
|
|
1127
1077
|
return selectionMode;
|
|
1128
1078
|
//EntitySet not deletable:
|
|
1129
1079
|
} else {
|
|
1130
|
-
return
|
|
1080
|
+
return compileExpression(
|
|
1131
1081
|
ifElse(
|
|
1132
1082
|
or(...aHiddenBindingExpressions.concat(aVisibleBindingExpressions), massEditVisibilityExpression),
|
|
1133
1083
|
constant(selectionMode),
|
|
@@ -1143,7 +1093,7 @@ export function getSelectionMode(
|
|
|
1143
1093
|
* @param lineItemAnnotation
|
|
1144
1094
|
* @param visualizationPath
|
|
1145
1095
|
* @param converterContext
|
|
1146
|
-
* @returns
|
|
1096
|
+
* @returns The table annotation actions
|
|
1147
1097
|
*/
|
|
1148
1098
|
function getTableAnnotationActions(lineItemAnnotation: LineItem, visualizationPath: string, converterContext: ConverterContext) {
|
|
1149
1099
|
const tableActions: BaseAction[] = [];
|
|
@@ -1164,10 +1114,10 @@ function getTableAnnotationActions(lineItemAnnotation: LineItem, visualizationPa
|
|
|
1164
1114
|
type: ActionType.DataFieldForAction,
|
|
1165
1115
|
annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
|
|
1166
1116
|
key: key,
|
|
1167
|
-
visible:
|
|
1117
|
+
visible: compileExpression(
|
|
1168
1118
|
not(
|
|
1169
1119
|
equal(
|
|
1170
|
-
|
|
1120
|
+
getExpressionFromAnnotation(
|
|
1171
1121
|
dataField.annotations?.UI?.Hidden,
|
|
1172
1122
|
[],
|
|
1173
1123
|
undefined,
|
|
@@ -1186,10 +1136,10 @@ function getTableAnnotationActions(lineItemAnnotation: LineItem, visualizationPa
|
|
|
1186
1136
|
type: ActionType.DataFieldForIntentBasedNavigation,
|
|
1187
1137
|
annotationPath: converterContext.getEntitySetBasedAnnotationPath(dataField.fullyQualifiedName),
|
|
1188
1138
|
key: key,
|
|
1189
|
-
visible:
|
|
1139
|
+
visible: compileExpression(
|
|
1190
1140
|
not(
|
|
1191
1141
|
equal(
|
|
1192
|
-
|
|
1142
|
+
getExpressionFromAnnotation(
|
|
1193
1143
|
dataField.annotations?.UI?.Hidden,
|
|
1194
1144
|
[],
|
|
1195
1145
|
undefined,
|
|
@@ -1225,11 +1175,11 @@ function getHighlightRowBinding(
|
|
|
1225
1175
|
criticalityAnnotation: PathAnnotationExpression<CriticalityType> | EnumValue<CriticalityType> | undefined,
|
|
1226
1176
|
isDraftRoot: boolean,
|
|
1227
1177
|
targetEntityType?: EntityType
|
|
1228
|
-
):
|
|
1229
|
-
let defaultHighlightRowDefinition: MessageType |
|
|
1178
|
+
): BindingToolkitExpression<MessageType> {
|
|
1179
|
+
let defaultHighlightRowDefinition: MessageType | BindingToolkitExpression<MessageType> = MessageType.None;
|
|
1230
1180
|
if (criticalityAnnotation) {
|
|
1231
1181
|
if (typeof criticalityAnnotation === "object") {
|
|
1232
|
-
defaultHighlightRowDefinition =
|
|
1182
|
+
defaultHighlightRowDefinition = getExpressionFromAnnotation(criticalityAnnotation) as BindingToolkitExpression<MessageType>;
|
|
1233
1183
|
} else {
|
|
1234
1184
|
// Enum Value so we get the corresponding static part
|
|
1235
1185
|
defaultHighlightRowDefinition = getMessageTypeFromCriticalityType(criticalityAnnotation);
|
|
@@ -1239,14 +1189,14 @@ function getHighlightRowBinding(
|
|
|
1239
1189
|
const aMissingKeys: any[] = [];
|
|
1240
1190
|
targetEntityType?.keys.forEach((key: any) => {
|
|
1241
1191
|
if (key.name !== "IsActiveEntity") {
|
|
1242
|
-
aMissingKeys.push(
|
|
1192
|
+
aMissingKeys.push(pathInModel(key.name, undefined));
|
|
1243
1193
|
}
|
|
1244
1194
|
});
|
|
1245
1195
|
|
|
1246
1196
|
return formatResult(
|
|
1247
1197
|
[
|
|
1248
1198
|
defaultHighlightRowDefinition,
|
|
1249
|
-
|
|
1199
|
+
pathInModel(`filteredMessages`, "internal"),
|
|
1250
1200
|
isDraftRoot && Entity.HasActive,
|
|
1251
1201
|
isDraftRoot && Entity.IsActive,
|
|
1252
1202
|
`${isDraftRoot}`,
|
|
@@ -1322,7 +1272,7 @@ const _getRowConfigurationProperty = function (
|
|
|
1322
1272
|
targetPath: string
|
|
1323
1273
|
) {
|
|
1324
1274
|
let pressProperty, navigationTarget;
|
|
1325
|
-
let criticalityProperty:
|
|
1275
|
+
let criticalityProperty: BindingToolkitExpression<MessageType> = constant(MessageType.None);
|
|
1326
1276
|
const targetEntityType = converterContext.getEntityType();
|
|
1327
1277
|
if (navigationSettings && lineItemAnnotation) {
|
|
1328
1278
|
navigationTarget = navigationSettings.display?.target || navigationSettings.detail?.outbound;
|
|
@@ -1351,17 +1301,17 @@ const _getRowConfigurationProperty = function (
|
|
|
1351
1301
|
}
|
|
1352
1302
|
}
|
|
1353
1303
|
}
|
|
1354
|
-
const rowNavigatedExpression:
|
|
1355
|
-
[
|
|
1304
|
+
const rowNavigatedExpression: BindingToolkitExpression<boolean> = formatResult(
|
|
1305
|
+
[pathInModel("/deepestPath", "internal")],
|
|
1356
1306
|
tableFormatters.navigatedRow,
|
|
1357
1307
|
targetEntityType
|
|
1358
1308
|
);
|
|
1359
1309
|
return {
|
|
1360
1310
|
press: pressProperty,
|
|
1361
1311
|
action: pressProperty ? "Navigation" : undefined,
|
|
1362
|
-
rowHighlighting:
|
|
1363
|
-
rowNavigated:
|
|
1364
|
-
visible:
|
|
1312
|
+
rowHighlighting: compileExpression(criticalityProperty),
|
|
1313
|
+
rowNavigated: compileExpression(rowNavigatedExpression),
|
|
1314
|
+
visible: compileExpression(not(UI.IsInactive))
|
|
1365
1315
|
};
|
|
1366
1316
|
};
|
|
1367
1317
|
|
|
@@ -1374,7 +1324,7 @@ const _getRowConfigurationProperty = function (
|
|
|
1374
1324
|
* @param nonSortableColumns The array of all non sortable column names.
|
|
1375
1325
|
* @param converterContext The converter context.
|
|
1376
1326
|
* @param tableType The table type.
|
|
1377
|
-
* @returns
|
|
1327
|
+
* @returns The column from the entityType
|
|
1378
1328
|
*/
|
|
1379
1329
|
export const getColumnsFromEntityType = function (
|
|
1380
1330
|
columnsToBeCreated: Record<string, Property>,
|
|
@@ -1384,7 +1334,7 @@ export const getColumnsFromEntityType = function (
|
|
|
1384
1334
|
converterContext: ConverterContext,
|
|
1385
1335
|
tableType: TableType
|
|
1386
1336
|
): AnnotationTableColumn[] {
|
|
1387
|
-
const tableColumns: AnnotationTableColumn[] =
|
|
1337
|
+
const tableColumns: AnnotationTableColumn[] = annotationColumns;
|
|
1388
1338
|
// Catch already existing columns - which were added before by LineItem Annotations
|
|
1389
1339
|
const aggregationHelper = new AggregationHelper(entityType, converterContext);
|
|
1390
1340
|
|
|
@@ -1395,7 +1345,12 @@ export const getColumnsFromEntityType = function (
|
|
|
1395
1345
|
});
|
|
1396
1346
|
|
|
1397
1347
|
// if target type exists, it is a complex property and should be ignored
|
|
1398
|
-
if (
|
|
1348
|
+
if (
|
|
1349
|
+
!property.targetType &&
|
|
1350
|
+
!exists &&
|
|
1351
|
+
property.annotations.UI &&
|
|
1352
|
+
!isReferencePropertyStaticallyHidden(property.annotations.UI.DataFieldDefault)
|
|
1353
|
+
) {
|
|
1399
1354
|
const relatedPropertiesInfo: ComplexPropertyInfo = collectRelatedProperties(
|
|
1400
1355
|
property.name,
|
|
1401
1356
|
property,
|
|
@@ -1463,20 +1418,25 @@ export const getColumnsFromEntityType = function (
|
|
|
1463
1418
|
tableColumns.push(columnInfo);
|
|
1464
1419
|
}
|
|
1465
1420
|
});
|
|
1466
|
-
|
|
1421
|
+
|
|
1422
|
+
// Create a propertyInfo for each related property.
|
|
1423
|
+
const relatedColumns = _createRelatedColumns(columnsToBeCreated, tableColumns, nonSortableColumns, converterContext, entityType);
|
|
1424
|
+
|
|
1425
|
+
return tableColumns.concat(relatedColumns);
|
|
1467
1426
|
};
|
|
1468
1427
|
|
|
1469
1428
|
/**
|
|
1470
1429
|
* Create a column definition from a property.
|
|
1471
|
-
*
|
|
1472
|
-
* @param
|
|
1473
|
-
* @param
|
|
1474
|
-
* @param
|
|
1475
|
-
* @param
|
|
1476
|
-
* @param
|
|
1477
|
-
* @param
|
|
1478
|
-
* @param
|
|
1479
|
-
* @
|
|
1430
|
+
*
|
|
1431
|
+
* @param property Entity type property for which the column is created
|
|
1432
|
+
* @param fullPropertyPath The full path to the target property
|
|
1433
|
+
* @param relativePath The relative path to the target property based on the context
|
|
1434
|
+
* @param useDataFieldPrefix Should be prefixed with "DataField::", else it will be prefixed with "Property::"
|
|
1435
|
+
* @param availableForAdaptation Decides whether the column should be available for adaptation
|
|
1436
|
+
* @param nonSortableColumns The array of all non-sortable column names
|
|
1437
|
+
* @param aggregationHelper The aggregationHelper for the entity
|
|
1438
|
+
* @param converterContext The converter context
|
|
1439
|
+
* @returns The annotation column definition
|
|
1480
1440
|
*/
|
|
1481
1441
|
const getColumnDefinitionFromProperty = function (
|
|
1482
1442
|
property: Property,
|
|
@@ -1488,7 +1448,7 @@ const getColumnDefinitionFromProperty = function (
|
|
|
1488
1448
|
aggregationHelper: AggregationHelper,
|
|
1489
1449
|
converterContext: ConverterContext
|
|
1490
1450
|
): AnnotationTableColumn {
|
|
1491
|
-
const name = useDataFieldPrefix ? relativePath :
|
|
1451
|
+
const name = useDataFieldPrefix ? relativePath : `Property::${relativePath}`;
|
|
1492
1452
|
const key = (useDataFieldPrefix ? "DataField::" : "Property::") + replaceSpecialChars(relativePath);
|
|
1493
1453
|
const semanticObjectAnnotationPath = getSemanticObjectPath(converterContext, property);
|
|
1494
1454
|
const isHidden = property.annotations?.UI?.Hidden?.valueOf() === true;
|
|
@@ -1575,8 +1535,8 @@ const getColumnDefinitionFromProperty = function (
|
|
|
1575
1535
|
/**
|
|
1576
1536
|
* Returns Boolean true for valid columns, false for invalid columns.
|
|
1577
1537
|
*
|
|
1578
|
-
* @param
|
|
1579
|
-
* @returns
|
|
1538
|
+
* @param dataField Different DataField types defined in the annotations
|
|
1539
|
+
* @returns True for valid columns, false for invalid columns
|
|
1580
1540
|
* @private
|
|
1581
1541
|
*/
|
|
1582
1542
|
const _isValidColumn = function (dataField: DataFieldAbstractTypes) {
|
|
@@ -1596,23 +1556,20 @@ const _isValidColumn = function (dataField: DataFieldAbstractTypes) {
|
|
|
1596
1556
|
// throw new Error("Unhandled DataField Abstract type: " + dataField.$Type);
|
|
1597
1557
|
}
|
|
1598
1558
|
};
|
|
1599
|
-
|
|
1600
1559
|
/**
|
|
1601
1560
|
* Returns the binding expression to evaluate the visibility of a DataField or DataPoint annotation.
|
|
1602
1561
|
*
|
|
1603
1562
|
* SAP Fiori elements will evaluate either the UI.Hidden annotation defined on the annotation itself or on the target property.
|
|
1604
1563
|
*
|
|
1605
|
-
* @param
|
|
1606
|
-
* @param
|
|
1607
|
-
* @param
|
|
1608
|
-
* @
|
|
1609
|
-
* @returns {BindingExpression<string>} An expression that you can bind to the UI.
|
|
1564
|
+
* @param dataFieldModelPath The metapath referring to the annotation that is evaluated by SAP Fiori elements.
|
|
1565
|
+
* @param [formatOptions] FormatOptions optional.
|
|
1566
|
+
* @param formatOptions.isAnalytics This flag is used to check if the analytic table has GroupHeader expanded.
|
|
1567
|
+
* @returns An expression that you can bind to the UI.
|
|
1610
1568
|
*/
|
|
1611
1569
|
export const _getVisibleExpression = function (
|
|
1612
1570
|
dataFieldModelPath: DataModelObjectPath,
|
|
1613
|
-
formatOptions?: any
|
|
1614
|
-
|
|
1615
|
-
): BindingExpression<string> {
|
|
1571
|
+
formatOptions?: any
|
|
1572
|
+
): BindingToolkitExpression<any> {
|
|
1616
1573
|
const targetObject: DataFieldAbstractTypes | DataPointTypeTypes = dataFieldModelPath.targetObject;
|
|
1617
1574
|
let propertyValue;
|
|
1618
1575
|
if (targetObject) {
|
|
@@ -1644,41 +1601,43 @@ export const _getVisibleExpression = function (
|
|
|
1644
1601
|
// - the UI.Hidden expression in the original annotation does not evaluate to 'true'
|
|
1645
1602
|
// - the UI.Hidden expression in the target property does not evaluate to 'true'
|
|
1646
1603
|
// - in case of Analytics it's not visible for an expanded GroupHeader
|
|
1647
|
-
|
|
1604
|
+
return and(
|
|
1648
1605
|
...[
|
|
1649
|
-
not(equal(
|
|
1650
|
-
ifElse(
|
|
1606
|
+
not(equal(getExpressionFromAnnotation(targetObject?.annotations?.UI?.Hidden), true)),
|
|
1607
|
+
ifElse(
|
|
1608
|
+
!!propertyValue,
|
|
1609
|
+
propertyValue && not(equal(getExpressionFromAnnotation(propertyValue.annotations?.UI?.Hidden), true)),
|
|
1610
|
+
true
|
|
1611
|
+
),
|
|
1651
1612
|
or(not(isAnalyticalGroupHeaderExpanded), isAnalyticalLeaf)
|
|
1652
1613
|
]
|
|
1653
1614
|
);
|
|
1654
|
-
return returnExpression ? (expression as any as BindingExpression<string>) : compileBinding(expression);
|
|
1655
1615
|
};
|
|
1656
1616
|
|
|
1657
1617
|
/**
|
|
1658
1618
|
* Returns hidden binding expressions for a field group.
|
|
1659
|
-
*
|
|
1660
|
-
* @param
|
|
1661
|
-
* @param
|
|
1662
|
-
* @
|
|
1619
|
+
*
|
|
1620
|
+
* @param dataFieldGroup DataField defined in the annotations
|
|
1621
|
+
* @param fieldFormatOptions FormatOptions optional.
|
|
1622
|
+
* @param fieldFormatOptions.isAnalytics This flag is used to check if the analytic table has GroupHeader expanded.
|
|
1623
|
+
* @returns Compile binding of field group expressions.
|
|
1663
1624
|
* @private
|
|
1664
1625
|
*/
|
|
1665
1626
|
const _getFieldGroupHiddenExpressions = function (
|
|
1666
1627
|
dataFieldGroup: DataFieldAbstractTypes,
|
|
1667
1628
|
fieldFormatOptions: any
|
|
1668
|
-
):
|
|
1669
|
-
const aFieldGroupHiddenExpressions:
|
|
1629
|
+
): CompiledBindingToolkitExpression | undefined {
|
|
1630
|
+
const aFieldGroupHiddenExpressions: BindingToolkitExpression<any>[] = [];
|
|
1670
1631
|
if (
|
|
1671
1632
|
dataFieldGroup.$Type === UIAnnotationTypes.DataFieldForAnnotation &&
|
|
1672
1633
|
dataFieldGroup.Target?.$target?.$Type === UIAnnotationTypes.FieldGroupType
|
|
1673
1634
|
) {
|
|
1674
1635
|
dataFieldGroup.Target.$target.Data?.forEach((innerDataField: DataFieldAbstractTypes | DataPointTypeTypes) => {
|
|
1675
1636
|
aFieldGroupHiddenExpressions.push(
|
|
1676
|
-
_getVisibleExpression({ targetObject: innerDataField } as DataModelObjectPath, fieldFormatOptions
|
|
1637
|
+
_getVisibleExpression({ targetObject: innerDataField } as DataModelObjectPath, fieldFormatOptions)
|
|
1677
1638
|
);
|
|
1678
1639
|
});
|
|
1679
|
-
return
|
|
1680
|
-
ifElse(or(...(aFieldGroupHiddenExpressions as any as ExpressionOrPrimitive<boolean>[])), constant(true), constant(false))
|
|
1681
|
-
);
|
|
1640
|
+
return compileExpression(ifElse(or(...aFieldGroupHiddenExpressions), constant(true), constant(false)));
|
|
1682
1641
|
} else {
|
|
1683
1642
|
return undefined;
|
|
1684
1643
|
}
|
|
@@ -1686,9 +1645,10 @@ const _getFieldGroupHiddenExpressions = function (
|
|
|
1686
1645
|
|
|
1687
1646
|
/**
|
|
1688
1647
|
* Returns the label for the property and dataField.
|
|
1689
|
-
*
|
|
1648
|
+
*
|
|
1649
|
+
* @param [property] Property or DataField defined in the annotations
|
|
1690
1650
|
* @param isGroup
|
|
1691
|
-
* @returns
|
|
1651
|
+
* @returns Label of the property or DataField
|
|
1692
1652
|
* @private
|
|
1693
1653
|
*/
|
|
1694
1654
|
const _getLabel = function (property: DataFieldAbstractTypes | Property, isGroup: boolean = false): string | undefined {
|
|
@@ -1698,26 +1658,26 @@ const _getLabel = function (property: DataFieldAbstractTypes | Property, isGroup
|
|
|
1698
1658
|
if (isProperty(property)) {
|
|
1699
1659
|
const dataFieldDefault = property.annotations?.UI?.DataFieldDefault;
|
|
1700
1660
|
if (dataFieldDefault && !dataFieldDefault.qualifier && dataFieldDefault.Label?.valueOf()) {
|
|
1701
|
-
return
|
|
1661
|
+
return compileExpression(getExpressionFromAnnotation(dataFieldDefault.Label?.valueOf()));
|
|
1702
1662
|
}
|
|
1703
|
-
return
|
|
1663
|
+
return compileExpression(getExpressionFromAnnotation(property.annotations.Common?.Label?.valueOf() || property.name));
|
|
1704
1664
|
} else if (isDataFieldTypes(property)) {
|
|
1705
1665
|
if (!!isGroup && property.$Type === UIAnnotationTypes.DataFieldWithIntentBasedNavigation) {
|
|
1706
|
-
return
|
|
1666
|
+
return compileExpression(getExpressionFromAnnotation(property.Label?.valueOf()));
|
|
1707
1667
|
}
|
|
1708
|
-
return
|
|
1709
|
-
|
|
1668
|
+
return compileExpression(
|
|
1669
|
+
getExpressionFromAnnotation(
|
|
1710
1670
|
property.Label?.valueOf() || property.Value?.$target?.annotations?.Common?.Label?.valueOf() || property.Value?.$target?.name
|
|
1711
1671
|
)
|
|
1712
1672
|
);
|
|
1713
1673
|
} else if (property.$Type === UIAnnotationTypes.DataFieldForAnnotation) {
|
|
1714
|
-
return
|
|
1715
|
-
|
|
1674
|
+
return compileExpression(
|
|
1675
|
+
getExpressionFromAnnotation(
|
|
1716
1676
|
property.Label?.valueOf() || (property.Target?.$target as DataPoint)?.Value?.$target?.annotations?.Common?.Label?.valueOf()
|
|
1717
1677
|
)
|
|
1718
1678
|
);
|
|
1719
1679
|
} else {
|
|
1720
|
-
return
|
|
1680
|
+
return compileExpression(getExpressionFromAnnotation(property.Label?.valueOf()));
|
|
1721
1681
|
}
|
|
1722
1682
|
};
|
|
1723
1683
|
|
|
@@ -1726,38 +1686,38 @@ const _getTooltip = function (source: DataFieldAbstractTypes | Property): string
|
|
|
1726
1686
|
return undefined;
|
|
1727
1687
|
}
|
|
1728
1688
|
|
|
1729
|
-
if (isProperty(source)) {
|
|
1730
|
-
return source.annotations
|
|
1731
|
-
?
|
|
1689
|
+
if (isProperty(source) || source.annotations?.Common?.QuickInfo) {
|
|
1690
|
+
return source.annotations?.Common?.QuickInfo
|
|
1691
|
+
? compileExpression(getExpressionFromAnnotation(source.annotations.Common.QuickInfo.valueOf()))
|
|
1732
1692
|
: undefined;
|
|
1733
1693
|
} else if (isDataFieldTypes(source)) {
|
|
1734
1694
|
return source.Value?.$target?.annotations?.Common?.QuickInfo
|
|
1735
|
-
?
|
|
1695
|
+
? compileExpression(getExpressionFromAnnotation(source.Value.$target.annotations.Common.QuickInfo.valueOf()))
|
|
1736
1696
|
: undefined;
|
|
1737
1697
|
} else if (source.$Type === UIAnnotationTypes.DataFieldForAnnotation) {
|
|
1738
1698
|
const datapointTarget = source.Target?.$target as DataPoint;
|
|
1739
1699
|
return datapointTarget?.Value?.$target?.annotations?.Common?.QuickInfo
|
|
1740
|
-
?
|
|
1700
|
+
? compileExpression(getExpressionFromAnnotation(datapointTarget.Value.$target.annotations.Common.QuickInfo.valueOf()))
|
|
1741
1701
|
: undefined;
|
|
1742
1702
|
} else {
|
|
1743
1703
|
return undefined;
|
|
1744
1704
|
}
|
|
1745
1705
|
};
|
|
1746
|
-
export function getRowStatusVisibility():
|
|
1706
|
+
export function getRowStatusVisibility(): BindingToolkitExpression<boolean> {
|
|
1747
1707
|
return formatResult(
|
|
1748
|
-
[
|
|
1708
|
+
[pathInModel(`semanticKeyHasDraftIndicator`, "internal"), pathInModel(`filteredMessages`, "internal")],
|
|
1749
1709
|
tableFormatters.getErrorStatusTextVisibilityFormatter
|
|
1750
1710
|
);
|
|
1751
1711
|
}
|
|
1752
1712
|
/**
|
|
1753
1713
|
* Creates a PropertyInfo for each identified property consumed by a LineItem.
|
|
1754
1714
|
*
|
|
1755
|
-
* @param
|
|
1715
|
+
* @param columnsToBeCreated Identified properties.
|
|
1756
1716
|
* @param existingColumns The list of columns created for LineItems and Properties of entityType.
|
|
1757
1717
|
* @param nonSortableColumns The array of column names which cannot be sorted.
|
|
1758
1718
|
* @param converterContext The converter context.
|
|
1759
1719
|
* @param entityType The entity type for the LineItem
|
|
1760
|
-
* @returns
|
|
1720
|
+
* @returns The array of columns created.
|
|
1761
1721
|
*/
|
|
1762
1722
|
const _createRelatedColumns = function (
|
|
1763
1723
|
columnsToBeCreated: Record<string, Property>,
|
|
@@ -1798,24 +1758,24 @@ const _createRelatedColumns = function (
|
|
|
1798
1758
|
// Case 3: This is a self reference from an existing column and
|
|
1799
1759
|
// both cases require a dummy PropertyInfo for setting correct export settings.
|
|
1800
1760
|
|
|
1801
|
-
const newName =
|
|
1761
|
+
const newName = `Property::${name}`;
|
|
1802
1762
|
|
|
1803
1763
|
// Checking whether the related property column has already been created in a previous iteration.
|
|
1804
1764
|
if (!existingColumns.some((column) => column.name === newName)) {
|
|
1805
1765
|
// Create a new property column with 'Property::' prefix,
|
|
1806
1766
|
// Set it to hidden as it is only consumed by Complex property infos.
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
converterContext
|
|
1817
|
-
)
|
|
1767
|
+
const column = getColumnDefinitionFromProperty(
|
|
1768
|
+
property,
|
|
1769
|
+
annotationPath,
|
|
1770
|
+
name,
|
|
1771
|
+
false,
|
|
1772
|
+
false,
|
|
1773
|
+
nonSortableColumns,
|
|
1774
|
+
aggregationHelper,
|
|
1775
|
+
converterContext
|
|
1818
1776
|
);
|
|
1777
|
+
column.isPartOfLineItem = relatedColumn.isPartOfLineItem;
|
|
1778
|
+
relatedColumns.push(column);
|
|
1819
1779
|
relatedPropertyNameMap[name] = newName;
|
|
1820
1780
|
}
|
|
1821
1781
|
}
|
|
@@ -1838,8 +1798,8 @@ const _createRelatedColumns = function (
|
|
|
1838
1798
|
* If it points to a DataField with one property or DataPoint with one property, it will use the property name
|
|
1839
1799
|
* here to be consistent with the existing flex changes.
|
|
1840
1800
|
*
|
|
1841
|
-
* @param
|
|
1842
|
-
* @returns
|
|
1801
|
+
* @param dataField Different DataField types defined in the annotations
|
|
1802
|
+
* @returns The name of annotation columns
|
|
1843
1803
|
* @private
|
|
1844
1804
|
*/
|
|
1845
1805
|
const _getAnnotationColumnName = function (dataField: DataFieldAbstractTypes) {
|
|
@@ -1856,10 +1816,11 @@ const _getAnnotationColumnName = function (dataField: DataFieldAbstractTypes) {
|
|
|
1856
1816
|
|
|
1857
1817
|
/**
|
|
1858
1818
|
* Determines if the data field labels have to be displayed in the table.
|
|
1859
|
-
*
|
|
1860
|
-
* @param
|
|
1861
|
-
* @param
|
|
1862
|
-
* @
|
|
1819
|
+
*
|
|
1820
|
+
* @param fieldGroupName The `DataField` name being processed.
|
|
1821
|
+
* @param visualizationPath
|
|
1822
|
+
* @param converterContext
|
|
1823
|
+
* @returns `showDataFieldsLabel` value from the manifest
|
|
1863
1824
|
* @private
|
|
1864
1825
|
*/
|
|
1865
1826
|
const _getShowDataFieldsLabel = function (fieldGroupName: string, visualizationPath: string, converterContext: ConverterContext): boolean {
|
|
@@ -1875,8 +1836,9 @@ const _getShowDataFieldsLabel = function (fieldGroupName: string, visualizationP
|
|
|
1875
1836
|
|
|
1876
1837
|
/**
|
|
1877
1838
|
* Determines the relative path of the property with respect to the root entity.
|
|
1839
|
+
*
|
|
1878
1840
|
* @param dataField The `DataField` being processed.
|
|
1879
|
-
* @returns
|
|
1841
|
+
* @returns The relative path
|
|
1880
1842
|
*/
|
|
1881
1843
|
const _getRelativePath = function (dataField: DataFieldAbstractTypes): string {
|
|
1882
1844
|
let relativePath: string = "";
|
|
@@ -1891,11 +1853,13 @@ const _getRelativePath = function (dataField: DataFieldAbstractTypes): string {
|
|
|
1891
1853
|
break;
|
|
1892
1854
|
|
|
1893
1855
|
case UIAnnotationTypes.DataFieldForAnnotation:
|
|
1894
|
-
relativePath =
|
|
1856
|
+
relativePath = dataField?.Target?.value;
|
|
1895
1857
|
break;
|
|
1896
1858
|
|
|
1897
1859
|
case UIAnnotationTypes.DataFieldForAction:
|
|
1898
1860
|
case UIAnnotationTypes.DataFieldForIntentBasedNavigation:
|
|
1861
|
+
case UIAnnotationTypes.DataFieldForActionGroup:
|
|
1862
|
+
case UIAnnotationTypes.DataFieldWithActionGroup:
|
|
1899
1863
|
relativePath = KeyHelper.generateKeyFromDataField(dataField);
|
|
1900
1864
|
break;
|
|
1901
1865
|
}
|
|
@@ -1918,33 +1882,23 @@ const _sliceAtSlash = function (path: string, isLastSlash: boolean, isLastPart:
|
|
|
1918
1882
|
* @param dataField The data field being processed
|
|
1919
1883
|
* @param propertyPath The property path
|
|
1920
1884
|
* @param nonSortableColumns Collection of non-sortable column names as per annotation
|
|
1921
|
-
* @returns
|
|
1885
|
+
* @returns True if the column is sortable
|
|
1922
1886
|
*/
|
|
1923
1887
|
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;
|
|
1888
|
+
return (
|
|
1889
|
+
nonSortableColumns.indexOf(propertyPath) === -1 && // Column is not marked as non-sortable via annotation
|
|
1890
|
+
(dataField.$Type === UIAnnotationTypes.DataField ||
|
|
1891
|
+
dataField.$Type === UIAnnotationTypes.DataFieldWithUrl ||
|
|
1892
|
+
dataField.$Type === UIAnnotationTypes.DataFieldWithIntentBasedNavigation ||
|
|
1893
|
+
dataField.$Type === UIAnnotationTypes.DataFieldWithAction)
|
|
1894
|
+
);
|
|
1941
1895
|
};
|
|
1942
1896
|
|
|
1943
1897
|
/**
|
|
1944
1898
|
* Returns whether filtering on the table is case sensitive.
|
|
1945
1899
|
*
|
|
1946
|
-
* @param
|
|
1947
|
-
* @returns
|
|
1900
|
+
* @param converterContext The instance of the converter context
|
|
1901
|
+
* @returns Returns 'false' if FilterFunctions annotation supports 'tolower', else 'true'
|
|
1948
1902
|
*/
|
|
1949
1903
|
export const isFilteringCaseSensitive = function (converterContext: ConverterContext): boolean {
|
|
1950
1904
|
const filterFunctions: FilterFunctions | undefined =
|
|
@@ -1956,7 +1910,7 @@ export const isFilteringCaseSensitive = function (converterContext: ConverterCon
|
|
|
1956
1910
|
/**
|
|
1957
1911
|
* Returns default format options for text fields in a table.
|
|
1958
1912
|
*
|
|
1959
|
-
* @returns
|
|
1913
|
+
* @returns Collection of format options with default values
|
|
1960
1914
|
*/
|
|
1961
1915
|
function getDefaultFormatOptionsForTable(): FormatOptionsType {
|
|
1962
1916
|
return {
|
|
@@ -2026,11 +1980,12 @@ function _findSemanticKeyValuesInFieldGroup(dataFieldGroup: DataFieldAbstractTyp
|
|
|
2026
1980
|
|
|
2027
1981
|
/**
|
|
2028
1982
|
* Returns default format options with draftIndicator for a column.
|
|
1983
|
+
*
|
|
2029
1984
|
* @param name
|
|
2030
1985
|
* @param semanticKeys
|
|
2031
1986
|
* @param isFieldGroupColumn
|
|
2032
1987
|
* @param dataFieldGroup
|
|
2033
|
-
* @returns
|
|
1988
|
+
* @returns Collection of format options with default values
|
|
2034
1989
|
*/
|
|
2035
1990
|
function getDefaultDraftIndicatorForColumn(
|
|
2036
1991
|
name: string,
|
|
@@ -2047,18 +2002,16 @@ function getDefaultDraftIndicatorForColumn(
|
|
|
2047
2002
|
return {
|
|
2048
2003
|
hasDraftIndicator: true,
|
|
2049
2004
|
semantickeys: semanticKey.values,
|
|
2050
|
-
objectStatusTextVisibility:
|
|
2005
|
+
objectStatusTextVisibility: compileExpression(getRowStatusVisibility())
|
|
2051
2006
|
};
|
|
2007
|
+
} else if (!semanticKeyInFieldGroup.semanticKeyHasPropertyInFieldGroup) {
|
|
2008
|
+
return {};
|
|
2052
2009
|
} else {
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
FieldGroupDraftIndicatorPropertyPath: semanticKeyInFieldGroup.propertyPath,
|
|
2059
|
-
FieldGroupName: name
|
|
2060
|
-
};
|
|
2061
|
-
}
|
|
2010
|
+
// Semantic Key has a property in a FieldGroup
|
|
2011
|
+
return {
|
|
2012
|
+
FieldGroupDraftIndicatorPropertyPath: semanticKeyInFieldGroup.propertyPath,
|
|
2013
|
+
FieldGroupName: name
|
|
2014
|
+
};
|
|
2062
2015
|
}
|
|
2063
2016
|
}
|
|
2064
2017
|
|
|
@@ -2104,7 +2057,7 @@ function _getMaxImportance(fields: DataFieldTypes[]): Importance {
|
|
|
2104
2057
|
*
|
|
2105
2058
|
* @param dataField
|
|
2106
2059
|
* @param semanticKeys
|
|
2107
|
-
* @returns
|
|
2060
|
+
* @returns The importance value
|
|
2108
2061
|
*/
|
|
2109
2062
|
export function getImportance(dataField: DataFieldAbstractTypes, semanticKeys: SemanticKey): Importance | undefined {
|
|
2110
2063
|
//Evaluate default Importance is not set explicitly
|
|
@@ -2158,10 +2111,10 @@ export function getImportance(dataField: DataFieldAbstractTypes, semanticKeys: S
|
|
|
2158
2111
|
/**
|
|
2159
2112
|
* Returns line items from metadata annotations.
|
|
2160
2113
|
*
|
|
2161
|
-
* @param
|
|
2162
|
-
* @param
|
|
2163
|
-
* @param
|
|
2164
|
-
* @returns
|
|
2114
|
+
* @param lineItemAnnotation Collection of data fields with their annotations
|
|
2115
|
+
* @param visualizationPath The visualization path
|
|
2116
|
+
* @param converterContext The converter context
|
|
2117
|
+
* @returns The columns from the annotations
|
|
2165
2118
|
*/
|
|
2166
2119
|
const getColumnsFromAnnotations = function (
|
|
2167
2120
|
lineItemAnnotation: LineItem,
|
|
@@ -2179,7 +2132,7 @@ const getColumnsFromAnnotations = function (
|
|
|
2179
2132
|
])[0];
|
|
2180
2133
|
if (lineItemAnnotation) {
|
|
2181
2134
|
lineItemAnnotation.forEach((lineItem) => {
|
|
2182
|
-
if (!_isValidColumn(lineItem)) {
|
|
2135
|
+
if (!_isValidColumn(lineItem) || isReferencePropertyStaticallyHidden(lineItem)) {
|
|
2183
2136
|
return;
|
|
2184
2137
|
}
|
|
2185
2138
|
const semanticObjectAnnotationPath =
|
|
@@ -2187,9 +2140,24 @@ const getColumnsFromAnnotations = function (
|
|
|
2187
2140
|
? getSemanticObjectPath(converterContext, lineItem)
|
|
2188
2141
|
: undefined;
|
|
2189
2142
|
const relativePath = _getRelativePath(lineItem);
|
|
2143
|
+
let relatedPropertyNames: string[];
|
|
2190
2144
|
// Determine properties which are consumed by this LineItem.
|
|
2191
2145
|
const relatedPropertiesInfo: ComplexPropertyInfo = collectRelatedPropertiesRecursively(lineItem, converterContext, tableType);
|
|
2192
|
-
const
|
|
2146
|
+
const relatedProperties: any = relatedPropertiesInfo.properties;
|
|
2147
|
+
if (
|
|
2148
|
+
lineItem.$Type === UIAnnotationTypes.DataFieldForAnnotation &&
|
|
2149
|
+
lineItem.Target?.$target?.$Type === UIAnnotationTypes.FieldGroupType
|
|
2150
|
+
) {
|
|
2151
|
+
relatedPropertyNames = Object.keys(relatedPropertiesInfo.properties).filter((key) => {
|
|
2152
|
+
let isStaticallyHidden;
|
|
2153
|
+
if (relatedProperties[key].annotations?.UI)
|
|
2154
|
+
isStaticallyHidden = isReferencePropertyStaticallyHidden(relatedProperties[key].annotations?.UI?.DataFieldDefault);
|
|
2155
|
+
else isStaticallyHidden = isReferencePropertyStaticallyHidden(relatedProperties[key]);
|
|
2156
|
+
return !isStaticallyHidden;
|
|
2157
|
+
});
|
|
2158
|
+
} else {
|
|
2159
|
+
relatedPropertyNames = Object.keys(relatedPropertiesInfo.properties);
|
|
2160
|
+
}
|
|
2193
2161
|
const additionalPropertyNames: string[] = Object.keys(relatedPropertiesInfo.additionalProperties);
|
|
2194
2162
|
const groupPath: string = _sliceAtSlash(relativePath, true, false);
|
|
2195
2163
|
const isGroup: boolean = groupPath != relativePath;
|
|
@@ -2205,7 +2173,7 @@ const getColumnsFromAnnotations = function (
|
|
|
2205
2173
|
...getDefaultFormatOptionsForTable(),
|
|
2206
2174
|
...getDefaultDraftIndicatorForColumn(name, semanticKeys, isFieldGroupColumn, lineItem)
|
|
2207
2175
|
};
|
|
2208
|
-
let fieldGroupHiddenExpressions:
|
|
2176
|
+
let fieldGroupHiddenExpressions: CompiledBindingToolkitExpression;
|
|
2209
2177
|
if (
|
|
2210
2178
|
lineItem.$Type === UIAnnotationTypes.DataFieldForAnnotation &&
|
|
2211
2179
|
lineItem.Target?.$target?.$Type === UIAnnotationTypes.FieldGroupType
|
|
@@ -2247,7 +2215,7 @@ const getColumnsFromAnnotations = function (
|
|
|
2247
2215
|
// In case of text arrangement annotation with display mode as text only, exclude text property from the width calculation
|
|
2248
2216
|
visualSettings = {
|
|
2249
2217
|
widthCalculation: {
|
|
2250
|
-
excludeProperties: [
|
|
2218
|
+
excludeProperties: [`Property::${relatedPropertiesInfo.visualSettingsToBeExcluded}`]
|
|
2251
2219
|
}
|
|
2252
2220
|
};
|
|
2253
2221
|
} else if (!dataType || !oTypeConfig) {
|
|
@@ -2269,7 +2237,7 @@ const getColumnsFromAnnotations = function (
|
|
|
2269
2237
|
showDataFieldsLabel: showDataFieldsLabel,
|
|
2270
2238
|
relativePath: relativePath,
|
|
2271
2239
|
sortable: _isColumnSortable(lineItem, relativePath, nonSortableColumns),
|
|
2272
|
-
propertyInfos: relatedPropertyNames.length
|
|
2240
|
+
propertyInfos: relatedPropertyNames.length ? relatedPropertyNames : undefined,
|
|
2273
2241
|
additionalPropertyInfos: additionalPropertyNames.length > 0 ? additionalPropertyNames : undefined,
|
|
2274
2242
|
exportSettings: exportSettings,
|
|
2275
2243
|
width: lineItem.annotations?.HTML5?.CssDefaults?.width || undefined,
|
|
@@ -2280,7 +2248,8 @@ const getColumnsFromAnnotations = function (
|
|
|
2280
2248
|
caseSensitive: isFilteringCaseSensitive(converterContext),
|
|
2281
2249
|
typeConfig: oTypeConfig,
|
|
2282
2250
|
visualSettings: visualSettings,
|
|
2283
|
-
timezoneText: exportSettings.timezone
|
|
2251
|
+
timezoneText: exportSettings.timezone,
|
|
2252
|
+
isPartOfLineItem: true
|
|
2284
2253
|
};
|
|
2285
2254
|
const sTooltip = _getTooltip(lineItem);
|
|
2286
2255
|
if (sTooltip) {
|
|
@@ -2290,44 +2259,31 @@ const getColumnsFromAnnotations = function (
|
|
|
2290
2259
|
annotationColumns.push(oColumn as AnnotationTableColumn);
|
|
2291
2260
|
|
|
2292
2261
|
// Collect information of related columns to be created.
|
|
2293
|
-
relatedPropertyNames.forEach((
|
|
2294
|
-
columnsToBeCreated[
|
|
2262
|
+
relatedPropertyNames.forEach((relatedPropertyName) => {
|
|
2263
|
+
columnsToBeCreated[relatedPropertyName] = relatedPropertiesInfo.properties[relatedPropertyName];
|
|
2295
2264
|
});
|
|
2296
2265
|
|
|
2297
2266
|
// Create columns for additional properties identified for ALP use case.
|
|
2298
|
-
additionalPropertyNames.forEach((
|
|
2267
|
+
additionalPropertyNames.forEach((additionalPropertyName) => {
|
|
2299
2268
|
// Intentional overwrite as we require only one new PropertyInfo for a related Property.
|
|
2300
|
-
columnsToBeCreated[
|
|
2269
|
+
columnsToBeCreated[additionalPropertyName] = relatedPropertiesInfo.additionalProperties[additionalPropertyName];
|
|
2301
2270
|
});
|
|
2302
2271
|
});
|
|
2303
2272
|
}
|
|
2304
2273
|
|
|
2305
2274
|
// Get columns from the Properties of EntityType
|
|
2306
|
-
|
|
2307
|
-
columnsToBeCreated,
|
|
2308
|
-
entityType,
|
|
2309
|
-
annotationColumns,
|
|
2310
|
-
nonSortableColumns,
|
|
2311
|
-
converterContext,
|
|
2312
|
-
tableType
|
|
2313
|
-
);
|
|
2314
|
-
tableColumns = tableColumns.concat(annotationColumns);
|
|
2315
|
-
|
|
2316
|
-
// Create a propertyInfo for each related property.
|
|
2317
|
-
const relatedColumns = _createRelatedColumns(columnsToBeCreated, tableColumns, nonSortableColumns, converterContext, entityType);
|
|
2318
|
-
tableColumns = tableColumns.concat(relatedColumns);
|
|
2319
|
-
|
|
2320
|
-
return tableColumns;
|
|
2275
|
+
return getColumnsFromEntityType(columnsToBeCreated, entityType, annotationColumns, nonSortableColumns, converterContext, tableType);
|
|
2321
2276
|
};
|
|
2322
2277
|
|
|
2323
2278
|
/**
|
|
2324
2279
|
* Gets the property names from the manifest and checks against existing properties already added by annotations.
|
|
2325
2280
|
* If a not yet stored property is found it adds it for sorting and filtering only to the annotationColumns.
|
|
2326
|
-
*
|
|
2327
|
-
* @param
|
|
2328
|
-
* @param
|
|
2281
|
+
*
|
|
2282
|
+
* @param properties
|
|
2283
|
+
* @param annotationColumns
|
|
2284
|
+
* @param converterContext
|
|
2329
2285
|
* @param entityType
|
|
2330
|
-
* @returns
|
|
2286
|
+
* @returns The columns from the annotations
|
|
2331
2287
|
*/
|
|
2332
2288
|
const _getPropertyNames = function (
|
|
2333
2289
|
properties: string[] | undefined,
|
|
@@ -2374,10 +2330,10 @@ const _appendCustomTemplate = function (properties: string[]): string {
|
|
|
2374
2330
|
* Manifest defined property value for custom / annotation columns
|
|
2375
2331
|
* Default property value for custom column if not overwritten in manifest.
|
|
2376
2332
|
*
|
|
2377
|
-
* @param
|
|
2378
|
-
* @param
|
|
2379
|
-
* @param
|
|
2380
|
-
* @returns
|
|
2333
|
+
* @param property The column property defined in the manifest
|
|
2334
|
+
* @param defaultValue The default value of the property
|
|
2335
|
+
* @param isAnnotationColumn Whether the column, defined in manifest, corresponds to an existing annotation column.
|
|
2336
|
+
* @returns Determined property value for the column
|
|
2381
2337
|
*/
|
|
2382
2338
|
const _getManifestOrDefaultValue = function (property: any, defaultValue: any, isAnnotationColumn: boolean): any {
|
|
2383
2339
|
if (property === undefined) {
|
|
@@ -2391,12 +2347,13 @@ const _getManifestOrDefaultValue = function (property: any, defaultValue: any, i
|
|
|
2391
2347
|
|
|
2392
2348
|
/**
|
|
2393
2349
|
* Returns table column definitions from manifest.
|
|
2350
|
+
*
|
|
2394
2351
|
* @param columns
|
|
2395
2352
|
* @param annotationColumns
|
|
2396
2353
|
* @param converterContext
|
|
2397
2354
|
* @param entityType
|
|
2398
2355
|
* @param navigationSettings
|
|
2399
|
-
* @returns
|
|
2356
|
+
* @returns The columns from the manifest
|
|
2400
2357
|
*/
|
|
2401
2358
|
const getColumnsFromManifest = function (
|
|
2402
2359
|
columns: Record<string, ManifestTableColumn>,
|
|
@@ -2419,7 +2376,7 @@ const getColumnsFromManifest = function (
|
|
|
2419
2376
|
entityType
|
|
2420
2377
|
);
|
|
2421
2378
|
if (!manifestColumn?.template && manifestColumn?.type !== "Slot" && !isAnnotationColumn) {
|
|
2422
|
-
const Message =
|
|
2379
|
+
const Message = `The annotation column '${key}' referenced in the manifest is not found`;
|
|
2423
2380
|
converterContext
|
|
2424
2381
|
.getDiagnostics()
|
|
2425
2382
|
.addIssue(
|
|
@@ -2432,8 +2389,8 @@ const getColumnsFromManifest = function (
|
|
|
2432
2389
|
} else {
|
|
2433
2390
|
internalColumns[key] = {
|
|
2434
2391
|
key: key,
|
|
2435
|
-
id:
|
|
2436
|
-
name:
|
|
2392
|
+
id: `CustomColumn::${key}`,
|
|
2393
|
+
name: `CustomColumn::${key}`,
|
|
2437
2394
|
header: manifestColumn.header,
|
|
2438
2395
|
width: manifestColumn.width || undefined,
|
|
2439
2396
|
importance: _getManifestOrDefaultValue(manifestColumn?.importance, Importance.None, isAnnotationColumn),
|
|
@@ -2458,6 +2415,7 @@ const getColumnsFromManifest = function (
|
|
|
2458
2415
|
},
|
|
2459
2416
|
isAnnotationColumn
|
|
2460
2417
|
),
|
|
2418
|
+
visualSettings: { widthCalculation: null },
|
|
2461
2419
|
exportSettings: {
|
|
2462
2420
|
template: propertyInfos ? _appendCustomTemplate(propertyInfos) : undefined,
|
|
2463
2421
|
wrap: propertyInfos && propertyInfos.length > 1 ? true : false
|
|
@@ -2545,9 +2503,9 @@ export function getP13nMode(
|
|
|
2545
2503
|
* Chart has a dependency to filter bar (issue with loading data). Once resolved, the check for chart should be removed here.
|
|
2546
2504
|
* Until then, hiding filter bar is now allowed if a chart is being used on LR.
|
|
2547
2505
|
*
|
|
2548
|
-
* @param
|
|
2549
|
-
* @param
|
|
2550
|
-
* @returns
|
|
2506
|
+
* @param manifestWrapper Manifest settings getter for the page
|
|
2507
|
+
* @param converterContext The instance of the converter context
|
|
2508
|
+
* @returns Boolean suggesting if a filter bar is being used on the page.
|
|
2551
2509
|
*/
|
|
2552
2510
|
function _isFilterBarHidden(manifestWrapper: ManifestWrapper, converterContext: ConverterContext): boolean {
|
|
2553
2511
|
return (
|
|
@@ -2561,13 +2519,13 @@ function _isFilterBarHidden(manifestWrapper: ManifestWrapper, converterContext:
|
|
|
2561
2519
|
* Returns a JSON string containing the sort conditions for the presentation variant.
|
|
2562
2520
|
*
|
|
2563
2521
|
* @param converterContext The instance of the converter context
|
|
2564
|
-
* @param
|
|
2522
|
+
* @param presentationVariantAnnotation Presentation variant annotation
|
|
2565
2523
|
* @param columns Table columns processed by the converter
|
|
2566
|
-
* @returns
|
|
2524
|
+
* @returns Sort conditions for a presentation variant.
|
|
2567
2525
|
*/
|
|
2568
2526
|
function getSortConditions(
|
|
2569
2527
|
converterContext: ConverterContext,
|
|
2570
|
-
presentationVariantAnnotation:
|
|
2528
|
+
presentationVariantAnnotation: PresentationVariantType | undefined,
|
|
2571
2529
|
columns: TableColumn[]
|
|
2572
2530
|
): string | undefined {
|
|
2573
2531
|
// Currently navigation property is not supported as sorter
|
|
@@ -2623,18 +2581,19 @@ function convertPropertyPathsToInfoNames(paths: PropertyPath[], columns: TableCo
|
|
|
2623
2581
|
/**
|
|
2624
2582
|
* Returns a JSON string containing Presentation Variant group conditions.
|
|
2625
2583
|
*
|
|
2626
|
-
* @param
|
|
2584
|
+
* @param presentationVariantAnnotation Presentation variant annotation
|
|
2627
2585
|
* @param columns Converter processed table columns
|
|
2628
|
-
* @
|
|
2586
|
+
* @param tableType The table type.
|
|
2587
|
+
* @returns Group conditions for a Presentation variant.
|
|
2629
2588
|
*/
|
|
2630
2589
|
function getGroupConditions(
|
|
2631
|
-
presentationVariantAnnotation:
|
|
2590
|
+
presentationVariantAnnotation: PresentationVariantType | undefined,
|
|
2632
2591
|
columns: TableColumn[],
|
|
2633
2592
|
tableType: string
|
|
2634
2593
|
): string | undefined {
|
|
2635
2594
|
let groupConditions: string | undefined;
|
|
2636
2595
|
if (presentationVariantAnnotation?.GroupBy) {
|
|
2637
|
-
let aGroupBy = presentationVariantAnnotation.GroupBy
|
|
2596
|
+
let aGroupBy = presentationVariantAnnotation.GroupBy;
|
|
2638
2597
|
if (tableType === "ResponsiveTable") {
|
|
2639
2598
|
aGroupBy = aGroupBy.slice(0, 1);
|
|
2640
2599
|
}
|
|
@@ -2650,17 +2609,17 @@ function getGroupConditions(
|
|
|
2650
2609
|
/**
|
|
2651
2610
|
* Returns a JSON string containing Presentation Variant aggregate conditions.
|
|
2652
2611
|
*
|
|
2653
|
-
* @param
|
|
2612
|
+
* @param presentationVariantAnnotation Presentation variant annotation
|
|
2654
2613
|
* @param columns Converter processed table columns
|
|
2655
|
-
* @returns
|
|
2614
|
+
* @returns Group conditions for a Presentation variant.
|
|
2656
2615
|
*/
|
|
2657
2616
|
function getAggregateConditions(
|
|
2658
|
-
presentationVariantAnnotation:
|
|
2617
|
+
presentationVariantAnnotation: PresentationVariantType | undefined,
|
|
2659
2618
|
columns: TableColumn[]
|
|
2660
2619
|
): string | undefined {
|
|
2661
2620
|
let aggregateConditions: string | undefined;
|
|
2662
2621
|
if (presentationVariantAnnotation?.Total) {
|
|
2663
|
-
const aTotals = presentationVariantAnnotation.Total
|
|
2622
|
+
const aTotals = presentationVariantAnnotation.Total;
|
|
2664
2623
|
const aggregates: Record<string, object> = {};
|
|
2665
2624
|
convertPropertyPathsToInfoNames(aTotals, columns).forEach((infoName) => {
|
|
2666
2625
|
aggregates[infoName] = {};
|
|
@@ -2678,7 +2637,7 @@ export function getTableAnnotationConfiguration(
|
|
|
2678
2637
|
converterContext: ConverterContext,
|
|
2679
2638
|
tableManifestConfiguration: TableControlConfiguration,
|
|
2680
2639
|
columns: TableColumn[],
|
|
2681
|
-
presentationVariantAnnotation?:
|
|
2640
|
+
presentationVariantAnnotation?: PresentationVariantType,
|
|
2682
2641
|
viewConfiguration?: ViewPathConfiguration
|
|
2683
2642
|
): TableAnnotationConfiguration {
|
|
2684
2643
|
// Need to get the target
|
|
@@ -2688,7 +2647,7 @@ export function getTableAnnotationConfiguration(
|
|
|
2688
2647
|
const pageManifestSettings: ManifestWrapper = converterContext.getManifestWrapper();
|
|
2689
2648
|
const hasAbsolutePath = navigationPropertyPath.length === 0,
|
|
2690
2649
|
p13nMode: string | undefined = getP13nMode(visualizationPath, converterContext, tableManifestConfiguration),
|
|
2691
|
-
id = navigationPropertyPath ?
|
|
2650
|
+
id = navigationPropertyPath ? getTableID(visualizationPath) : getTableID(converterContext.getContextPath(), "LineItem");
|
|
2692
2651
|
const targetCapabilities = getCapabilityRestriction(converterContext);
|
|
2693
2652
|
const navigationTargetPath = getNavigationTargetPath(converterContext, navigationPropertyPath);
|
|
2694
2653
|
const navigationSettings = pageManifestSettings.getNavigationConfiguration(navigationTargetPath);
|
|
@@ -2712,7 +2671,7 @@ export function getTableAnnotationConfiguration(
|
|
|
2712
2671
|
const isInsertUpdateTemplated = getInsertUpdateActionsTemplating(
|
|
2713
2672
|
standardActionsContext,
|
|
2714
2673
|
isDraftOrStickySupported(converterContext),
|
|
2715
|
-
|
|
2674
|
+
compileExpression(createButtonVisibilityExpression) === "false"
|
|
2716
2675
|
);
|
|
2717
2676
|
|
|
2718
2677
|
const selectionMode = getSelectionMode(
|
|
@@ -2813,7 +2772,7 @@ function _getExportDataType(dataType: string, isComplexProperty: boolean = false
|
|
|
2813
2772
|
* Split the visualization path into the navigation property path and annotation.
|
|
2814
2773
|
*
|
|
2815
2774
|
* @param visualizationPath
|
|
2816
|
-
* @returns
|
|
2775
|
+
* @returns The split path
|
|
2817
2776
|
*/
|
|
2818
2777
|
export function splitPath(visualizationPath: string) {
|
|
2819
2778
|
let [navigationPropertyPath, annotationPath] = visualizationPath.split("@");
|
|
@@ -2836,9 +2795,9 @@ export function getSelectionVariantConfiguration(
|
|
|
2836
2795
|
const propertyNames: string[] = [];
|
|
2837
2796
|
selection.SelectOptions?.forEach((selectOption: SelectOptionType) => {
|
|
2838
2797
|
const propertyName: any = selectOption.PropertyName;
|
|
2839
|
-
const
|
|
2840
|
-
if (propertyNames.indexOf(
|
|
2841
|
-
propertyNames.push(
|
|
2798
|
+
const propertyPath: string = propertyName.value;
|
|
2799
|
+
if (propertyNames.indexOf(propertyPath) === -1) {
|
|
2800
|
+
propertyNames.push(propertyPath);
|
|
2842
2801
|
}
|
|
2843
2802
|
});
|
|
2844
2803
|
return {
|
|
@@ -2896,17 +2855,11 @@ function _getTableType(
|
|
|
2896
2855
|
converterContext: ConverterContext
|
|
2897
2856
|
): TableType {
|
|
2898
2857
|
let tableType = tableSettings?.type || "ResponsiveTable";
|
|
2899
|
-
if
|
|
2900
|
-
if
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
if (converterContext.getManifestWrapper().isDesktop() && aggregationHelper.isAnalyticsSupported()) {
|
|
2905
|
-
tableType = "AnalyticalTable";
|
|
2906
|
-
} else {
|
|
2907
|
-
tableType = "ResponsiveTable";
|
|
2908
|
-
}
|
|
2909
|
-
}
|
|
2858
|
+
/* Now, we keep the configuration in the manifest, even if it leads to errors.
|
|
2859
|
+
We only change if we're not on desktop from Analytical to Responsive.
|
|
2860
|
+
*/
|
|
2861
|
+
if (tableType === "AnalyticalTable" && !converterContext.getManifestWrapper().isDesktop()) {
|
|
2862
|
+
tableType = "ResponsiveTable";
|
|
2910
2863
|
}
|
|
2911
2864
|
return tableType;
|
|
2912
2865
|
}
|
|
@@ -2954,7 +2907,7 @@ function _getFilterConfiguration(
|
|
|
2954
2907
|
let quickSelectionVariant: any;
|
|
2955
2908
|
let filters;
|
|
2956
2909
|
tableSettings?.quickVariantSelection?.paths?.forEach((path: { annotationPath: string }) => {
|
|
2957
|
-
quickSelectionVariant = targetEntityType.resolvePath(
|
|
2910
|
+
quickSelectionVariant = targetEntityType.resolvePath(`@${path.annotationPath}`);
|
|
2958
2911
|
filters = _getFilters(tableSettings, quickFilterPaths, quickSelectionVariant, path, converterContext);
|
|
2959
2912
|
});
|
|
2960
2913
|
|
|
@@ -3011,7 +2964,8 @@ export function getTableManifestConfiguration(
|
|
|
3011
2964
|
showRowCount:
|
|
3012
2965
|
!tableSettings?.quickVariantSelection?.showCounts && !converterContext.getManifestWrapper().getViewConfiguration()?.showCounts,
|
|
3013
2966
|
type: tableType,
|
|
3014
|
-
useCondensedTableLayout: condensedTableLayout && isCondensedTableLayoutCompliant
|
|
2967
|
+
useCondensedTableLayout: condensedTableLayout && isCondensedTableLayoutCompliant,
|
|
2968
|
+
isCompactType: converterContext.getManifestWrapper().isCompactType()
|
|
3015
2969
|
};
|
|
3016
2970
|
|
|
3017
2971
|
return { ...oConfiguration, ...oFilterConfiguration };
|
|
@@ -3068,7 +3022,7 @@ export function getTypeConfig(oProperty: Property | DataFieldAbstractTypes, data
|
|
|
3068
3022
|
isDigitSequence:
|
|
3069
3023
|
propertyTypeConfig.type === "sap.ui.model.odata.type.String" &&
|
|
3070
3024
|
oTargetMapping.constraints?.["@com.sap.vocabularies.Common.v1.IsDigitSequence"] &&
|
|
3071
|
-
|
|
3025
|
+
oProperty.annotations?.Common?.IsDigitSequence
|
|
3072
3026
|
? true
|
|
3073
3027
|
: undefined
|
|
3074
3028
|
};
|
|
@@ -3088,3 +3042,23 @@ export function getTypeConfig(oProperty: Property | DataFieldAbstractTypes, data
|
|
|
3088
3042
|
};
|
|
3089
3043
|
return propertyTypeConfig;
|
|
3090
3044
|
}
|
|
3045
|
+
|
|
3046
|
+
export default {
|
|
3047
|
+
getTableActions,
|
|
3048
|
+
getTableColumns,
|
|
3049
|
+
getColumnsFromEntityType,
|
|
3050
|
+
updateLinkedProperties,
|
|
3051
|
+
createTableVisualization,
|
|
3052
|
+
createDefaultTableVisualization,
|
|
3053
|
+
getCapabilityRestriction,
|
|
3054
|
+
getSelectionMode,
|
|
3055
|
+
getRowStatusVisibility,
|
|
3056
|
+
getImportance,
|
|
3057
|
+
getP13nMode,
|
|
3058
|
+
getTableAnnotationConfiguration,
|
|
3059
|
+
isFilteringCaseSensitive,
|
|
3060
|
+
splitPath,
|
|
3061
|
+
getSelectionVariantConfiguration,
|
|
3062
|
+
getTableManifestConfiguration,
|
|
3063
|
+
getTypeConfig
|
|
3064
|
+
};
|