@sapui5/sap.fe.core 1.108.2 → 1.110.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/README.md +5 -1
- package/package.json +11 -9
- package/src/.eslintrc +7 -0
- package/src/sap/fe/core/.library +39 -37
- package/src/sap/fe/core/.supportrc +3 -3
- package/src/sap/fe/core/ActionRuntime.js +72 -27
- package/src/sap/fe/core/ActionRuntime.ts +104 -21
- package/src/sap/fe/core/AppComponent.js +102 -120
- package/src/sap/fe/core/AppComponent.ts +148 -45
- package/src/sap/fe/core/AppStateHandler.js +105 -91
- package/src/sap/fe/core/AppStateHandler.ts +85 -23
- package/src/sap/fe/core/BaseController.js +5 -20
- package/src/sap/fe/core/BaseController.ts +11 -2
- package/src/sap/fe/core/CommonUtils.js +770 -1079
- package/src/sap/fe/core/CommonUtils.ts +750 -491
- package/src/sap/fe/core/ExtensionAPI.js +69 -96
- package/src/sap/fe/core/ExtensionAPI.ts +15 -17
- package/src/sap/fe/core/PageController.js +21 -46
- package/src/sap/fe/core/PageController.ts +11 -2
- package/src/sap/fe/core/TemplateComponent.js +6 -51
- package/src/sap/fe/core/TemplateComponent.ts +27 -16
- package/src/sap/fe/core/TemplateModel.js +18 -24
- package/src/sap/fe/core/TemplateModel.ts +25 -6
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +8 -23
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +5 -4
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +146 -180
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +144 -57
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFormatter.js +1 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFragment.js +43 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFragment.ts +11 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +436 -556
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +288 -157
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +215 -202
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +93 -51
- package/src/sap/fe/core/controllerextensions/BusyLocker.js +11 -26
- package/src/sap/fe/core/controllerextensions/EditFlow.js +407 -596
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +163 -56
- package/src/sap/fe/core/controllerextensions/Feedback.js +70 -0
- package/src/sap/fe/core/controllerextensions/Feedback.ts +64 -0
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +12 -23
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +1 -1
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +127 -182
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +65 -32
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +96 -198
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +4 -5
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +134 -291
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +21 -12
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +111 -214
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +44 -44
- package/src/sap/fe/core/controllerextensions/MassEdit.js +24 -44
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +3 -2
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +39 -52
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +26 -7
- package/src/sap/fe/core/controllerextensions/PageReady.js +81 -119
- package/src/sap/fe/core/controllerextensions/PageReady.ts +36 -15
- package/src/sap/fe/core/controllerextensions/Paginator.js +16 -51
- package/src/sap/fe/core/controllerextensions/Paginator.ts +1 -3
- package/src/sap/fe/core/controllerextensions/Placeholder.js +7 -33
- package/src/sap/fe/core/controllerextensions/Routing.js +24 -32
- package/src/sap/fe/core/controllerextensions/Routing.ts +6 -1
- package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
- package/src/sap/fe/core/controllerextensions/Share.js +53 -98
- package/src/sap/fe/core/controllerextensions/Share.ts +6 -3
- package/src/sap/fe/core/controllerextensions/SideEffects.js +103 -174
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +37 -22
- package/src/sap/fe/core/controllerextensions/ViewState.js +341 -276
- package/src/sap/fe/core/controllerextensions/ViewState.ts +236 -84
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +6 -22
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +8 -2
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +66 -88
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +64 -17
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +28 -34
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +22 -1
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +69 -65
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +31 -12
- package/src/sap/fe/core/controllerextensions/collaboration/ManageDialog.fragment.xml +15 -13
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +273 -906
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +142 -420
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +49 -115
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +12 -7
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js +70 -89
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.ts +313 -320
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +582 -683
- package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +507 -386
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +111 -102
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +102 -79
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +689 -154
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +866 -31
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher.js +24 -101
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher.ts +5 -5
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +91 -217
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +3 -20
- package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +1 -0
- package/src/sap/fe/core/controls/ActionPartial.fragment.xml +46 -46
- package/src/sap/fe/core/controls/Any.js +1 -1
- package/src/sap/fe/core/controls/AnyElement.js +1 -1
- package/src/sap/fe/core/controls/CommandExecution.js +4 -26
- package/src/sap/fe/core/controls/ConditionalWrapper.js +16 -33
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +16 -2
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +41 -94
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +1 -1
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +5 -34
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +5 -7
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +7 -7
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +56 -58
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +53 -33
- package/src/sap/fe/core/controls/FieldWrapper.js +6 -49
- package/src/sap/fe/core/controls/FileWrapper.js +51 -136
- package/src/sap/fe/core/controls/FileWrapper.ts +25 -29
- package/src/sap/fe/core/controls/FilterBar.js +19 -54
- package/src/sap/fe/core/controls/FormElementWrapper.js +1 -22
- package/src/sap/fe/core/controls/MassEditSelect.js +1 -1
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +1 -5
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.ts +2 -2
- package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +24 -46
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +14 -41
- package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +4 -4
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +26 -67
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -20
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +12 -48
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +17 -46
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +3 -3
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +1 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +6 -78
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +4 -4
- package/src/sap/fe/core/converters/ConverterContext.js +44 -98
- package/src/sap/fe/core/converters/ConverterContext.ts +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -20
- package/src/sap/fe/core/converters/ManifestSettings.ts +16 -9
- package/src/sap/fe/core/converters/ManifestWrapper.js +97 -158
- package/src/sap/fe/core/converters/ManifestWrapper.ts +4 -0
- package/src/sap/fe/core/converters/MetaModelConverter.js +28 -167
- package/src/sap/fe/core/converters/MetaModelConverter.ts +9 -3
- package/src/sap/fe/core/converters/TemplateConverter.js +10 -22
- package/src/sap/fe/core/converters/TemplateConverter.ts +10 -7
- package/src/sap/fe/core/converters/annotations/DataField.js +88 -132
- package/src/sap/fe/core/converters/annotations/DataField.ts +90 -38
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +57 -379
- package/src/sap/fe/core/converters/controls/Common/Action.js +45 -115
- package/src/sap/fe/core/converters/controls/Common/Action.ts +17 -5
- package/src/sap/fe/core/converters/controls/Common/Chart.js +20 -73
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +21 -14
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +1 -9
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +40 -94
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +44 -31
- package/src/sap/fe/core/converters/controls/Common/Form.js +26 -63
- package/src/sap/fe/core/converters/controls/Common/Form.ts +24 -10
- package/src/sap/fe/core/converters/controls/Common/KPI.js +13 -63
- package/src/sap/fe/core/converters/controls/Common/Table.js +368 -707
- package/src/sap/fe/core/converters/controls/Common/Table.ts +308 -197
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +54 -109
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +15 -9
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +69 -210
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +23 -16
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +12 -80
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +3 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +1 -19
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +45 -136
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +10 -10
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +82 -173
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +48 -22
- package/src/sap/fe/core/converters/helpers/Aggregation.js +24 -66
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +3 -7
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +9 -19
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +0 -1
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +20 -48
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +5 -1
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.js +12 -51
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.ts +13 -11
- package/src/sap/fe/core/converters/helpers/ID.js +3 -17
- package/src/sap/fe/core/converters/helpers/ID.ts +2 -3
- package/src/sap/fe/core/converters/helpers/IssueManager.js +1 -6
- package/src/sap/fe/core/converters/helpers/Key.js +10 -19
- package/src/sap/fe/core/converters/helpers/Key.ts +3 -3
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +2 -20
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +2 -37
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +126 -131
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +112 -31
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +67 -131
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +58 -27
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +106 -183
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +73 -104
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +74 -67
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +77 -69
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +20 -29
- package/src/sap/fe/core/formatters/CollaborationFormatter.ts +21 -0
- package/src/sap/fe/core/formatters/FPMFormatter.js +3 -7
- package/src/sap/fe/core/formatters/KPIFormatter.js +5 -13
- package/src/sap/fe/core/formatters/StandardFormatter.js +3 -18
- package/src/sap/fe/core/formatters/StandardFormatter.ts +3 -2
- package/src/sap/fe/core/formatters/TableFormatter.js +87 -53
- package/src/sap/fe/core/formatters/TableFormatter.ts +96 -9
- package/src/sap/fe/core/formatters/TableFormatterTypes.js +1 -4
- package/src/sap/fe/core/formatters/ValueFormatter.js +1 -37
- package/src/sap/fe/core/fpm/Component.js +2 -17
- package/src/sap/fe/core/helpers/AnnotationEnum.js +10 -20
- package/src/sap/fe/core/helpers/AnnotationEnum.ts +6 -6
- package/src/sap/fe/core/helpers/AppStartupHelper.js +16 -52
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit.js +106 -364
- package/src/sap/fe/core/helpers/BindingToolkit.ts +30 -7
- package/src/sap/fe/core/helpers/ClassSupport.js +16 -97
- package/src/sap/fe/core/helpers/ClassSupport.ts +7 -4
- package/src/sap/fe/core/helpers/DeleteHelper.js +621 -0
- package/src/sap/fe/core/helpers/DeleteHelper.ts +796 -0
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +1 -12
- package/src/sap/fe/core/helpers/EditState.js +2 -5
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +1 -10
- package/src/sap/fe/core/helpers/FPMHelper.js +3 -8
- package/src/sap/fe/core/helpers/FPMHelper.ts +2 -1
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +8 -38
- package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +1 -5
- package/src/sap/fe/core/helpers/LoaderUtils.js +1 -7
- package/src/sap/fe/core/helpers/MassEditHelper.js +177 -289
- package/src/sap/fe/core/helpers/MassEditHelper.ts +124 -91
- package/src/sap/fe/core/helpers/MessageStrip.js +12 -28
- package/src/sap/fe/core/helpers/MessageStrip.ts +7 -7
- package/src/sap/fe/core/helpers/ModelHelper.js +62 -103
- package/src/sap/fe/core/helpers/ModelHelper.ts +58 -20
- package/src/sap/fe/core/helpers/PasteHelper.js +28 -51
- package/src/sap/fe/core/helpers/PasteHelper.ts +10 -9
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +112 -136
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +111 -111
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +5 -11
- package/src/sap/fe/core/helpers/SideEffectsHelper.js +26 -32
- package/src/sap/fe/core/helpers/StableIdHelper.js +166 -218
- package/src/sap/fe/core/helpers/StableIdHelper.ts +175 -191
- package/src/sap/fe/core/helpers/Synchronization.js +1 -8
- package/src/sap/fe/core/helpers/ToES6Promise.js +1 -4
- package/src/sap/fe/core/helpers/TypeGuards.js +22 -0
- package/src/sap/fe/core/helpers/TypeGuards.ts +9 -0
- package/src/sap/fe/core/jsx-runtime/Fragment.js +1 -3
- package/src/sap/fe/core/jsx-runtime/ViewLoader.js +3 -23
- package/src/sap/fe/core/jsx-runtime/jsx-control.js +3 -23
- package/src/sap/fe/core/jsx-runtime/jsx-control.ts +2 -1
- package/src/sap/fe/core/jsx-runtime/jsx-xml.js +4 -16
- package/src/sap/fe/core/jsx-runtime/jsx-xml.ts +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx.js +2 -5
- package/src/sap/fe/core/jsx-runtime/jsxs.js +1 -1
- package/src/sap/fe/core/jsx-runtime/useMDXComponents.js +4 -27
- package/src/sap/fe/core/jsx-runtime/useMDXComponents.tsx +1 -1
- package/src/sap/fe/core/library.js +9 -48
- package/src/sap/fe/core/library.support.js +3 -2
- package/src/sap/fe/core/library.support.ts +3 -1
- package/src/sap/fe/core/library.ts +3 -8
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +74 -39
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +71 -26
- package/src/sap/fe/core/messagebundle.properties +113 -67
- package/src/sap/fe/core/messagebundle_ar.properties +20 -3
- package/src/sap/fe/core/messagebundle_bg.properties +22 -5
- package/src/sap/fe/core/messagebundle_ca.properties +21 -4
- package/src/sap/fe/core/messagebundle_cs.properties +21 -4
- package/src/sap/fe/core/messagebundle_cy.properties +22 -5
- package/src/sap/fe/core/messagebundle_da.properties +20 -3
- package/src/sap/fe/core/messagebundle_de.properties +38 -21
- package/src/sap/fe/core/messagebundle_el.properties +20 -3
- package/src/sap/fe/core/messagebundle_en.properties +38 -21
- package/src/sap/fe/core/messagebundle_en_GB.properties +20 -3
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +41 -28
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +41 -24
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +42 -29
- package/src/sap/fe/core/messagebundle_es.properties +40 -23
- package/src/sap/fe/core/messagebundle_es_MX.properties +20 -3
- package/src/sap/fe/core/messagebundle_et.properties +20 -3
- package/src/sap/fe/core/messagebundle_fi.properties +20 -3
- package/src/sap/fe/core/messagebundle_fr.properties +21 -4
- package/src/sap/fe/core/messagebundle_fr_CA.properties +22 -5
- package/src/sap/fe/core/messagebundle_hi.properties +20 -3
- package/src/sap/fe/core/messagebundle_hr.properties +22 -5
- package/src/sap/fe/core/messagebundle_hu.properties +20 -3
- package/src/sap/fe/core/messagebundle_id.properties +20 -3
- package/src/sap/fe/core/messagebundle_it.properties +23 -6
- package/src/sap/fe/core/messagebundle_iw.properties +20 -3
- package/src/sap/fe/core/messagebundle_ja.properties +22 -5
- package/src/sap/fe/core/messagebundle_kk.properties +21 -4
- package/src/sap/fe/core/messagebundle_ko.properties +20 -3
- package/src/sap/fe/core/messagebundle_lt.properties +20 -3
- package/src/sap/fe/core/messagebundle_lv.properties +20 -3
- package/src/sap/fe/core/messagebundle_ms.properties +20 -3
- package/src/sap/fe/core/messagebundle_nl.properties +20 -3
- package/src/sap/fe/core/messagebundle_no.properties +20 -3
- package/src/sap/fe/core/messagebundle_pl.properties +21 -4
- package/src/sap/fe/core/messagebundle_pt.properties +20 -3
- package/src/sap/fe/core/messagebundle_pt_PT.properties +20 -3
- package/src/sap/fe/core/messagebundle_ro.properties +20 -3
- package/src/sap/fe/core/messagebundle_ru.properties +20 -3
- package/src/sap/fe/core/messagebundle_sh.properties +20 -3
- package/src/sap/fe/core/messagebundle_sk.properties +20 -3
- package/src/sap/fe/core/messagebundle_sl.properties +26 -9
- package/src/sap/fe/core/messagebundle_sv.properties +20 -3
- package/src/sap/fe/core/messagebundle_th.properties +21 -4
- package/src/sap/fe/core/messagebundle_tr.properties +20 -3
- package/src/sap/fe/core/messagebundle_uk.properties +23 -6
- package/src/sap/fe/core/messagebundle_vi.properties +20 -3
- package/src/sap/fe/core/messagebundle_zh_CN.properties +20 -3
- package/src/sap/fe/core/messagebundle_zh_TW.properties +20 -3
- package/src/sap/fe/core/operationsHelper.js +74 -101
- package/src/sap/fe/core/operationsHelper.ts +113 -44
- package/src/sap/fe/core/rootView/Fcl.controller.js +151 -228
- package/src/sap/fe/core/rootView/Fcl.controller.ts +90 -15
- package/src/sap/fe/core/rootView/Fcl.view.xml +1 -8
- package/src/sap/fe/core/rootView/NavContainer.controller.js +41 -78
- package/src/sap/fe/core/rootView/NavContainer.controller.ts +32 -38
- package/src/sap/fe/core/rootView/RootViewBaseController.js +110 -181
- package/src/sap/fe/core/rootView/RootViewBaseController.ts +37 -17
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +1 -18
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +13 -52
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -22
- package/src/sap/fe/core/services/NavigationServiceFactory.js +45 -87
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +17 -10
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +4 -28
- package/src/sap/fe/core/services/RoutingServiceFactory.js +92 -250
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +8 -12
- package/src/sap/fe/core/services/ShellServicesFactory.js +122 -251
- package/src/sap/fe/core/services/ShellServicesFactory.ts +19 -4
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +188 -273
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +143 -154
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +37 -135
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +59 -94
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +2 -16
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +1 -1
- package/src/sap/fe/core/support/AnnotationIssue.support.js +6 -9
- package/src/sap/fe/core/support/AnnotationIssue.support.ts +4 -4
- package/src/sap/fe/core/support/CollectionFacetMissingID.support.js +6 -9
- package/src/sap/fe/core/support/CollectionFacetMissingID.support.ts +3 -3
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +6 -9
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.ts +3 -3
- package/src/sap/fe/core/support/CommonHelper.js +7 -16
- package/src/sap/fe/core/support/Diagnostics.js +1 -10
- package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +6 -9
- package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.ts +3 -3
- package/src/sap/fe/core/templating/CommonFormatters.js +1 -15
- package/src/sap/fe/core/templating/CriticalityFormatters.js +4 -20
- package/src/sap/fe/core/templating/DataFieldFormatters.js +1 -20
- package/src/sap/fe/core/templating/DataModelPathHelper.js +49 -121
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +41 -31
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +8 -15
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +7 -7
- package/src/sap/fe/core/templating/EntitySetHelper.js +6 -31
- package/src/sap/fe/core/templating/FieldControlHelper.js +4 -21
- package/src/sap/fe/core/templating/FieldControlHelper.ts +1 -1
- package/src/sap/fe/core/templating/FilterHelper.js +40 -111
- package/src/sap/fe/core/templating/FilterHelper.ts +20 -16
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -19
- package/src/sap/fe/core/templating/FilterTemplating.ts +1 -1
- package/src/sap/fe/core/templating/PropertyFormatters.js +1 -34
- package/src/sap/fe/core/templating/PropertyHelper.js +120 -163
- package/src/sap/fe/core/templating/PropertyHelper.ts +69 -33
- package/src/sap/fe/core/templating/SemanticObjectHelper.js +46 -0
- package/src/sap/fe/core/templating/SemanticObjectHelper.ts +34 -0
- package/src/sap/fe/core/templating/UIFormatters.js +40 -180
- package/src/sap/fe/core/templating/UIFormatters.ts +37 -43
- package/src/sap/fe/core/type/DateTimeWithTimezone.js +3 -14
- package/src/sap/fe/core/type/Email.js +1 -10
- package/src/sap/fe/core/type/TypeUtil.js +1 -11
- package/ui5.yaml +0 -1
- package/src/sap/fe/core/controls/ActionParameterDialogFieldValueHelp.fragment.xml +0 -35
- package/src/sap/fe/core/helpers/LRMessageStrip.js +0 -234
- package/src/sap/fe/core/helpers/LRMessageStrip.ts +0 -216
|
@@ -9,11 +9,11 @@ import type {
|
|
|
9
9
|
TypeDefinition
|
|
10
10
|
} from "@sap-ux/vocabularies-types";
|
|
11
11
|
import type { FilterFunctions } from "@sap-ux/vocabularies-types/vocabularies/Capabilities";
|
|
12
|
-
import { EntitySetAnnotations_Capabilities } from "@sap-ux/vocabularies-types/vocabularies/Capabilities_Edm";
|
|
12
|
+
import type { EntitySetAnnotations_Capabilities } from "@sap-ux/vocabularies-types/vocabularies/Capabilities_Edm";
|
|
13
13
|
import type { SemanticKey } from "@sap-ux/vocabularies-types/vocabularies/Common";
|
|
14
14
|
import { CommonAnnotationTerms } from "@sap-ux/vocabularies-types/vocabularies/Common";
|
|
15
|
-
import { EntitySetAnnotations_Common } from "@sap-ux/vocabularies-types/vocabularies/Common_Edm";
|
|
16
|
-
import { EntitySetAnnotations_Session } from "@sap-ux/vocabularies-types/vocabularies/Session_Edm";
|
|
15
|
+
import type { EntitySetAnnotations_Common } from "@sap-ux/vocabularies-types/vocabularies/Common_Edm";
|
|
16
|
+
import type { EntitySetAnnotations_Session } from "@sap-ux/vocabularies-types/vocabularies/Session_Edm";
|
|
17
17
|
import type {
|
|
18
18
|
CriticalityType,
|
|
19
19
|
DataField,
|
|
@@ -31,21 +31,28 @@ import type {
|
|
|
31
31
|
SelectOptionType
|
|
32
32
|
} from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
33
33
|
import { UIAnnotationTypes } from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
34
|
-
import type { ComplexPropertyInfo } from "sap/fe/core/converters/annotations/DataField";
|
|
35
34
|
import {
|
|
36
35
|
collectRelatedProperties,
|
|
37
36
|
collectRelatedPropertiesRecursively,
|
|
37
|
+
ComplexPropertyInfo,
|
|
38
38
|
getDataFieldDataType,
|
|
39
39
|
getSemanticObjectPath,
|
|
40
|
-
|
|
40
|
+
getTargetValueOnDataPoint,
|
|
41
41
|
isDataFieldForActionAbstract,
|
|
42
|
-
isDataFieldTypes
|
|
42
|
+
isDataFieldTypes,
|
|
43
|
+
isDataPointFromDataFieldDefault
|
|
43
44
|
} from "sap/fe/core/converters/annotations/DataField";
|
|
44
|
-
import type {
|
|
45
|
+
import type {
|
|
46
|
+
AnnotationAction,
|
|
47
|
+
BaseAction,
|
|
48
|
+
CombinedAction,
|
|
49
|
+
CustomAction,
|
|
50
|
+
OverrideTypeAction
|
|
51
|
+
} from "sap/fe/core/converters/controls/Common/Action";
|
|
45
52
|
import { getActionsFromManifest, isActionNavigable, removeDuplicateActions } from "sap/fe/core/converters/controls/Common/Action";
|
|
46
53
|
import { Entity, UI } from "sap/fe/core/converters/helpers/BindingHelper";
|
|
47
54
|
import type { ConfigurableObject, CustomElement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
48
|
-
import { insertCustomElements, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
55
|
+
import { insertCustomElements, OverrideType, Placement } from "sap/fe/core/converters/helpers/ConfigurableObject";
|
|
49
56
|
import { IssueCategory, IssueCategoryType, IssueSeverity, IssueType } from "sap/fe/core/converters/helpers/IssueManager";
|
|
50
57
|
import { KeyHelper } from "sap/fe/core/converters/helpers/Key";
|
|
51
58
|
import tableFormatters from "sap/fe/core/formatters/TableFormatter";
|
|
@@ -66,9 +73,9 @@ import {
|
|
|
66
73
|
resolveBindingString
|
|
67
74
|
} from "sap/fe/core/helpers/BindingToolkit";
|
|
68
75
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
69
|
-
import { replaceSpecialChars } from "sap/fe/core/helpers/StableIdHelper";
|
|
76
|
+
import { generate, replaceSpecialChars } from "sap/fe/core/helpers/StableIdHelper";
|
|
77
|
+
import type { DataModelObjectPath } from "sap/fe/core/templating/DataModelPathHelper";
|
|
70
78
|
import {
|
|
71
|
-
DataModelObjectPath,
|
|
72
79
|
enhanceDataModelPath,
|
|
73
80
|
getTargetObjectPath,
|
|
74
81
|
isPathDeletable,
|
|
@@ -82,11 +89,12 @@ import {
|
|
|
82
89
|
getAssociatedCurrencyProperty,
|
|
83
90
|
getAssociatedTimezoneProperty,
|
|
84
91
|
getAssociatedUnitProperty,
|
|
85
|
-
getTargetValueOnDataPoint,
|
|
86
92
|
isNavigationProperty,
|
|
87
93
|
isPathExpression,
|
|
88
94
|
isProperty
|
|
89
95
|
} from "sap/fe/core/templating/PropertyHelper";
|
|
96
|
+
import { isCollectionField } from "sap/fe/core/templating/UIFormatters";
|
|
97
|
+
import { mDefaultTypeForEdmType } from "sap/fe/macros/DelegateUtil";
|
|
90
98
|
import ActionHelper from "sap/fe/macros/internal/helpers/ActionHelper";
|
|
91
99
|
import type ConverterContext from "../../ConverterContext";
|
|
92
100
|
import { AggregationHelper } from "../../helpers/Aggregation";
|
|
@@ -160,6 +168,7 @@ export type TableAnnotationConfiguration = {
|
|
|
160
168
|
sortConditions?: string;
|
|
161
169
|
groupConditions?: string;
|
|
162
170
|
aggregateConditions?: string;
|
|
171
|
+
initialExpansionLevel?: number;
|
|
163
172
|
|
|
164
173
|
/** Create new entries */
|
|
165
174
|
create: CreateBehavior | CreateBehaviorExternal;
|
|
@@ -230,9 +239,10 @@ export type TableControlConfiguration = {
|
|
|
230
239
|
enableAutoColumnWidth: boolean;
|
|
231
240
|
dataStateIndicatorFilter: string | undefined;
|
|
232
241
|
isCompactType?: boolean;
|
|
242
|
+
hierarchyQualifier?: string;
|
|
233
243
|
};
|
|
234
244
|
|
|
235
|
-
export type TableType = "GridTable" | "ResponsiveTable" | "AnalyticalTable";
|
|
245
|
+
export type TableType = "GridTable" | "ResponsiveTable" | "AnalyticalTable" | "TreeTable";
|
|
236
246
|
export type GridTableRowCountMode = "Auto" | "Fixed";
|
|
237
247
|
|
|
238
248
|
enum ColumnType {
|
|
@@ -286,6 +296,47 @@ export type AnnotationTableColumnForOverride = BaseTableColumn & {
|
|
|
286
296
|
formatOptions?: FormatOptionsType;
|
|
287
297
|
};
|
|
288
298
|
|
|
299
|
+
export type configTypeConstraints = Partial<{
|
|
300
|
+
scale: number;
|
|
301
|
+
precision: number;
|
|
302
|
+
maxLength: number;
|
|
303
|
+
nullable: boolean;
|
|
304
|
+
minimum: string;
|
|
305
|
+
maximum: string;
|
|
306
|
+
isDigitSequence: boolean;
|
|
307
|
+
}>;
|
|
308
|
+
|
|
309
|
+
export type configTypeformatOptions = Partial<{
|
|
310
|
+
parseAsString: boolean;
|
|
311
|
+
emptyString: string;
|
|
312
|
+
parseKeepsEmptyString: boolean;
|
|
313
|
+
}>;
|
|
314
|
+
|
|
315
|
+
export type configType = {
|
|
316
|
+
type?: string;
|
|
317
|
+
constraints: configTypeConstraints;
|
|
318
|
+
formatOptions: configTypeformatOptions;
|
|
319
|
+
typeInstance?: InstanceType<any>;
|
|
320
|
+
baseType?: string;
|
|
321
|
+
className?: keyof typeof mDefaultTypeForEdmType;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
export type exportSettings = Partial<{
|
|
325
|
+
template: string;
|
|
326
|
+
label: string;
|
|
327
|
+
wrap: boolean;
|
|
328
|
+
type: string;
|
|
329
|
+
inputFormat: string;
|
|
330
|
+
format: string;
|
|
331
|
+
scale: number;
|
|
332
|
+
delimiter: boolean;
|
|
333
|
+
unit: string;
|
|
334
|
+
unitProperty: string;
|
|
335
|
+
timezone: string;
|
|
336
|
+
timezoneProperty: string;
|
|
337
|
+
utc: boolean;
|
|
338
|
+
}>;
|
|
339
|
+
|
|
289
340
|
// Properties for Annotation Columns
|
|
290
341
|
export type AnnotationTableColumn = AnnotationTableColumnForOverride & {
|
|
291
342
|
name: string;
|
|
@@ -299,7 +350,7 @@ export type AnnotationTableColumn = AnnotationTableColumnForOverride & {
|
|
|
299
350
|
FieldGroupHiddenExpressions?: CompiledBindingToolkitExpression;
|
|
300
351
|
showDataFieldsLabel?: boolean;
|
|
301
352
|
isKey?: boolean;
|
|
302
|
-
isGroupable
|
|
353
|
+
isGroupable?: boolean;
|
|
303
354
|
unit?: string;
|
|
304
355
|
unitText?: string;
|
|
305
356
|
timezoneText?: string;
|
|
@@ -307,34 +358,18 @@ export type AnnotationTableColumn = AnnotationTableColumnForOverride & {
|
|
|
307
358
|
semanticObjectPath?: string;
|
|
308
359
|
sortable: boolean;
|
|
309
360
|
exportSettings?: exportSettings | null;
|
|
310
|
-
isDataPointFakeTargetProperty?: boolean;
|
|
311
361
|
textArrangement?: {
|
|
312
362
|
textProperty: string;
|
|
313
363
|
mode: DisplayMode;
|
|
314
364
|
};
|
|
315
365
|
additionalPropertyInfos?: string[];
|
|
316
366
|
visualSettings?: VisualSettings;
|
|
317
|
-
typeConfig?:
|
|
367
|
+
typeConfig?: configType;
|
|
318
368
|
isPartOfLineItem?: boolean; // temporary indicator to only allow filtering on navigation properties when they're part of a line item
|
|
319
369
|
additionalLabels?: string[];
|
|
370
|
+
exportDataPointTargetValue?: string;
|
|
320
371
|
};
|
|
321
372
|
|
|
322
|
-
export type exportSettings = Partial<{
|
|
323
|
-
template: string;
|
|
324
|
-
label: string;
|
|
325
|
-
wrap: boolean;
|
|
326
|
-
type: string;
|
|
327
|
-
inputFormat: string;
|
|
328
|
-
format: string;
|
|
329
|
-
scale: number;
|
|
330
|
-
delimiter: boolean;
|
|
331
|
-
unit: string;
|
|
332
|
-
unitProperty: string;
|
|
333
|
-
timezone: string;
|
|
334
|
-
timezoneProperty: string;
|
|
335
|
-
utc: boolean;
|
|
336
|
-
}>;
|
|
337
|
-
|
|
338
373
|
export type VisualSettings = {
|
|
339
374
|
widthCalculation?: WidthCalculation;
|
|
340
375
|
};
|
|
@@ -375,6 +410,8 @@ export type TableVisualization = {
|
|
|
375
410
|
headerInfoTitle: string;
|
|
376
411
|
semanticKeys: string[];
|
|
377
412
|
headerInfoTypeName: PropertyAnnotationValue<String> | undefined;
|
|
413
|
+
enable$select: boolean;
|
|
414
|
+
enable$$getKeepAliveContext: boolean;
|
|
378
415
|
};
|
|
379
416
|
|
|
380
417
|
type SorterType = {
|
|
@@ -408,19 +445,20 @@ export function getTableActions(
|
|
|
408
445
|
true,
|
|
409
446
|
aHiddenActions
|
|
410
447
|
);
|
|
411
|
-
const
|
|
412
|
-
isNavigable:
|
|
413
|
-
enableOnSelect:
|
|
414
|
-
enableAutoScroll:
|
|
415
|
-
enabled:
|
|
416
|
-
visible:
|
|
417
|
-
defaultValuesExtensionFunction:
|
|
418
|
-
command:
|
|
419
|
-
}
|
|
448
|
+
const actionOverwriteConfig: OverrideTypeAction = {
|
|
449
|
+
isNavigable: OverrideType.overwrite,
|
|
450
|
+
enableOnSelect: OverrideType.overwrite,
|
|
451
|
+
enableAutoScroll: OverrideType.overwrite,
|
|
452
|
+
enabled: OverrideType.overwrite,
|
|
453
|
+
visible: OverrideType.overwrite,
|
|
454
|
+
defaultValuesExtensionFunction: OverrideType.overwrite,
|
|
455
|
+
command: OverrideType.overwrite
|
|
456
|
+
};
|
|
457
|
+
const actions = insertCustomElements(aAnnotationActions, manifestActions.actions, actionOverwriteConfig);
|
|
420
458
|
|
|
421
459
|
return {
|
|
422
|
-
|
|
423
|
-
|
|
460
|
+
actions,
|
|
461
|
+
commandActions: manifestActions.commandActions
|
|
424
462
|
};
|
|
425
463
|
}
|
|
426
464
|
|
|
@@ -450,13 +488,13 @@ export function getTableColumns(
|
|
|
450
488
|
);
|
|
451
489
|
|
|
452
490
|
return insertCustomElements(annotationColumns as TableColumn[], manifestColumns as Record<string, CustomElement<TableColumn>>, {
|
|
453
|
-
width:
|
|
454
|
-
importance:
|
|
455
|
-
horizontalAlign:
|
|
456
|
-
availability:
|
|
457
|
-
isNavigable:
|
|
458
|
-
settings:
|
|
459
|
-
formatOptions:
|
|
491
|
+
width: OverrideType.overwrite,
|
|
492
|
+
importance: OverrideType.overwrite,
|
|
493
|
+
horizontalAlign: OverrideType.overwrite,
|
|
494
|
+
availability: OverrideType.overwrite,
|
|
495
|
+
isNavigable: OverrideType.overwrite,
|
|
496
|
+
settings: OverrideType.overwrite,
|
|
497
|
+
formatOptions: OverrideType.overwrite
|
|
460
498
|
});
|
|
461
499
|
}
|
|
462
500
|
|
|
@@ -521,11 +559,7 @@ export const getAggregateDefinitionsFromEntityType = function (
|
|
|
521
559
|
const aRawContextDefiningProperties = mRawDefinitions[oTableColumn.relativePath];
|
|
522
560
|
|
|
523
561
|
// Ignore aggregates corresponding to currencies or units of measure and dummy created property for datapoint target Value
|
|
524
|
-
if (
|
|
525
|
-
aRawContextDefiningProperties &&
|
|
526
|
-
!mCurrencyOrUnitProperties.has(oTableColumn.name) &&
|
|
527
|
-
!oTableColumn.isDataPointFakeTargetProperty
|
|
528
|
-
) {
|
|
562
|
+
if (aRawContextDefiningProperties && !mCurrencyOrUnitProperties.has(oTableColumn.name)) {
|
|
529
563
|
mResult[oTableColumn.name] = {
|
|
530
564
|
defaultAggregate: {},
|
|
531
565
|
relativePath: oTableColumn.relativePath
|
|
@@ -556,7 +590,7 @@ export const getAggregateDefinitionsFromEntityType = function (
|
|
|
556
590
|
* @param converterContext The converter context
|
|
557
591
|
* @param presentationVariantAnnotation The presentationVariant annotation (if any)
|
|
558
592
|
*/
|
|
559
|
-
function
|
|
593
|
+
export function updateTableVisualizationForType(
|
|
560
594
|
tableVisualization: TableVisualization,
|
|
561
595
|
entityType: EntityType,
|
|
562
596
|
converterContext: ConverterContext,
|
|
@@ -568,6 +602,8 @@ function updateTableVisualizationForAnalytics(
|
|
|
568
602
|
|
|
569
603
|
if (aggregatesDefinitions) {
|
|
570
604
|
tableVisualization.enableAnalytics = true;
|
|
605
|
+
tableVisualization.enable$select = false;
|
|
606
|
+
tableVisualization.enable$$getKeepAliveContext = false;
|
|
571
607
|
tableVisualization.aggregates = aggregatesDefinitions;
|
|
572
608
|
|
|
573
609
|
const allowedTransformations = aggregationHelper.getAllowedTransformations();
|
|
@@ -592,6 +628,8 @@ function updateTableVisualizationForAnalytics(
|
|
|
592
628
|
tableVisualization.columns,
|
|
593
629
|
tableVisualization.control.type
|
|
594
630
|
);
|
|
631
|
+
} else if (tableVisualization.control.type === "TreeTable") {
|
|
632
|
+
tableVisualization.enable$$getKeepAliveContext = false;
|
|
595
633
|
}
|
|
596
634
|
}
|
|
597
635
|
|
|
@@ -730,11 +768,13 @@ export function createTableVisualization(
|
|
|
730
768
|
operationAvailableProperties: getOperationAvailableProperties(operationAvailableMap, converterContext),
|
|
731
769
|
headerInfoTitle: semanticKeysAndHeaderInfoTitle.headerInfoTitlePath,
|
|
732
770
|
semanticKeys: semanticKeysAndHeaderInfoTitle.semanticKeyColumns,
|
|
733
|
-
headerInfoTypeName: semanticKeysAndHeaderInfoTitle.headerInfoTypeName
|
|
771
|
+
headerInfoTypeName: semanticKeysAndHeaderInfoTitle.headerInfoTypeName,
|
|
772
|
+
enable$select: true,
|
|
773
|
+
enable$$getKeepAliveContext: true
|
|
734
774
|
};
|
|
735
775
|
|
|
736
776
|
updateLinkedProperties(converterContext.getAnnotationEntityType(lineItemAnnotation), columns);
|
|
737
|
-
|
|
777
|
+
updateTableVisualizationForType(
|
|
738
778
|
oVisualization,
|
|
739
779
|
converterContext.getAnnotationEntityType(lineItemAnnotation),
|
|
740
780
|
converterContext,
|
|
@@ -744,14 +784,14 @@ export function createTableVisualization(
|
|
|
744
784
|
return oVisualization;
|
|
745
785
|
}
|
|
746
786
|
|
|
747
|
-
export function createDefaultTableVisualization(converterContext: ConverterContext): TableVisualization {
|
|
787
|
+
export function createDefaultTableVisualization(converterContext: ConverterContext, isBlankTable?: boolean): TableVisualization {
|
|
748
788
|
const tableManifestConfig = getTableManifestConfiguration(undefined, "", converterContext, false);
|
|
749
789
|
const columns = getColumnsFromEntityType({}, converterContext.getEntityType(), [], [], converterContext, tableManifestConfig.type, []);
|
|
750
790
|
const operationAvailableMap = getOperationAvailableMap(undefined, converterContext);
|
|
751
791
|
const semanticKeysAndHeaderInfoTitle = getSemanticKeysAndTitleInfo(converterContext);
|
|
752
792
|
const oVisualization: TableVisualization = {
|
|
753
793
|
type: VisualizationType.Table,
|
|
754
|
-
annotation: getTableAnnotationConfiguration(undefined, "", converterContext, tableManifestConfig, columns),
|
|
794
|
+
annotation: getTableAnnotationConfiguration(undefined, "", converterContext, tableManifestConfig, isBlankTable ? [] : columns),
|
|
755
795
|
control: tableManifestConfig,
|
|
756
796
|
actions: [],
|
|
757
797
|
columns: columns,
|
|
@@ -759,11 +799,13 @@ export function createDefaultTableVisualization(converterContext: ConverterConte
|
|
|
759
799
|
operationAvailableProperties: getOperationAvailableProperties(operationAvailableMap, converterContext),
|
|
760
800
|
headerInfoTitle: semanticKeysAndHeaderInfoTitle.headerInfoTitlePath,
|
|
761
801
|
semanticKeys: semanticKeysAndHeaderInfoTitle.semanticKeyColumns,
|
|
762
|
-
headerInfoTypeName: semanticKeysAndHeaderInfoTitle.headerInfoTypeName
|
|
802
|
+
headerInfoTypeName: semanticKeysAndHeaderInfoTitle.headerInfoTypeName,
|
|
803
|
+
enable$select: true,
|
|
804
|
+
enable$$getKeepAliveContext: true
|
|
763
805
|
};
|
|
764
806
|
|
|
765
807
|
updateLinkedProperties(converterContext.getEntityType(), columns);
|
|
766
|
-
|
|
808
|
+
updateTableVisualizationForType(oVisualization, converterContext.getEntityType(), converterContext);
|
|
767
809
|
|
|
768
810
|
return oVisualization;
|
|
769
811
|
}
|
|
@@ -923,14 +965,54 @@ function getBindingExpFromContext(
|
|
|
923
965
|
}
|
|
924
966
|
|
|
925
967
|
/**
|
|
926
|
-
* Loop through the
|
|
927
|
-
*
|
|
968
|
+
* Loop through the manifest actions and check the following:
|
|
969
|
+
*
|
|
970
|
+
* If the data field is also referenced as a custom action.
|
|
971
|
+
* If the underlying manifest action is either a bound action or has the 'RequiresContext' property set to true.
|
|
972
|
+
*
|
|
973
|
+
* If so, the 'requiresSelection' property is forced to 'true' in the manifest.
|
|
974
|
+
*
|
|
975
|
+
* @param dataFieldId Id of the DataField evaluated
|
|
976
|
+
* @param dataField DataField evaluated
|
|
977
|
+
* @param manifestActions The actions defined in the manifest
|
|
978
|
+
* @returns `true` if the DataField is found among the manifest actions
|
|
979
|
+
*/
|
|
980
|
+
function updateManifestActionAndTagIt(
|
|
981
|
+
dataFieldId: string,
|
|
982
|
+
dataField: DataFieldForAction | DataFieldForIntentBasedNavigation,
|
|
983
|
+
manifestActions: Record<string, CustomAction>
|
|
984
|
+
): boolean {
|
|
985
|
+
return Object.keys(manifestActions).some((actionKey) => {
|
|
986
|
+
if (actionKey === dataFieldId) {
|
|
987
|
+
if (
|
|
988
|
+
(dataField as DataFieldForAction)?.ActionTarget?.isBound ||
|
|
989
|
+
(dataField as DataFieldForIntentBasedNavigation)?.RequiresContext
|
|
990
|
+
) {
|
|
991
|
+
manifestActions[dataFieldId].requiresSelection = true;
|
|
992
|
+
}
|
|
993
|
+
return true;
|
|
994
|
+
}
|
|
995
|
+
return false;
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Loop through the DataFieldForAction and DataFieldForIntentBasedNavigation of a line item and
|
|
1001
|
+
* check the following:
|
|
1002
|
+
* If at least one of them is always visible in the table toolbar and requires a context
|
|
1003
|
+
* If an action is also defined in the manifest, it is set aside and will be considered
|
|
1004
|
+
* when going through the manifest.
|
|
928
1005
|
*
|
|
929
1006
|
* @param lineItemAnnotation Collection of data fields for representation in a table or list
|
|
1007
|
+
* @param manifestActions The actions defined in the manifest
|
|
930
1008
|
* @param currentEntityType Current Entity Type
|
|
931
1009
|
* @returns `true` if there is at least 1 action that meets the criteria
|
|
932
1010
|
*/
|
|
933
|
-
function hasBoundActionsAlwaysVisibleInToolBar(
|
|
1011
|
+
function hasBoundActionsAlwaysVisibleInToolBar(
|
|
1012
|
+
lineItemAnnotation: LineItem,
|
|
1013
|
+
manifestActions: Record<string, CustomAction>,
|
|
1014
|
+
currentEntityType: EntityType
|
|
1015
|
+
): boolean {
|
|
934
1016
|
return lineItemAnnotation.some((dataField) => {
|
|
935
1017
|
if (
|
|
936
1018
|
(dataField.$Type === UIAnnotationTypes.DataFieldForAction ||
|
|
@@ -939,9 +1021,24 @@ function hasBoundActionsAlwaysVisibleInToolBar(lineItemAnnotation: LineItem, cur
|
|
|
939
1021
|
(dataField.annotations?.UI?.Hidden?.valueOf() === false || dataField.annotations?.UI?.Hidden?.valueOf() === undefined)
|
|
940
1022
|
) {
|
|
941
1023
|
if (dataField.$Type === UIAnnotationTypes.DataFieldForAction) {
|
|
1024
|
+
const manifestActionId = generate(["DataFieldForAction", dataField.Action as string]);
|
|
1025
|
+
// if the DataFieldForActon from annotation also exists in the manifest, its visibility will be evaluated later on
|
|
1026
|
+
if (updateManifestActionAndTagIt(manifestActionId, dataField, manifestActions)) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
942
1029
|
// Check if the lineItem context is the same as that of the action:
|
|
943
1030
|
return dataField?.ActionTarget?.isBound && currentEntityType === dataField?.ActionTarget.sourceEntityType;
|
|
944
1031
|
} else if (dataField.$Type === UIAnnotationTypes.DataFieldForIntentBasedNavigation) {
|
|
1032
|
+
// if the DataFieldForIntentBasedNavigation from annotation also exists in the manifest, its visibility will be evaluated later on
|
|
1033
|
+
if (
|
|
1034
|
+
updateManifestActionAndTagIt(
|
|
1035
|
+
`DataFieldForIntentBasedNavigation::${dataField.SemanticObject}::${dataField.Action}`,
|
|
1036
|
+
dataField,
|
|
1037
|
+
manifestActions
|
|
1038
|
+
)
|
|
1039
|
+
) {
|
|
1040
|
+
return false;
|
|
1041
|
+
}
|
|
945
1042
|
return dataField.RequiresContext;
|
|
946
1043
|
}
|
|
947
1044
|
}
|
|
@@ -1057,7 +1154,7 @@ export function getSelectionMode(
|
|
|
1057
1154
|
}
|
|
1058
1155
|
|
|
1059
1156
|
if (
|
|
1060
|
-
hasBoundActionsAlwaysVisibleInToolBar(lineItemAnnotation, converterContext.getEntityType()) ||
|
|
1157
|
+
hasBoundActionsAlwaysVisibleInToolBar(lineItemAnnotation, manifestActions.actions, converterContext.getEntityType()) ||
|
|
1061
1158
|
hasCustomActionsAlwaysVisibleInToolBar(manifestActions.actions)
|
|
1062
1159
|
) {
|
|
1063
1160
|
return selectionMode;
|
|
@@ -1327,10 +1424,10 @@ function _getCreationBehaviour(
|
|
|
1327
1424
|
|
|
1328
1425
|
const _getRowConfigurationProperty = function (
|
|
1329
1426
|
lineItemAnnotation: LineItem | undefined,
|
|
1330
|
-
visualizationPath: string,
|
|
1331
1427
|
converterContext: ConverterContext,
|
|
1332
1428
|
navigationSettings: NavigationSettingsConfiguration,
|
|
1333
|
-
targetPath: string
|
|
1429
|
+
targetPath: string,
|
|
1430
|
+
tableType: TableType
|
|
1334
1431
|
) {
|
|
1335
1432
|
let pressProperty, navigationTarget;
|
|
1336
1433
|
let criticalityProperty: BindingToolkitExpression<MessageType> = constant(MessageType.None);
|
|
@@ -1356,6 +1453,7 @@ const _getRowConfigurationProperty = function (
|
|
|
1356
1453
|
(ModelHelper.getDraftRoot(targetEntitySet) || ModelHelper.getDraftNode(targetEntitySet)
|
|
1357
1454
|
? "!${$parameters>bindingContext}.getProperty('IsActiveEntity')"
|
|
1358
1455
|
: "undefined") +
|
|
1456
|
+
(tableType === "AnalyticalTable" || tableType === "TreeTable" ? ", bRecreateContext: true" : "") +
|
|
1359
1457
|
"})"; //Need to access to DraftRoot and DraftNode !!!!!!!
|
|
1360
1458
|
} else {
|
|
1361
1459
|
criticalityProperty = getHighlightRowBinding(lineItemAnnotation.annotations?.UI?.Criticality, false, targetEntityType);
|
|
@@ -1464,6 +1562,10 @@ export const getColumnsFromEntityType = function (
|
|
|
1464
1562
|
} else if (relatedPropertiesInfo.exportTimezoneString) {
|
|
1465
1563
|
columnInfo.exportSettings.timezone = relatedPropertiesInfo.exportTimezoneString;
|
|
1466
1564
|
}
|
|
1565
|
+
if (relatedPropertiesInfo.exportDataPointTargetValue) {
|
|
1566
|
+
columnInfo.exportDataPointTargetValue = relatedPropertiesInfo.exportDataPointTargetValue;
|
|
1567
|
+
columnInfo.exportSettings.type = "String";
|
|
1568
|
+
}
|
|
1467
1569
|
|
|
1468
1570
|
// Collect information of related columns to be created.
|
|
1469
1571
|
relatedPropertyNames.forEach((name) => {
|
|
@@ -1546,89 +1648,81 @@ const getColumnDefinitionFromProperty = function (
|
|
|
1546
1648
|
const isHidden = property.annotations?.UI?.Hidden?.valueOf() === true;
|
|
1547
1649
|
const groupPath: string | undefined = property.name ? _sliceAtSlash(property.name, true, false) : undefined;
|
|
1548
1650
|
const isGroup: boolean = groupPath != property.name;
|
|
1549
|
-
const isDataPointFakeProperty: boolean = name.indexOf("@com.sap.vocabularies.UI.v1.DataPoint") > -1;
|
|
1550
1651
|
const exportType: string = _getExportDataType(property.type);
|
|
1551
1652
|
const sDateInputFormat: string | undefined = property.type === "Edm.Date" ? "YYYY-MM-DD" : undefined;
|
|
1552
1653
|
const dataType: string | undefined = getDataFieldDataType(property);
|
|
1553
|
-
const propertyTypeConfig =
|
|
1654
|
+
const propertyTypeConfig = getTypeConfig(property, dataType);
|
|
1554
1655
|
const semanticKeys: SemanticKey = converterContext.getAnnotationsByTerm("Common", CommonAnnotationTerms.SemanticKey, [
|
|
1555
1656
|
converterContext.getEntityType()
|
|
1556
1657
|
])[0];
|
|
1557
1658
|
const isAPropertyFromTextOnlyAnnotation =
|
|
1558
1659
|
textOnlyColumnsFromTextAnnotation && textOnlyColumnsFromTextAnnotation.indexOf(relativePath) >= 0;
|
|
1559
|
-
const sortable =
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
: null;
|
|
1573
|
-
|
|
1574
|
-
if (!isDataPointFakeProperty && _isExportableColumn(property)) {
|
|
1575
|
-
const oUnitProperty = getAssociatedCurrencyProperty(property) || getAssociatedUnitProperty(property);
|
|
1576
|
-
const oTimezoneProperty = getAssociatedTimezoneProperty(property);
|
|
1577
|
-
const sUnitText = property?.annotations?.Measures?.ISOCurrency || property?.annotations?.Measures?.Unit;
|
|
1578
|
-
const sTimezoneText = property?.annotations?.Common?.Timezone;
|
|
1660
|
+
const sortable = (!isHidden || isAPropertyFromTextOnlyAnnotation) && nonSortableColumns.indexOf(relativePath) === -1;
|
|
1661
|
+
const typeConfig = {
|
|
1662
|
+
className: property.type || dataType,
|
|
1663
|
+
formatOptions: propertyTypeConfig.formatOptions,
|
|
1664
|
+
constraints: propertyTypeConfig.constraints
|
|
1665
|
+
};
|
|
1666
|
+
let exportSettings: exportSettings | null = null;
|
|
1667
|
+
if (_isExportableColumn(property)) {
|
|
1668
|
+
const unitProperty = getAssociatedCurrencyProperty(property) || getAssociatedUnitProperty(property);
|
|
1669
|
+
const timezoneProperty = getAssociatedTimezoneProperty(property);
|
|
1670
|
+
const unitText = property.annotations?.Measures?.ISOCurrency || property.annotations?.Measures?.Unit;
|
|
1671
|
+
const timezoneText = property.annotations?.Common?.Timezone;
|
|
1672
|
+
|
|
1579
1673
|
exportSettings = {
|
|
1580
1674
|
type: exportType,
|
|
1581
1675
|
inputFormat: sDateInputFormat,
|
|
1582
1676
|
scale: property.scale,
|
|
1583
1677
|
delimiter: property.type === "Edm.Int64"
|
|
1584
1678
|
};
|
|
1585
|
-
|
|
1586
|
-
|
|
1679
|
+
|
|
1680
|
+
if (unitProperty) {
|
|
1681
|
+
exportSettings.unitProperty = unitProperty.name;
|
|
1587
1682
|
exportSettings.type = "Currency"; // Force to a currency because there's a unitProperty (otherwise the value isn't properly formatted when exported)
|
|
1588
|
-
} else if (
|
|
1589
|
-
exportSettings.unit = `${
|
|
1683
|
+
} else if (unitText) {
|
|
1684
|
+
exportSettings.unit = `${unitText}`;
|
|
1590
1685
|
}
|
|
1591
|
-
if (
|
|
1592
|
-
exportSettings.timezoneProperty =
|
|
1686
|
+
if (timezoneProperty) {
|
|
1687
|
+
exportSettings.timezoneProperty = timezoneProperty.name;
|
|
1593
1688
|
exportSettings.utc = false;
|
|
1594
|
-
} else if (
|
|
1595
|
-
exportSettings.timezone =
|
|
1689
|
+
} else if (timezoneText) {
|
|
1690
|
+
exportSettings.timezone = timezoneText.toString();
|
|
1596
1691
|
}
|
|
1597
1692
|
}
|
|
1693
|
+
|
|
1598
1694
|
const collectedNavigationPropertyLabels: string[] | undefined = _getCollectedNavigationPropertyLabels(relativePath, converterContext);
|
|
1599
1695
|
|
|
1600
|
-
const
|
|
1696
|
+
const column: AnnotationTableColumn = {
|
|
1601
1697
|
key: key,
|
|
1602
1698
|
type: ColumnType.Annotation,
|
|
1603
1699
|
label: getLabel(property, isGroup),
|
|
1604
|
-
groupLabel: isGroup ? getLabel(property) :
|
|
1605
|
-
group: isGroup ? groupPath :
|
|
1700
|
+
groupLabel: isGroup ? getLabel(property) : undefined,
|
|
1701
|
+
group: isGroup ? groupPath : undefined,
|
|
1606
1702
|
annotationPath: fullPropertyPath,
|
|
1607
1703
|
semanticObjectPath: semanticObjectAnnotationPath,
|
|
1608
|
-
|
|
1609
|
-
availability:
|
|
1610
|
-
!availableForAdaptation || isHidden || isDataPointFakeProperty ? AvailabilityType.Hidden : AvailabilityType.Adaptation,
|
|
1704
|
+
availability: !availableForAdaptation || isHidden ? AvailabilityType.Hidden : AvailabilityType.Adaptation,
|
|
1611
1705
|
name: name,
|
|
1612
|
-
relativePath:
|
|
1613
|
-
? (property as any).annotations?.UI?.DataFieldDefault?.Target?.$target?.Value?.path || (property as any).Value.path
|
|
1614
|
-
: relativePath,
|
|
1706
|
+
relativePath: relativePath,
|
|
1615
1707
|
sortable: sortable,
|
|
1616
|
-
isGroupable: aggregationHelper.isAnalyticsSupported() ? aggregationHelper.isPropertyGroupable(property) : sortable,
|
|
1708
|
+
isGroupable: aggregationHelper.isAnalyticsSupported() ? !!aggregationHelper.isPropertyGroupable(property) : sortable,
|
|
1617
1709
|
isKey: property.isKey,
|
|
1618
|
-
isDataPointFakeTargetProperty: isDataPointFakeProperty,
|
|
1619
1710
|
exportSettings: exportSettings,
|
|
1620
1711
|
caseSensitive: isFilteringCaseSensitive(converterContext),
|
|
1621
|
-
typeConfig:
|
|
1622
|
-
visualSettings: isDataPointFakeProperty ? { widthCalculation: null } : undefined,
|
|
1712
|
+
typeConfig: typeConfig as configType,
|
|
1623
1713
|
importance: getImportance((property as any).annotations?.UI?.DataFieldDefault, semanticKeys),
|
|
1624
1714
|
additionalLabels: collectedNavigationPropertyLabels
|
|
1625
1715
|
};
|
|
1626
1716
|
const sTooltip = _getTooltip(property);
|
|
1627
1717
|
if (sTooltip) {
|
|
1628
|
-
|
|
1718
|
+
column.tooltip = sTooltip;
|
|
1629
1719
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1720
|
+
const targetValuefromDP = getTargetValueOnDataPoint(property);
|
|
1721
|
+
if (isDataPointFromDataFieldDefault(property) && typeof targetValuefromDP === "string" && column.exportSettings) {
|
|
1722
|
+
column.exportDataPointTargetValue = targetValuefromDP;
|
|
1723
|
+
column.exportSettings.template = "{0}/" + targetValuefromDP;
|
|
1724
|
+
}
|
|
1725
|
+
return column;
|
|
1632
1726
|
};
|
|
1633
1727
|
|
|
1634
1728
|
/**
|
|
@@ -1641,15 +1735,20 @@ const getColumnDefinitionFromProperty = function (
|
|
|
1641
1735
|
|
|
1642
1736
|
function _isExportableColumn(source: DataFieldAbstractTypes | Property): boolean {
|
|
1643
1737
|
let propertyType, property;
|
|
1644
|
-
const
|
|
1645
|
-
if (isProperty(source &&
|
|
1646
|
-
|
|
1738
|
+
const dataFieldDefaultProperty = (source as Property).annotations.UI?.DataFieldDefault;
|
|
1739
|
+
if (isProperty(source) && dataFieldDefaultProperty?.$Type) {
|
|
1740
|
+
if (isReferencePropertyStaticallyHidden(dataFieldDefaultProperty) === true) {
|
|
1741
|
+
return false;
|
|
1742
|
+
}
|
|
1743
|
+
propertyType = dataFieldDefaultProperty?.$Type;
|
|
1744
|
+
} else if (isReferencePropertyStaticallyHidden(source as DataFieldAbstractTypes) === true) {
|
|
1745
|
+
return false;
|
|
1647
1746
|
} else {
|
|
1648
1747
|
property = source as DataFieldAbstractTypes;
|
|
1649
1748
|
propertyType = property.$Type;
|
|
1650
|
-
if (propertyType === UIAnnotationTypes.DataFieldForAnnotation && (property as DataFieldForAnnotation).Target
|
|
1749
|
+
if (propertyType === UIAnnotationTypes.DataFieldForAnnotation && (property as DataFieldForAnnotation).Target?.$target?.$Type) {
|
|
1651
1750
|
//For Chart
|
|
1652
|
-
propertyType = (property as DataFieldForAnnotation).Target
|
|
1751
|
+
propertyType = (property as DataFieldForAnnotation).Target?.$target?.$Type;
|
|
1653
1752
|
return UIAnnotationTypes.ChartDefinitionType.indexOf(propertyType) === -1;
|
|
1654
1753
|
} else if (
|
|
1655
1754
|
(property as DataField).Value?.$target?.annotations?.Core?.MediaType?.term === "Org.OData.Core.V1.MediaType" &&
|
|
@@ -1755,7 +1854,6 @@ export const _getVisibleExpression = function (
|
|
|
1755
1854
|
*
|
|
1756
1855
|
* @param dataFieldGroup DataField defined in the annotations
|
|
1757
1856
|
* @param fieldFormatOptions FormatOptions optional.
|
|
1758
|
-
* @param fieldFormatOptions.isAnalytics This flag is used to check if the analytic table has GroupHeader expanded.
|
|
1759
1857
|
* @returns Compile binding of field group expressions.
|
|
1760
1858
|
* @private
|
|
1761
1859
|
*/
|
|
@@ -1763,17 +1861,21 @@ const _getFieldGroupHiddenExpressions = function (
|
|
|
1763
1861
|
dataFieldGroup: DataFieldAbstractTypes,
|
|
1764
1862
|
fieldFormatOptions: any
|
|
1765
1863
|
): CompiledBindingToolkitExpression | undefined {
|
|
1766
|
-
const
|
|
1864
|
+
const fieldGroupHiddenExpressions: BindingToolkitExpression<any>[] = [];
|
|
1767
1865
|
if (
|
|
1768
1866
|
dataFieldGroup.$Type === UIAnnotationTypes.DataFieldForAnnotation &&
|
|
1769
1867
|
dataFieldGroup.Target?.$target?.$Type === UIAnnotationTypes.FieldGroupType
|
|
1770
1868
|
) {
|
|
1771
|
-
dataFieldGroup
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
)
|
|
1775
|
-
|
|
1776
|
-
|
|
1869
|
+
if (dataFieldGroup?.annotations?.UI?.Hidden) {
|
|
1870
|
+
return compileExpression(not(equal(getExpressionFromAnnotation(dataFieldGroup.annotations.UI.Hidden), true)));
|
|
1871
|
+
} else {
|
|
1872
|
+
dataFieldGroup.Target.$target.Data?.forEach((innerDataField: DataFieldAbstractTypes | DataPointTypeTypes) => {
|
|
1873
|
+
fieldGroupHiddenExpressions.push(
|
|
1874
|
+
_getVisibleExpression({ targetObject: innerDataField } as DataModelObjectPath, fieldFormatOptions)
|
|
1875
|
+
);
|
|
1876
|
+
});
|
|
1877
|
+
return compileExpression(ifElse(or(...fieldGroupHiddenExpressions), constant(true), constant(false)));
|
|
1878
|
+
}
|
|
1777
1879
|
} else {
|
|
1778
1880
|
return undefined;
|
|
1779
1881
|
}
|
|
@@ -2024,6 +2126,22 @@ const _sliceAtSlash = function (path: string, isLastSlash: boolean, isLastPart:
|
|
|
2024
2126
|
return isLastPart ? path.substring(iSlashIndex + 1, path.length) : path.substring(0, iSlashIndex);
|
|
2025
2127
|
};
|
|
2026
2128
|
|
|
2129
|
+
/**
|
|
2130
|
+
* Determines if the column contains a multi-value field.
|
|
2131
|
+
*
|
|
2132
|
+
* @param dataField The DataField being processed
|
|
2133
|
+
* @param converterContext The converter context
|
|
2134
|
+
* @returns True if the DataField corresponds to a multi-value field.
|
|
2135
|
+
*/
|
|
2136
|
+
const _isColumnMultiValued = function (dataField: DataFieldAbstractTypes, converterContext: ConverterContext): boolean {
|
|
2137
|
+
if (isDataFieldTypes(dataField) && isPathExpression(dataField.Value)) {
|
|
2138
|
+
const propertyObjectPath = enhanceDataModelPath(converterContext.getDataModelObjectPath(), dataField.Value.path);
|
|
2139
|
+
return isCollectionField(propertyObjectPath);
|
|
2140
|
+
} else {
|
|
2141
|
+
return false;
|
|
2142
|
+
}
|
|
2143
|
+
};
|
|
2144
|
+
|
|
2027
2145
|
/**
|
|
2028
2146
|
* Determine whether a column is sortable.
|
|
2029
2147
|
*
|
|
@@ -2297,6 +2415,10 @@ const getColumnsFromAnnotations = function (
|
|
|
2297
2415
|
converterContext.getEntityType()
|
|
2298
2416
|
])[0];
|
|
2299
2417
|
if (lineItemAnnotation) {
|
|
2418
|
+
const tableConverterContext = converterContext.getConverterContextFor(
|
|
2419
|
+
getTargetObjectPath(converterContext.getDataModelObjectPath())
|
|
2420
|
+
);
|
|
2421
|
+
|
|
2300
2422
|
lineItemAnnotation.forEach((lineItem) => {
|
|
2301
2423
|
if (!_isValidColumn(lineItem)) {
|
|
2302
2424
|
return;
|
|
@@ -2307,26 +2429,10 @@ const getColumnsFromAnnotations = function (
|
|
|
2307
2429
|
? getSemanticObjectPath(converterContext, lineItem)
|
|
2308
2430
|
: undefined;
|
|
2309
2431
|
const relativePath = _getRelativePath(lineItem);
|
|
2310
|
-
|
|
2432
|
+
|
|
2311
2433
|
// Determine properties which are consumed by this LineItem.
|
|
2312
2434
|
const relatedPropertiesInfo: ComplexPropertyInfo = collectRelatedPropertiesRecursively(lineItem, converterContext, tableType);
|
|
2313
|
-
const
|
|
2314
|
-
if (
|
|
2315
|
-
lineItem.$Type === UIAnnotationTypes.DataFieldForAnnotation &&
|
|
2316
|
-
lineItem.Target?.$target?.$Type === UIAnnotationTypes.FieldGroupType
|
|
2317
|
-
) {
|
|
2318
|
-
relatedPropertyNames = Object.keys(relatedPropertiesInfo.properties).filter((key) => {
|
|
2319
|
-
let isStaticallyHidden;
|
|
2320
|
-
if (relatedProperties[key].annotations?.UI) {
|
|
2321
|
-
isStaticallyHidden = isReferencePropertyStaticallyHidden(relatedProperties[key].annotations?.UI?.DataFieldDefault);
|
|
2322
|
-
} else {
|
|
2323
|
-
isStaticallyHidden = isReferencePropertyStaticallyHidden(relatedProperties[key]);
|
|
2324
|
-
}
|
|
2325
|
-
return !isStaticallyHidden;
|
|
2326
|
-
});
|
|
2327
|
-
} else {
|
|
2328
|
-
relatedPropertyNames = Object.keys(relatedPropertiesInfo.properties);
|
|
2329
|
-
}
|
|
2435
|
+
const relatedPropertyNames: string[] = Object.keys(relatedPropertiesInfo.properties);
|
|
2330
2436
|
const additionalPropertyNames: string[] = Object.keys(relatedPropertiesInfo.additionalProperties);
|
|
2331
2437
|
const groupPath: string = _sliceAtSlash(relativePath, true, false);
|
|
2332
2438
|
const isGroup: boolean = groupPath != relativePath;
|
|
@@ -2372,62 +2478,70 @@ const getColumnsFromAnnotations = function (
|
|
|
2372
2478
|
}
|
|
2373
2479
|
|
|
2374
2480
|
const propertyTypeConfig = dataType && getTypeConfig(lineItem, dataType);
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
}
|
|
2384
|
-
: undefined;
|
|
2481
|
+
const typeConfig: configType = {
|
|
2482
|
+
className: dataType as keyof typeof mDefaultTypeForEdmType,
|
|
2483
|
+
formatOptions: {
|
|
2484
|
+
...formatOptions,
|
|
2485
|
+
...propertyTypeConfig?.formatOptions
|
|
2486
|
+
},
|
|
2487
|
+
constraints: propertyTypeConfig?.constraints
|
|
2488
|
+
};
|
|
2385
2489
|
const visualSettings: VisualSettings = {};
|
|
2386
|
-
if (!dataType || !
|
|
2490
|
+
if (!dataType || !typeConfig) {
|
|
2387
2491
|
// for charts
|
|
2388
2492
|
visualSettings.widthCalculation = null;
|
|
2389
2493
|
}
|
|
2390
|
-
|
|
2391
|
-
const
|
|
2494
|
+
const isMultiValue = _isColumnMultiValued(lineItem, tableConverterContext);
|
|
2495
|
+
const sortable = !isMultiValue && _isColumnSortable(lineItem, relativePath, nonSortableColumns);
|
|
2496
|
+
const column: AnnotationTableColumn = {
|
|
2392
2497
|
key: KeyHelper.generateKeyFromDataField(lineItem),
|
|
2393
2498
|
type: ColumnType.Annotation,
|
|
2394
2499
|
label: sLabel,
|
|
2395
|
-
groupLabel: isGroup ? getLabel(lineItem) :
|
|
2396
|
-
group: isGroup ? groupPath :
|
|
2500
|
+
groupLabel: isGroup ? getLabel(lineItem) : undefined,
|
|
2501
|
+
group: isGroup ? groupPath : undefined,
|
|
2397
2502
|
FieldGroupHiddenExpressions: fieldGroupHiddenExpressions,
|
|
2398
2503
|
annotationPath: converterContext.getEntitySetBasedAnnotationPath(lineItem.fullyQualifiedName),
|
|
2399
2504
|
semanticObjectPath: semanticObjectAnnotationPath,
|
|
2400
|
-
availability:
|
|
2505
|
+
availability: isReferencePropertyStaticallyHidden(lineItem) ? AvailabilityType.Hidden : AvailabilityType.Default,
|
|
2401
2506
|
name: name,
|
|
2402
2507
|
showDataFieldsLabel: showDataFieldsLabel,
|
|
2403
2508
|
relativePath: relativePath,
|
|
2404
|
-
sortable:
|
|
2509
|
+
sortable: sortable,
|
|
2405
2510
|
propertyInfos: relatedPropertyNames.length ? relatedPropertyNames : undefined,
|
|
2406
2511
|
additionalPropertyInfos: additionalPropertyNames.length > 0 ? additionalPropertyNames : undefined,
|
|
2407
2512
|
exportSettings: exportSettings,
|
|
2408
|
-
width: lineItem.annotations?.HTML5?.CssDefaults?.width || undefined,
|
|
2513
|
+
width: (lineItem.annotations?.HTML5?.CssDefaults?.width?.valueOf() as string) || undefined,
|
|
2409
2514
|
importance: getImportance(lineItem as DataFieldTypes, semanticKeys),
|
|
2410
2515
|
isNavigable: true,
|
|
2411
2516
|
formatOptions: formatOptions,
|
|
2412
2517
|
caseSensitive: isFilteringCaseSensitive(converterContext),
|
|
2413
|
-
typeConfig:
|
|
2518
|
+
typeConfig: typeConfig,
|
|
2414
2519
|
visualSettings: visualSettings,
|
|
2415
2520
|
timezoneText: exportSettings?.timezone,
|
|
2416
2521
|
isPartOfLineItem: true
|
|
2417
2522
|
};
|
|
2418
2523
|
const sTooltip = _getTooltip(lineItem);
|
|
2419
2524
|
if (sTooltip) {
|
|
2420
|
-
|
|
2525
|
+
column.tooltip = sTooltip;
|
|
2421
2526
|
}
|
|
2422
2527
|
if (relatedPropertiesInfo.textOnlyPropertiesFromTextAnnotation.length > 0) {
|
|
2423
2528
|
textOnlyColumnsFromTextAnnotation.push(...relatedPropertiesInfo.textOnlyPropertiesFromTextAnnotation);
|
|
2424
2529
|
}
|
|
2530
|
+
if (relatedPropertiesInfo.exportDataPointTargetValue && column.exportSettings) {
|
|
2531
|
+
column.exportDataPointTargetValue = relatedPropertiesInfo.exportDataPointTargetValue;
|
|
2532
|
+
column.exportSettings.type = "String";
|
|
2533
|
+
}
|
|
2425
2534
|
|
|
2426
|
-
annotationColumns.push(
|
|
2535
|
+
annotationColumns.push(column);
|
|
2427
2536
|
|
|
2428
2537
|
// Collect information of related columns to be created.
|
|
2429
2538
|
relatedPropertyNames.forEach((relatedPropertyName) => {
|
|
2430
2539
|
columnsToBeCreated[relatedPropertyName] = relatedPropertiesInfo.properties[relatedPropertyName];
|
|
2540
|
+
|
|
2541
|
+
// In case of a multi-value, related properties cannot be sorted as we go through a 1-n relation
|
|
2542
|
+
if (isMultiValue) {
|
|
2543
|
+
nonSortableColumns.push(relatedPropertyName);
|
|
2544
|
+
}
|
|
2431
2545
|
});
|
|
2432
2546
|
|
|
2433
2547
|
// Create columns for additional properties identified for ALP use case.
|
|
@@ -2767,6 +2881,15 @@ function getSortConditions(
|
|
|
2767
2881
|
return sortConditions;
|
|
2768
2882
|
}
|
|
2769
2883
|
|
|
2884
|
+
function getInitialExpansionLevel(presentationVariantAnnotation: PresentationVariantType | undefined): number | undefined {
|
|
2885
|
+
if (!presentationVariantAnnotation) {
|
|
2886
|
+
return undefined;
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
const level = presentationVariantAnnotation.InitialExpansionLevel?.valueOf();
|
|
2890
|
+
|
|
2891
|
+
return typeof level === "number" ? level : undefined;
|
|
2892
|
+
}
|
|
2770
2893
|
/**
|
|
2771
2894
|
* Converts an array of propertyPath to an array of propertyInfo names.
|
|
2772
2895
|
*
|
|
@@ -2777,11 +2900,12 @@ function getSortConditions(
|
|
|
2777
2900
|
|
|
2778
2901
|
function convertPropertyPathsToInfoNames(paths: PropertyPath[], columns: TableColumn[]): string[] {
|
|
2779
2902
|
const infoNames: string[] = [];
|
|
2903
|
+
let propertyInfo: TableColumn | undefined, annotationColumn: AnnotationTableColumn;
|
|
2780
2904
|
paths.forEach((currentPath) => {
|
|
2781
|
-
if (currentPath
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
return !annotationColumn.propertyInfos && annotationColumn.relativePath === currentPath
|
|
2905
|
+
if (currentPath?.value) {
|
|
2906
|
+
propertyInfo = columns.find((column) => {
|
|
2907
|
+
annotationColumn = column as AnnotationTableColumn;
|
|
2908
|
+
return !annotationColumn.propertyInfos && annotationColumn.relativePath === currentPath?.value;
|
|
2785
2909
|
});
|
|
2786
2910
|
if (propertyInfo) {
|
|
2787
2911
|
infoNames.push(propertyInfo.name);
|
|
@@ -2906,7 +3030,7 @@ export function getTableAnnotationConfiguration(
|
|
|
2906
3030
|
const isSearchable = isPathSearchable(converterContext.getDataModelObjectPath());
|
|
2907
3031
|
const standardActions = {
|
|
2908
3032
|
create: getStandardActionCreate(converterContext, standardActionsContext),
|
|
2909
|
-
|
|
3033
|
+
delete: getStandardActionDelete(converterContext, standardActionsContext),
|
|
2910
3034
|
paste: getStandardActionPaste(converterContext, standardActionsContext, isInsertUpdateTemplated),
|
|
2911
3035
|
massEdit: getStandardActionMassEdit(converterContext, standardActionsContext),
|
|
2912
3036
|
creationRow: getCreationRow(converterContext, standardActionsContext)
|
|
@@ -2919,10 +3043,10 @@ export function getTableAnnotationConfiguration(
|
|
|
2919
3043
|
navigationPath: navigationPropertyPath,
|
|
2920
3044
|
row: _getRowConfigurationProperty(
|
|
2921
3045
|
lineItemAnnotation,
|
|
2922
|
-
visualizationPath,
|
|
2923
3046
|
converterContext,
|
|
2924
3047
|
navigationSettings,
|
|
2925
|
-
navigationTargetPath
|
|
3048
|
+
navigationTargetPath,
|
|
3049
|
+
tableManifestConfiguration.type
|
|
2926
3050
|
),
|
|
2927
3051
|
p13nMode: p13nMode,
|
|
2928
3052
|
standardActions: {
|
|
@@ -2942,7 +3066,8 @@ export function getTableAnnotationConfiguration(
|
|
|
2942
3066
|
threshold: threshold,
|
|
2943
3067
|
sortConditions: getSortConditions(converterContext, presentationVariantAnnotation, columns),
|
|
2944
3068
|
title: title,
|
|
2945
|
-
searchable: tableManifestConfiguration.type !== "AnalyticalTable" && !(isConstant(isSearchable) && isSearchable.value === false)
|
|
3069
|
+
searchable: tableManifestConfiguration.type !== "AnalyticalTable" && !(isConstant(isSearchable) && isSearchable.value === false),
|
|
3070
|
+
initialExpansionLevel: getInitialExpansionLevel(presentationVariantAnnotation)
|
|
2946
3071
|
};
|
|
2947
3072
|
}
|
|
2948
3073
|
|
|
@@ -3070,9 +3195,9 @@ function _getTableType(
|
|
|
3070
3195
|
): TableType {
|
|
3071
3196
|
let tableType = tableSettings?.type || "ResponsiveTable";
|
|
3072
3197
|
/* Now, we keep the configuration in the manifest, even if it leads to errors.
|
|
3073
|
-
We only change if we're not on desktop from Analytical to Responsive.
|
|
3198
|
+
We only change if we're not on desktop from Analytical/Tree to Responsive.
|
|
3074
3199
|
*/
|
|
3075
|
-
if (tableType === "AnalyticalTable" && !converterContext.getManifestWrapper().isDesktop()) {
|
|
3200
|
+
if ((tableType === "AnalyticalTable" || tableType === "TreeTable") && !converterContext.getManifestWrapper().isDesktop()) {
|
|
3076
3201
|
tableType = "ResponsiveTable";
|
|
3077
3202
|
}
|
|
3078
3203
|
return tableType;
|
|
@@ -3224,30 +3349,15 @@ export function getTableManifestConfiguration(
|
|
|
3224
3349
|
useCondensedTableLayout: condensedTableLayout && isCondensedTableLayoutCompliant,
|
|
3225
3350
|
isCompactType: _manifestWrapper.isCompactType()
|
|
3226
3351
|
};
|
|
3227
|
-
return { ...oConfiguration, ...gridTableRowMode, ...oFilterConfiguration };
|
|
3228
|
-
}
|
|
3229
3352
|
|
|
3230
|
-
|
|
3231
|
-
scale?: number;
|
|
3232
|
-
precision?: number;
|
|
3233
|
-
maxLength?: number;
|
|
3234
|
-
nullable?: boolean;
|
|
3235
|
-
minimum?: string;
|
|
3236
|
-
maximum?: string;
|
|
3237
|
-
isDigitSequence?: boolean;
|
|
3238
|
-
};
|
|
3353
|
+
const tableConfiguration: TableControlConfiguration = { ...oConfiguration, ...gridTableRowMode, ...oFilterConfiguration };
|
|
3239
3354
|
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
parseKeepsEmptyString?: boolean;
|
|
3244
|
-
};
|
|
3355
|
+
if (tableType === "TreeTable") {
|
|
3356
|
+
tableConfiguration.hierarchyQualifier = tableSettings.hierarchyQualifier;
|
|
3357
|
+
}
|
|
3245
3358
|
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
constraints: configTypeConstraints;
|
|
3249
|
-
formatOptions: configTypeformatOptions;
|
|
3250
|
-
};
|
|
3359
|
+
return tableConfiguration;
|
|
3360
|
+
}
|
|
3251
3361
|
|
|
3252
3362
|
export function getTypeConfig(oProperty: Property | DataFieldAbstractTypes, dataType: string | undefined): any {
|
|
3253
3363
|
let oTargetMapping = EDM_TYPE_MAPPING[(oProperty as Property)?.type] || (dataType ? EDM_TYPE_MAPPING[dataType] : undefined);
|
|
@@ -3316,5 +3426,6 @@ export default {
|
|
|
3316
3426
|
splitPath,
|
|
3317
3427
|
getSelectionVariantConfiguration,
|
|
3318
3428
|
getTableManifestConfiguration,
|
|
3319
|
-
getTypeConfig
|
|
3429
|
+
getTypeConfig,
|
|
3430
|
+
updateTableVisualizationForType
|
|
3320
3431
|
};
|