@sapui5/sap.fe.core 1.111.1 → 1.113.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 +1 -1
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/ActionRuntime-dbg.js +6 -5
- package/src/sap/fe/core/ActionRuntime.js +1 -1
- package/src/sap/fe/core/ActionRuntime.js.map +1 -1
- package/src/sap/fe/core/ActionRuntime.ts +12 -11
- package/src/sap/fe/core/AppComponent-dbg.js +35 -9
- package/src/sap/fe/core/AppComponent.js +1 -1
- package/src/sap/fe/core/AppComponent.js.map +1 -1
- package/src/sap/fe/core/AppComponent.ts +66 -9
- package/src/sap/fe/core/AppStateHandler-dbg.js +5 -2
- package/src/sap/fe/core/AppStateHandler.js +1 -1
- package/src/sap/fe/core/AppStateHandler.js.map +1 -1
- package/src/sap/fe/core/AppStateHandler.ts +10 -1
- package/src/sap/fe/core/BaseController-dbg.js +1 -1
- package/src/sap/fe/core/BaseController.ts +2 -1
- package/src/sap/fe/core/CommonUtils-dbg.js +202 -533
- package/src/sap/fe/core/CommonUtils.js +1 -1
- package/src/sap/fe/core/CommonUtils.js.map +1 -1
- package/src/sap/fe/core/CommonUtils.ts +260 -681
- package/src/sap/fe/core/ExtensionAPI-dbg.js +4 -1
- package/src/sap/fe/core/ExtensionAPI.js +1 -1
- package/src/sap/fe/core/ExtensionAPI.js.map +1 -1
- package/src/sap/fe/core/ExtensionAPI.ts +11 -1
- package/src/sap/fe/core/PageController-dbg.js +26 -31
- package/src/sap/fe/core/PageController.js +1 -1
- package/src/sap/fe/core/PageController.js.map +1 -1
- package/src/sap/fe/core/PageController.ts +17 -3
- package/src/sap/fe/core/ResourceModel-dbg.js +71 -0
- package/src/sap/fe/core/ResourceModel.js +6 -0
- package/src/sap/fe/core/ResourceModel.js.map +1 -0
- package/src/sap/fe/core/ResourceModel.ts +67 -0
- package/src/sap/fe/core/TemplateComponent-dbg.js +1 -1
- package/src/sap/fe/core/TemplateComponent.ts +1 -0
- package/src/sap/fe/core/TemplateModel-dbg.js +1 -1
- package/src/sap/fe/core/TemplateModel.ts +6 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel-dbg.js +5 -7
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js.map +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +6 -5
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase-dbg.js +164 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.js +6 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.js.map +1 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockBase.ts +170 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockSupport-dbg.js +88 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockSupport.js +6 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockSupport.js.map +1 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockSupport.ts +142 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor-dbg.js +913 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor.js +21 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor.js.map +1 -0
- package/src/sap/fe/core/buildingBlocks/{BuildingBlockRuntime.ts → BuildingBlockTemplateProcessor.ts} +313 -373
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlock-dbg.js +79 -0
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlock.js +15 -0
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlock.js.map +1 -0
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlock.ts +68 -0
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlockFragment-dbg.js +162 -0
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlockFragment.js +6 -0
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlockFragment.js.map +1 -0
- package/src/sap/fe/core/buildingBlocks/RuntimeBuildingBlockFragment.ts +183 -0
- package/src/sap/fe/core/buildingBlocks/TraceInfo-dbg.js +4 -2
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +1 -1
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js.map +1 -1
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +5 -3
- package/src/sap/fe/core/controllerextensions/EditFlow-dbg.js +936 -231
- package/src/sap/fe/core/controllerextensions/EditFlow.js +1 -1
- package/src/sap/fe/core/controllerextensions/EditFlow.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +1023 -255
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation-dbg.js +48 -98
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +1 -1
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +95 -129
- package/src/sap/fe/core/controllerextensions/InternalRouting-dbg.js +14 -17
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +1 -1
- package/src/sap/fe/core/controllerextensions/InternalRouting.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +23 -17
- package/src/sap/fe/core/controllerextensions/KPIManagement-dbg.js +1 -1
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +2 -0
- package/src/sap/fe/core/controllerextensions/MassEdit-dbg.js +3 -3
- package/src/sap/fe/core/controllerextensions/MassEdit.js +1 -1
- package/src/sap/fe/core/controllerextensions/MassEdit.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +2 -2
- package/src/sap/fe/core/controllerextensions/MessageHandler-dbg.js +2 -1
- package/src/sap/fe/core/controllerextensions/MessageHandler.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +2 -0
- package/src/sap/fe/core/controllerextensions/PageReady-dbg.js +3 -5
- package/src/sap/fe/core/controllerextensions/PageReady.js +1 -1
- package/src/sap/fe/core/controllerextensions/PageReady.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/PageReady.ts +26 -4
- package/src/sap/fe/core/controllerextensions/Paginator-dbg.js +2 -1
- package/src/sap/fe/core/controllerextensions/Paginator.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/Paginator.ts +7 -0
- package/src/sap/fe/core/controllerextensions/Placeholder-dbg.js +1 -1
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +8 -0
- package/src/sap/fe/core/controllerextensions/Share-dbg.js +8 -1
- package/src/sap/fe/core/controllerextensions/Share.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/Share.ts +11 -0
- package/src/sap/fe/core/controllerextensions/SideEffects-dbg.js +14 -13
- package/src/sap/fe/core/controllerextensions/SideEffects.js +1 -1
- package/src/sap/fe/core/controllerextensions/SideEffects.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +27 -27
- package/src/sap/fe/core/controllerextensions/ViewState-dbg.js +17 -8
- package/src/sap/fe/core/controllerextensions/ViewState.js +1 -1
- package/src/sap/fe/core/controllerextensions/ViewState.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/ViewState.ts +35 -14
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase-dbg.js +6 -5
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +7 -4
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync-dbg.js +285 -82
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +326 -89
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon-dbg.js +23 -2
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +32 -3
- package/src/sap/fe/core/controllerextensions/collaboration/Manage-dbg.js +4 -4
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +4 -5
- package/src/sap/fe/core/controllerextensions/collaboration/ManageDialog.fragment.xml +17 -3
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.block-dbg.js +65 -34
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.block.js +1 -1
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.block.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/dialog/OperationsDialog.block.tsx +33 -18
- package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog-dbg.js +103 -0
- package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.js +6 -0
- package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.js.map +1 -0
- package/src/sap/fe/core/controllerextensions/editFlow/NotApplicableContextDialog.tsx +124 -0
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper-dbg.js +78 -149
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +85 -160
- package/src/sap/fe/core/controllerextensions/editFlow/draft-dbg.js +49 -49
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +52 -63
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/operations/_internal-dbg.js +82 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/_internal.js +6 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/_internal.js.map +1 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/_internal.ts +123 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade-dbg.js +1508 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.js +6 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.js.map +1 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade.ts +1993 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations-dbg.js +3 -1415
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +2 -1921
- package/src/sap/fe/core/controllerextensions/editFlow/sticky-dbg.js +10 -18
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +9 -22
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling-dbg.js +53 -47
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +1 -1
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +55 -61
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher-dbg.js +12 -1
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/pageReady/DataQueryWatcher.ts +19 -0
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy-dbg.js +78 -13
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +1 -1
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +100 -13
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +4 -1
- package/src/sap/fe/core/controls/CommandExecution-dbg.js +16 -5
- package/src/sap/fe/core/controls/CommandExecution.js +1 -1
- package/src/sap/fe/core/controls/CommandExecution.js.map +1 -1
- package/src/sap/fe/core/controls/CommandExecution.ts +15 -3
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler-dbg.js +3 -2
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +1 -1
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js.map +1 -1
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +4 -1
- package/src/sap/fe/core/controls/FilterBar-dbg.js +1 -1
- package/src/sap/fe/core/controls/FilterBar.ts +5 -0
- package/src/sap/fe/core/controls/FormElementWrapper-dbg.js +1 -1
- package/src/sap/fe/core/controls/FormElementWrapper.ts +3 -0
- package/src/sap/fe/core/controls/filterbar/FilterContainer-dbg.js +1 -1
- package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +7 -0
- package/src/sap/fe/core/controls/filterbar/VisualFilter-dbg.js +1 -1
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +4 -0
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer-dbg.js +1 -1
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +10 -0
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils-dbg.js +4 -3
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +1 -1
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js.map +1 -1
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +3 -2
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +0 -1
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +2 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers-dbg.js +6 -1
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +1 -1
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js.map +1 -1
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +5 -0
- package/src/sap/fe/core/converters/ConverterContext-dbg.js +3 -5
- package/src/sap/fe/core/converters/ConverterContext.js +1 -1
- package/src/sap/fe/core/converters/ConverterContext.js.map +1 -1
- package/src/sap/fe/core/converters/ConverterContext.ts +4 -6
- package/src/sap/fe/core/converters/ManifestSettings-dbg.js +1 -8
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.js.map +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +15 -6
- package/src/sap/fe/core/converters/ManifestWrapper-dbg.js +21 -3
- package/src/sap/fe/core/converters/ManifestWrapper.js +1 -1
- package/src/sap/fe/core/converters/ManifestWrapper.js.map +1 -1
- package/src/sap/fe/core/converters/ManifestWrapper.ts +23 -1
- package/src/sap/fe/core/converters/MetaModelConverter-dbg.js +67 -62
- package/src/sap/fe/core/converters/MetaModelConverter.js +1 -1
- package/src/sap/fe/core/converters/MetaModelConverter.js.map +1 -1
- package/src/sap/fe/core/converters/MetaModelConverter.ts +75 -66
- package/src/sap/fe/core/converters/TemplateConverter-dbg.js +2 -1
- package/src/sap/fe/core/converters/TemplateConverter.js.map +1 -1
- package/src/sap/fe/core/converters/TemplateConverter.ts +2 -1
- package/src/sap/fe/core/converters/annotations/DataField-dbg.js +81 -20
- package/src/sap/fe/core/converters/annotations/DataField.js +1 -1
- package/src/sap/fe/core/converters/annotations/DataField.js.map +1 -1
- package/src/sap/fe/core/converters/annotations/DataField.ts +76 -22
- package/src/sap/fe/core/converters/common/AnnotationConverter-dbg.js +1027 -956
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +1 -1
- package/src/sap/fe/core/converters/common/AnnotationConverter.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/Action-dbg.js +13 -19
- package/src/sap/fe/core/converters/controls/Common/Action.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/Action.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/Action.ts +37 -40
- package/src/sap/fe/core/converters/controls/Common/Chart-dbg.js +95 -33
- package/src/sap/fe/core/converters/controls/Common/Chart.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/Chart.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +133 -49
- package/src/sap/fe/core/converters/controls/Common/DataVisualization-dbg.js +99 -62
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +140 -75
- package/src/sap/fe/core/converters/controls/Common/Form-dbg.js +7 -6
- package/src/sap/fe/core/converters/controls/Common/Form.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/Form.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/Form.ts +8 -14
- package/src/sap/fe/core/converters/controls/Common/KPI-dbg.js +9 -9
- package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +17 -18
- package/src/sap/fe/core/converters/controls/Common/Table-dbg.js +143 -93
- package/src/sap/fe/core/converters/controls/Common/Table.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/Table.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/Table.ts +221 -177
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions-dbg.js +23 -16
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js.map +1 -1
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +27 -23
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar-dbg.js +138 -75
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +1 -1
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js.map +1 -1
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +223 -110
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters-dbg.js +38 -28
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +1 -1
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js.map +1 -1
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +67 -47
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar-dbg.js +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet-dbg.js +6 -6
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js.map +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +5 -8
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection-dbg.js +54 -24
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js.map +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +84 -37
- package/src/sap/fe/core/converters/helpers/Aggregation-dbg.js +12 -14
- package/src/sap/fe/core/converters/helpers/Aggregation.js +1 -1
- package/src/sap/fe/core/converters/helpers/Aggregation.js.map +1 -1
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +16 -11
- package/src/sap/fe/core/converters/helpers/BindingHelper-dbg.js +8 -6
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +1 -1
- package/src/sap/fe/core/converters/helpers/BindingHelper.js.map +1 -1
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +8 -6
- package/src/sap/fe/core/converters/helpers/ConfigurableObject-dbg.js +7 -6
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +1 -1
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js.map +1 -1
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +19 -10
- package/src/sap/fe/core/converters/helpers/DataFieldHelper-dbg.js +1 -1
- package/src/sap/fe/core/converters/helpers/DataFieldHelper.ts +7 -2
- package/src/sap/fe/core/converters/helpers/ID-dbg.js +1 -1
- package/src/sap/fe/core/converters/helpers/ID.ts +2 -1
- package/src/sap/fe/core/converters/helpers/IssueManager-dbg.js +11 -9
- package/src/sap/fe/core/converters/helpers/IssueManager.js +1 -1
- package/src/sap/fe/core/converters/helpers/IssueManager.js.map +1 -1
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +10 -8
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction-dbg.js +22 -20
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +1 -1
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js.map +1 -1
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +19 -16
- package/src/sap/fe/core/converters/templates/ListReportConverter-dbg.js +32 -35
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +1 -1
- package/src/sap/fe/core/converters/templates/ListReportConverter.js.map +1 -1
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +42 -37
- package/src/sap/fe/core/converters/templates/ObjectPageConverter-dbg.js +12 -5
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +1 -1
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js.map +1 -1
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +8 -2
- package/src/sap/fe/core/formatters/FPMFormatter-dbg.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.ts +1 -1
- package/src/sap/fe/core/formatters/FiscalFormat-dbg.js +2 -2
- package/src/sap/fe/core/formatters/FiscalFormat.ts +6 -1
- package/src/sap/fe/core/formatters/TableFormatter-dbg.js +3 -7
- package/src/sap/fe/core/formatters/TableFormatter.js +1 -1
- package/src/sap/fe/core/formatters/TableFormatter.js.map +1 -1
- package/src/sap/fe/core/formatters/TableFormatter.ts +2 -6
- package/src/sap/fe/core/formatters/ValueFormatter-dbg.js +9 -5
- package/src/sap/fe/core/formatters/ValueFormatter.js +1 -1
- package/src/sap/fe/core/formatters/ValueFormatter.js.map +1 -1
- package/src/sap/fe/core/formatters/ValueFormatter.ts +11 -4
- package/src/sap/fe/core/fpm/Component-dbg.js +1 -1
- package/src/sap/fe/core/fpm/Component.ts +1 -0
- package/src/sap/fe/core/fpm/manifest.json +1 -1
- package/src/sap/fe/core/helpers/AppStartupHelper-dbg.js +2 -2
- package/src/sap/fe/core/helpers/AppStartupHelper.js +1 -1
- package/src/sap/fe/core/helpers/AppStartupHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit-dbg.js +7 -6
- package/src/sap/fe/core/helpers/BindingToolkit.js +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit.js.map +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit.ts +9 -9
- package/src/sap/fe/core/helpers/ClassSupport-dbg.js +1 -1
- package/src/sap/fe/core/helpers/ClassSupport.js.map +1 -1
- package/src/sap/fe/core/helpers/ClassSupport.ts +1 -0
- package/src/sap/fe/core/helpers/DeleteHelper-dbg.js +93 -62
- package/src/sap/fe/core/helpers/DeleteHelper.js +1 -1
- package/src/sap/fe/core/helpers/DeleteHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/DeleteHelper.ts +140 -185
- package/src/sap/fe/core/helpers/MassEditHelper-dbg.js +23 -20
- package/src/sap/fe/core/helpers/MassEditHelper.js +1 -1
- package/src/sap/fe/core/helpers/MassEditHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/MassEditHelper.ts +26 -28
- package/src/sap/fe/core/helpers/MessageStrip-dbg.js +9 -9
- package/src/sap/fe/core/helpers/MessageStrip.js +1 -1
- package/src/sap/fe/core/helpers/MessageStrip.js.map +1 -1
- package/src/sap/fe/core/helpers/MessageStrip.ts +8 -8
- package/src/sap/fe/core/helpers/MetaModelFunction-dbg.js +517 -0
- package/src/sap/fe/core/helpers/MetaModelFunction.js +6 -0
- package/src/sap/fe/core/helpers/MetaModelFunction.js.map +1 -0
- package/src/sap/fe/core/helpers/MetaModelFunction.ts +610 -0
- package/src/sap/fe/core/helpers/ModelHelper-dbg.js +37 -73
- package/src/sap/fe/core/helpers/ModelHelper.js +1 -1
- package/src/sap/fe/core/helpers/ModelHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +47 -74
- package/src/sap/fe/core/helpers/PasteHelper-dbg.js +5 -5
- package/src/sap/fe/core/helpers/PasteHelper.js +1 -1
- package/src/sap/fe/core/helpers/PasteHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/PasteHelper.ts +6 -10
- package/src/sap/fe/core/helpers/ResourceModelHelper-dbg.js +39 -0
- package/src/sap/fe/core/helpers/ResourceModelHelper.js +6 -0
- package/src/sap/fe/core/helpers/ResourceModelHelper.js.map +1 -0
- package/src/sap/fe/core/helpers/ResourceModelHelper.ts +35 -0
- package/src/sap/fe/core/helpers/SemanticDateOperators-dbg.js +132 -23
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
- package/src/sap/fe/core/helpers/SemanticDateOperators.js.map +1 -1
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +109 -22
- package/src/sap/fe/core/helpers/SemanticKeyHelper-dbg.js +2 -2
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +1 -1
- package/src/sap/fe/core/helpers/SizeHelper-dbg.js +53 -0
- package/src/sap/fe/core/helpers/SizeHelper.js +6 -0
- package/src/sap/fe/core/helpers/SizeHelper.js.map +1 -0
- package/src/sap/fe/core/helpers/SizeHelper.ts +51 -0
- package/src/sap/fe/core/helpers/StableIdHelper-dbg.js +29 -25
- package/src/sap/fe/core/helpers/StableIdHelper.js +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.ts +26 -24
- package/src/sap/fe/core/helpers/Synchronization-dbg.js +1 -1
- package/src/sap/fe/core/helpers/Synchronization.ts +2 -0
- package/src/sap/fe/core/helpers/TypeGuards-dbg.js +151 -1
- package/src/sap/fe/core/helpers/TypeGuards.js +1 -1
- package/src/sap/fe/core/helpers/TypeGuards.js.map +1 -1
- package/src/sap/fe/core/helpers/TypeGuards.ts +162 -1
- package/src/sap/fe/core/jsx-runtime/ViewLoader-dbg.js +2 -1
- package/src/sap/fe/core/jsx-runtime/ViewLoader.js.map +1 -1
- package/src/sap/fe/core/jsx-runtime/ViewLoader.tsx +6 -2
- package/src/sap/fe/core/jsx-runtime/jsx-control-dbg.js +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx-control.ts +3 -1
- package/src/sap/fe/core/jsx-runtime/useMDXComponents-dbg.js +3 -3
- package/src/sap/fe/core/jsx-runtime/useMDXComponents.js +1 -1
- package/src/sap/fe/core/jsx-runtime/useMDXComponents.js.map +1 -1
- package/src/sap/fe/core/jsx-runtime/useMDXComponents.tsx +1 -1
- package/src/sap/fe/core/library-dbg.js +2 -2
- package/src/sap/fe/core/library-preload.js +156 -140
- package/src/sap/fe/core/library-preload.js.map +1 -1
- package/src/sap/fe/core/library.js +1 -1
- package/src/sap/fe/core/library.ts +7 -0
- package/src/sap/fe/core/manifest.json +1 -1
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration-dbg.js +67 -15
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +1 -1
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js.map +1 -1
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +66 -14
- package/src/sap/fe/core/messagebundle.properties +35 -0
- package/src/sap/fe/core/messagebundle_ar.properties +15 -12
- package/src/sap/fe/core/messagebundle_bg.properties +20 -17
- package/src/sap/fe/core/messagebundle_ca.properties +12 -9
- package/src/sap/fe/core/messagebundle_cs.properties +12 -9
- package/src/sap/fe/core/messagebundle_cy.properties +12 -9
- package/src/sap/fe/core/messagebundle_da.properties +12 -9
- package/src/sap/fe/core/messagebundle_de.properties +13 -10
- package/src/sap/fe/core/messagebundle_el.properties +14 -11
- package/src/sap/fe/core/messagebundle_en.properties +4 -1
- package/src/sap/fe/core/messagebundle_en_GB.properties +4 -1
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +21 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +23 -3
- package/src/sap/fe/core/messagebundle_es.properties +12 -9
- package/src/sap/fe/core/messagebundle_es_MX.properties +12 -9
- package/src/sap/fe/core/messagebundle_et.properties +12 -9
- package/src/sap/fe/core/messagebundle_fi.properties +12 -9
- package/src/sap/fe/core/messagebundle_fr.properties +12 -9
- package/src/sap/fe/core/messagebundle_fr_CA.properties +13 -10
- package/src/sap/fe/core/messagebundle_hi.properties +12 -9
- package/src/sap/fe/core/messagebundle_hr.properties +12 -9
- package/src/sap/fe/core/messagebundle_hu.properties +12 -9
- package/src/sap/fe/core/messagebundle_id.properties +13 -10
- package/src/sap/fe/core/messagebundle_it.properties +12 -9
- package/src/sap/fe/core/messagebundle_iw.properties +12 -9
- package/src/sap/fe/core/messagebundle_ja.properties +13 -10
- package/src/sap/fe/core/messagebundle_kk.properties +12 -9
- package/src/sap/fe/core/messagebundle_ko.properties +12 -9
- package/src/sap/fe/core/messagebundle_lt.properties +12 -9
- package/src/sap/fe/core/messagebundle_lv.properties +12 -9
- package/src/sap/fe/core/messagebundle_ms.properties +13 -10
- package/src/sap/fe/core/messagebundle_nl.properties +13 -10
- package/src/sap/fe/core/messagebundle_no.properties +12 -9
- package/src/sap/fe/core/messagebundle_pl.properties +12 -9
- package/src/sap/fe/core/messagebundle_pt.properties +12 -9
- package/src/sap/fe/core/messagebundle_pt_PT.properties +12 -9
- package/src/sap/fe/core/messagebundle_ro.properties +16 -13
- package/src/sap/fe/core/messagebundle_ru.properties +13 -10
- package/src/sap/fe/core/messagebundle_sh.properties +12 -9
- package/src/sap/fe/core/messagebundle_sk.properties +12 -9
- package/src/sap/fe/core/messagebundle_sl.properties +12 -9
- package/src/sap/fe/core/messagebundle_sv.properties +12 -9
- package/src/sap/fe/core/messagebundle_th.properties +12 -9
- package/src/sap/fe/core/messagebundle_tr.properties +12 -9
- package/src/sap/fe/core/messagebundle_uk.properties +12 -9
- package/src/sap/fe/core/messagebundle_vi.properties +13 -10
- package/src/sap/fe/core/messagebundle_zh_CN.properties +12 -9
- package/src/sap/fe/core/messagebundle_zh_TW.properties +12 -9
- package/src/sap/fe/core/operationsHelper-dbg.js +70 -44
- package/src/sap/fe/core/operationsHelper.js +1 -1
- package/src/sap/fe/core/operationsHelper.js.map +1 -1
- package/src/sap/fe/core/operationsHelper.ts +88 -63
- package/src/sap/fe/core/rootView/Fcl-dbg.controller.js +1 -1
- package/src/sap/fe/core/rootView/Fcl.controller.ts +10 -0
- package/src/sap/fe/core/rootView/NavContainer-dbg.controller.js +2 -2
- package/src/sap/fe/core/rootView/NavContainer.controller.js +1 -1
- package/src/sap/fe/core/rootView/NavContainer.controller.js.map +1 -1
- package/src/sap/fe/core/rootView/NavContainer.controller.ts +5 -3
- package/src/sap/fe/core/rootView/RootViewBaseController-dbg.js +10 -5
- package/src/sap/fe/core/rootView/RootViewBaseController.js +1 -1
- package/src/sap/fe/core/rootView/RootViewBaseController.js.map +1 -1
- package/src/sap/fe/core/rootView/RootViewBaseController.ts +22 -8
- package/src/sap/fe/core/services/AsyncComponentServiceFactory-dbg.js +1 -1
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +3 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory-dbg.js +1 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +15 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory-dbg.js +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +4 -1
- package/src/sap/fe/core/services/NavigationServiceFactory-dbg.js +9 -1
- package/src/sap/fe/core/services/NavigationServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +19 -1
- package/src/sap/fe/core/services/ResourceModelServiceFactory-dbg.js +2 -2
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +1 -1
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +10 -3
- package/src/sap/fe/core/services/RoutingServiceFactory-dbg.js +9 -3
- package/src/sap/fe/core/services/RoutingServiceFactory.js +1 -1
- package/src/sap/fe/core/services/RoutingServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +35 -3
- package/src/sap/fe/core/services/ShellServicesFactory-dbg.js +7 -1
- package/src/sap/fe/core/services/ShellServicesFactory.js +1 -1
- package/src/sap/fe/core/services/ShellServicesFactory.js.map +1 -1
- package/src/sap/fe/core/services/ShellServicesFactory.ts +24 -2
- package/src/sap/fe/core/services/SideEffectsServiceFactory-dbg.js +448 -279
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +1 -1
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +497 -333
- package/src/sap/fe/core/services/TemplatedViewServiceFactory-dbg.js +26 -6
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +1 -1
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js.map +1 -1
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +54 -13
- package/src/sap/fe/core/support/Diagnostics-dbg.js +1 -1
- package/src/sap/fe/core/support/Diagnostics.ts +5 -0
- package/src/sap/fe/core/templating/CommonFormatters-dbg.js +4 -3
- package/src/sap/fe/core/templating/CommonFormatters.js +1 -1
- package/src/sap/fe/core/templating/CommonFormatters.js.map +1 -1
- package/src/sap/fe/core/templating/CommonFormatters.ts +2 -2
- package/src/sap/fe/core/templating/DataModelPathHelper-dbg.js +195 -95
- package/src/sap/fe/core/templating/DataModelPathHelper.js +1 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.js.map +1 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +210 -96
- package/src/sap/fe/core/templating/DisplayModeFormatter-dbg.js +5 -5
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +1 -1
- package/src/sap/fe/core/templating/DisplayModeFormatter.js.map +1 -1
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +2 -2
- package/src/sap/fe/core/templating/EntitySetHelper-dbg.js +19 -29
- package/src/sap/fe/core/templating/EntitySetHelper.js +1 -1
- package/src/sap/fe/core/templating/EntitySetHelper.js.map +1 -1
- package/src/sap/fe/core/templating/EntitySetHelper.ts +14 -26
- package/src/sap/fe/core/templating/EntityTypeHelper-dbg.js +48 -0
- package/src/sap/fe/core/templating/EntityTypeHelper.js +6 -0
- package/src/sap/fe/core/templating/EntityTypeHelper.js.map +1 -0
- package/src/sap/fe/core/templating/EntityTypeHelper.ts +37 -0
- package/src/sap/fe/core/templating/FilterHelper-dbg.js +3 -3
- package/src/sap/fe/core/templating/FilterHelper.js +1 -1
- package/src/sap/fe/core/templating/FilterHelper.js.map +1 -1
- package/src/sap/fe/core/templating/FilterHelper.ts +5 -3
- package/src/sap/fe/core/templating/FilterTemplating-dbg.js +7 -8
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/FilterTemplating.js.map +1 -1
- package/src/sap/fe/core/templating/FilterTemplating.ts +5 -8
- package/src/sap/fe/core/templating/PropertyFormatters-dbg.js +1 -6
- package/src/sap/fe/core/templating/PropertyFormatters.js +1 -1
- package/src/sap/fe/core/templating/PropertyFormatters.js.map +1 -1
- package/src/sap/fe/core/templating/PropertyFormatters.ts +0 -5
- package/src/sap/fe/core/templating/PropertyHelper-dbg.js +13 -46
- package/src/sap/fe/core/templating/PropertyHelper.js +1 -1
- package/src/sap/fe/core/templating/PropertyHelper.js.map +1 -1
- package/src/sap/fe/core/templating/PropertyHelper.ts +14 -43
- package/src/sap/fe/core/templating/UIFormatters-dbg.js +32 -26
- package/src/sap/fe/core/templating/UIFormatters.js +1 -1
- package/src/sap/fe/core/templating/UIFormatters.js.map +1 -1
- package/src/sap/fe/core/templating/UIFormatters.ts +47 -32
- package/src/sap/fe/core/type/DateTimeWithTimezone-dbg.js +1 -1
- package/src/sap/fe/core/type/DateTimeWithTimezone.ts +2 -0
- package/src/sap/fe/core/type/FiscalDate-dbg.js +2 -2
- package/src/sap/fe/core/type/FiscalDate.js.map +1 -1
- package/src/sap/fe/core/type/FiscalDate.ts +2 -1
- package/src/sap/fe/core/type/TypeUtil-dbg.js +5 -10
- package/src/sap/fe/core/type/TypeUtil.js +1 -1
- package/src/sap/fe/core/type/TypeUtil.js.map +1 -1
- package/src/sap/fe/core/type/TypeUtil.ts +3 -6
- package/src/sap/fe/core/buildingBlocks/BuildingBlock-dbg.js +0 -410
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +0 -15
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js.map +0 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +0 -536
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFragment-dbg.js +0 -44
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFragment.js +0 -6
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFragment.js.map +0 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlockFragment.ts +0 -14
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime-dbg.js +0 -948
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +0 -19
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js.map +0 -1
- package/src/sap/fe/core/controllerextensions/InternalEditFlow-dbg.js +0 -711
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +0 -6
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js.map +0 -1
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +0 -863
- package/src/sap/fe/core/controls/ActionPartial.fragment.xml +0 -91
- package/src/sap/fe/core/controls/ConditionalWrapper-dbg.js +0 -151
- package/src/sap/fe/core/controls/ConditionalWrapper.js +0 -6
- package/src/sap/fe/core/controls/ConditionalWrapper.js.map +0 -1
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +0 -88
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper-dbg.js +0 -330
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +0 -6
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js.map +0 -1
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +0 -292
- package/src/sap/fe/core/controls/CustomQuickViewPage-dbg.js +0 -126
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +0 -6
- package/src/sap/fe/core/controls/CustomQuickViewPage.js.map +0 -1
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +0 -105
- package/src/sap/fe/core/controls/FieldWrapper-dbg.js +0 -194
- package/src/sap/fe/core/controls/FieldWrapper.js +0 -6
- package/src/sap/fe/core/controls/FieldWrapper.js.map +0 -1
- package/src/sap/fe/core/controls/FieldWrapper.ts +0 -121
- package/src/sap/fe/core/controls/FileWrapper-dbg.js +0 -280
- package/src/sap/fe/core/controls/FileWrapper.js +0 -6
- package/src/sap/fe/core/controls/FileWrapper.js.map +0 -1
- package/src/sap/fe/core/controls/FileWrapper.ts +0 -202
- package/src/sap/fe/core/helpers/SideEffectsHelper-dbg.js +0 -141
- package/src/sap/fe/core/helpers/SideEffectsHelper.js +0 -6
- package/src/sap/fe/core/helpers/SideEffectsHelper.js.map +0 -1
- package/src/sap/fe/core/helpers/SideEffectsHelper.ts +0 -129
|
@@ -1,33 +1,24 @@
|
|
|
1
1
|
import type * as Edm from "@sap-ux/vocabularies-types/Edm";
|
|
2
|
-
import type {
|
|
3
|
-
FilterRestrictionsType,
|
|
4
|
-
NavigationPropertyRestrictionTypes,
|
|
5
|
-
NavigationRestrictionsType,
|
|
6
|
-
SearchRestrictionsType
|
|
7
|
-
} from "@sap-ux/vocabularies-types/vocabularies/Capabilities";
|
|
2
|
+
import type { FilterRestrictionsType } from "@sap-ux/vocabularies-types/vocabularies/Capabilities";
|
|
8
3
|
import type { SemanticObjectMappingType, SemanticObjectUnavailableActions } from "@sap-ux/vocabularies-types/vocabularies/Common";
|
|
9
4
|
import { CommonAnnotationTerms } from "@sap-ux/vocabularies-types/vocabularies/Common";
|
|
10
5
|
import type { TextArrangement } from "@sap-ux/vocabularies-types/vocabularies/UI";
|
|
11
|
-
import type ResourceBundle from "sap/base/i18n/ResourceBundle";
|
|
12
6
|
import Log from "sap/base/Log";
|
|
13
7
|
import uniqueSort from "sap/base/util/array/uniqueSort";
|
|
14
8
|
import mergeObjects from "sap/base/util/merge";
|
|
15
9
|
import type AppComponent from "sap/fe/core/AppComponent";
|
|
10
|
+
import type { ComponentData } from "sap/fe/core/AppComponent";
|
|
16
11
|
import ConverterContext from "sap/fe/core/converters/ConverterContext";
|
|
17
|
-
import { IssueCategory, IssueCategoryType, IssueSeverity } from "sap/fe/core/converters/helpers/IssueManager";
|
|
18
12
|
import * as MetaModelConverter from "sap/fe/core/converters/MetaModelConverter";
|
|
19
|
-
import
|
|
20
|
-
import { compileExpression, not, or, pathInModel } from "sap/fe/core/helpers/BindingToolkit";
|
|
13
|
+
import { compileExpression, pathInModel } from "sap/fe/core/helpers/BindingToolkit";
|
|
21
14
|
import type { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
|
|
22
15
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
23
16
|
import SemanticDateOperators from "sap/fe/core/helpers/SemanticDateOperators";
|
|
24
17
|
import { generate } from "sap/fe/core/helpers/StableIdHelper";
|
|
25
18
|
import type PageController from "sap/fe/core/PageController";
|
|
26
19
|
import type { IShellServices } from "sap/fe/core/services/ShellServicesFactory";
|
|
27
|
-
import Diagnostics from "sap/fe/core/support/Diagnostics";
|
|
28
|
-
import { DefaultTypeForEdmType, isTypeFilterable } from "sap/fe/core/type/EDM";
|
|
20
|
+
import type Diagnostics from "sap/fe/core/support/Diagnostics";
|
|
29
21
|
import TypeUtil from "sap/fe/core/type/TypeUtil";
|
|
30
|
-
import metaModelUtil from "sap/fe/macros/ODataMetaModelUtil";
|
|
31
22
|
import type SelectionVariant from "sap/fe/navigation/SelectionVariant";
|
|
32
23
|
import type { SelectOption, SemanticDateConfiguration } from "sap/fe/navigation/SelectionVariant";
|
|
33
24
|
import type Button from "sap/m/Button";
|
|
@@ -35,11 +26,9 @@ import type MenuButton from "sap/m/MenuButton";
|
|
|
35
26
|
import type NavContainer from "sap/m/NavContainer";
|
|
36
27
|
import type OverflowToolbarButton from "sap/m/OverflowToolbarButton";
|
|
37
28
|
import type ManagedObject from "sap/ui/base/ManagedObject";
|
|
38
|
-
import type { AggregationBindingInfo } from "sap/ui/base/ManagedObject";
|
|
39
29
|
import Component from "sap/ui/core/Component";
|
|
40
30
|
import type ComponentContainer from "sap/ui/core/ComponentContainer";
|
|
41
31
|
import type Control from "sap/ui/core/Control";
|
|
42
|
-
import Core from "sap/ui/core/Core";
|
|
43
32
|
import type UI5Element from "sap/ui/core/Element";
|
|
44
33
|
import Fragment from "sap/ui/core/Fragment";
|
|
45
34
|
import type Controller from "sap/ui/core/mvc/Controller";
|
|
@@ -48,14 +37,15 @@ import XMLPreprocessor from "sap/ui/core/util/XMLPreprocessor";
|
|
|
48
37
|
import XMLTemplateProcessor from "sap/ui/core/XMLTemplateProcessor";
|
|
49
38
|
import Device, { system } from "sap/ui/Device";
|
|
50
39
|
import type ActionToolbarAction from "sap/ui/mdc/actiontoolbar/ActionToolbarAction";
|
|
51
|
-
import type
|
|
40
|
+
import type { default as MDCChart } from "sap/ui/mdc/Chart";
|
|
52
41
|
import type { ConditionObject } from "sap/ui/mdc/condition/Condition";
|
|
53
42
|
import FilterOperatorUtil from "sap/ui/mdc/condition/FilterOperatorUtil";
|
|
54
43
|
import RangeOperator from "sap/ui/mdc/condition/RangeOperator";
|
|
55
44
|
import type FilterBar from "sap/ui/mdc/FilterBar";
|
|
56
|
-
import type DelegateMixin from "sap/ui/mdc/mixin/DelegateMixin";
|
|
57
45
|
import type Table from "sap/ui/mdc/Table";
|
|
46
|
+
import type MDCTable from "sap/ui/mdc/valuehelp/content/MDCTable";
|
|
58
47
|
import type Context from "sap/ui/model/Context";
|
|
48
|
+
import Filter from "sap/ui/model/Filter";
|
|
59
49
|
import type JSONModel from "sap/ui/model/json/JSONModel";
|
|
60
50
|
import type ODataV4Context from "sap/ui/model/odata/v4/Context";
|
|
61
51
|
import type ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
|
|
@@ -63,29 +53,29 @@ import type ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
|
63
53
|
import type ODataModel from "sap/ui/model/odata/v4/ODataModel";
|
|
64
54
|
import type ObjectPageDynamicHeaderTitle from "sap/uxap/ObjectPageDynamicHeaderTitle";
|
|
65
55
|
import type ObjectPageLayout from "sap/uxap/ObjectPageLayout";
|
|
66
|
-
import type { V4Context } from "types/extension_types";
|
|
67
56
|
import type {
|
|
68
57
|
ExpandPathType,
|
|
69
|
-
MetaModelEntitySetAnnotation,
|
|
70
58
|
MetaModelEntityType,
|
|
71
59
|
MetaModelEnum,
|
|
72
60
|
MetaModelNavProperty,
|
|
73
61
|
MetaModelProperty,
|
|
74
62
|
MetaModelType
|
|
75
|
-
} from "
|
|
63
|
+
} from "types/metamodel_types";
|
|
76
64
|
import AnyElement from "./controls/AnyElement";
|
|
65
|
+
import * as MetaModelFunction from "./helpers/MetaModelFunction";
|
|
77
66
|
import { getConditions } from "./templating/FilterHelper";
|
|
78
67
|
|
|
79
|
-
type InternalResourceBundle = ResourceBundle & {
|
|
80
|
-
aCustomBundles: InternalResourceBundle[];
|
|
81
|
-
};
|
|
82
|
-
|
|
83
68
|
type ConditionType = {
|
|
84
69
|
operator: string;
|
|
85
70
|
values: Array<unknown> | undefined;
|
|
86
71
|
validated?: string;
|
|
87
72
|
};
|
|
88
73
|
|
|
74
|
+
type MyInboxIntent = {
|
|
75
|
+
semanticObject: string;
|
|
76
|
+
action: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
89
79
|
function normalizeSearchTerm(sSearchTerm: string) {
|
|
90
80
|
if (!sSearchTerm) {
|
|
91
81
|
return undefined;
|
|
@@ -103,47 +93,7 @@ function normalizeSearchTerm(sSearchTerm: string) {
|
|
|
103
93
|
}, undefined);
|
|
104
94
|
}
|
|
105
95
|
|
|
106
|
-
function
|
|
107
|
-
let sDataType = oNavigationContext.getProperty("$Type");
|
|
108
|
-
// if $kind exists, it's not a DataField and we have the final type already
|
|
109
|
-
if (!oNavigationContext.getProperty("$kind")) {
|
|
110
|
-
switch (sDataType) {
|
|
111
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForAction":
|
|
112
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation":
|
|
113
|
-
sDataType = undefined;
|
|
114
|
-
break;
|
|
115
|
-
|
|
116
|
-
case "com.sap.vocabularies.UI.v1.DataField":
|
|
117
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath":
|
|
118
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithUrl":
|
|
119
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation":
|
|
120
|
-
case "com.sap.vocabularies.UI.v1.DataFieldWithAction":
|
|
121
|
-
sDataType = oNavigationContext.getProperty("Value/$Path/$Type");
|
|
122
|
-
break;
|
|
123
|
-
|
|
124
|
-
case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation":
|
|
125
|
-
default:
|
|
126
|
-
const sAnnotationPath = oNavigationContext.getProperty("Target/$AnnotationPath");
|
|
127
|
-
if (sAnnotationPath) {
|
|
128
|
-
if (sAnnotationPath.indexOf("com.sap.vocabularies.Communication.v1.Contact") > -1) {
|
|
129
|
-
sDataType = oNavigationContext.getProperty("Target/$AnnotationPath/fn/$Path/$Type");
|
|
130
|
-
} else if (sAnnotationPath.indexOf("com.sap.vocabularies.UI.v1.DataPoint") > -1) {
|
|
131
|
-
sDataType = oNavigationContext.getProperty("Value/$Path/$Type");
|
|
132
|
-
} else {
|
|
133
|
-
// e.g. FieldGroup or Chart
|
|
134
|
-
sDataType = undefined;
|
|
135
|
-
}
|
|
136
|
-
} else {
|
|
137
|
-
sDataType = undefined;
|
|
138
|
-
}
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return sDataType;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
async function waitForContextRequested(bindingContext: V4Context) {
|
|
96
|
+
async function waitForContextRequested(bindingContext: ODataV4Context) {
|
|
147
97
|
const model = bindingContext.getModel();
|
|
148
98
|
const metaModel = model.getMetaModel();
|
|
149
99
|
const entityPath = metaModel.getMetaPath(bindingContext.getPath());
|
|
@@ -163,198 +113,7 @@ function fnHasTransientContexts(oListBinding: ODataListBinding) {
|
|
|
163
113
|
return bHasTransientContexts;
|
|
164
114
|
}
|
|
165
115
|
|
|
166
|
-
|
|
167
|
-
let oSearchRestrictions;
|
|
168
|
-
let oNavigationSearchRestrictions;
|
|
169
|
-
const navigationText = "$NavigationPropertyBinding";
|
|
170
|
-
const searchRestrictionsTerm = "@Org.OData.Capabilities.V1.SearchRestrictions";
|
|
171
|
-
const entityTypePathParts = sFullPath.replaceAll("%2F", "/").split("/").filter(ModelHelper.filterOutNavPropBinding);
|
|
172
|
-
const entitySetPath = ModelHelper.getEntitySetPath(sFullPath, oMetaModelContext);
|
|
173
|
-
const entitySetPathParts = entitySetPath.split("/").filter(ModelHelper.filterOutNavPropBinding);
|
|
174
|
-
const isContainment = oMetaModelContext.getObject(`/${entityTypePathParts.join("/")}/$ContainsTarget`);
|
|
175
|
-
const containmentNavPath = isContainment && entityTypePathParts[entityTypePathParts.length - 1];
|
|
176
|
-
|
|
177
|
-
//LEAST PRIORITY - Search restrictions directly at Entity Set
|
|
178
|
-
//e.g. FR in "NS.EntityContainer/SalesOrderManage" ContextPath: /SalesOrderManage
|
|
179
|
-
if (!isContainment) {
|
|
180
|
-
oSearchRestrictions = oMetaModelContext.getObject(`${entitySetPath}${searchRestrictionsTerm}`) as
|
|
181
|
-
| MetaModelType<SearchRestrictionsType>
|
|
182
|
-
| undefined;
|
|
183
|
-
}
|
|
184
|
-
if (entityTypePathParts.length > 1) {
|
|
185
|
-
const navPath = isContainment ? containmentNavPath : entitySetPathParts[entitySetPathParts.length - 1];
|
|
186
|
-
// In case of containment we take entitySet provided as parent. And in case of normal we would remove the last navigation from entitySetPath.
|
|
187
|
-
const parentEntitySetPath = isContainment ? entitySetPath : `/${entitySetPathParts.slice(0, -1).join(`/${navigationText}/`)}`;
|
|
188
|
-
|
|
189
|
-
//HIGHEST priority - Navigation restrictions
|
|
190
|
-
//e.g. Parent "/Customer" with NavigationPropertyPath="Set" ContextPath: Customer/Set
|
|
191
|
-
const oNavigationRestrictions = CommonUtils.getNavigationRestrictions(
|
|
192
|
-
oMetaModelContext,
|
|
193
|
-
parentEntitySetPath,
|
|
194
|
-
navPath.replaceAll("%2F", "/")
|
|
195
|
-
);
|
|
196
|
-
oNavigationSearchRestrictions = oNavigationRestrictions && oNavigationRestrictions["SearchRestrictions"];
|
|
197
|
-
}
|
|
198
|
-
return oNavigationSearchRestrictions || oSearchRestrictions;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function getNavigationRestrictions(oMetaModelContext: ODataMetaModel, sEntitySetPath: string, sNavigationPath: string) {
|
|
202
|
-
const oNavigationRestrictions = oMetaModelContext.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.NavigationRestrictions`) as
|
|
203
|
-
| MetaModelType<NavigationRestrictionsType>
|
|
204
|
-
| undefined;
|
|
205
|
-
const aRestrictedProperties = oNavigationRestrictions && oNavigationRestrictions.RestrictedProperties;
|
|
206
|
-
return (
|
|
207
|
-
aRestrictedProperties &&
|
|
208
|
-
aRestrictedProperties.find(function (oRestrictedProperty) {
|
|
209
|
-
return (
|
|
210
|
-
oRestrictedProperty &&
|
|
211
|
-
oRestrictedProperty.NavigationProperty &&
|
|
212
|
-
oRestrictedProperty.NavigationProperty.$NavigationPropertyPath === sNavigationPath
|
|
213
|
-
);
|
|
214
|
-
})
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function _isInNonFilterableProperties(metamodelContext: ODataMetaModel, sEntitySetPath: string, sContextPath: string) {
|
|
219
|
-
let bIsNotFilterable = false;
|
|
220
|
-
const oAnnotation = metamodelContext.getObject(`${sEntitySetPath}@Org.OData.Capabilities.V1.FilterRestrictions`) as
|
|
221
|
-
| MetaModelType<FilterRestrictionsType>
|
|
222
|
-
| undefined;
|
|
223
|
-
if (oAnnotation && oAnnotation.NonFilterableProperties) {
|
|
224
|
-
bIsNotFilterable = oAnnotation.NonFilterableProperties.some(function (property) {
|
|
225
|
-
return (
|
|
226
|
-
(property as unknown as ExpandPathType<Edm.NavigationPropertyPath>).$NavigationPropertyPath === sContextPath ||
|
|
227
|
-
property.$PropertyPath === sContextPath
|
|
228
|
-
);
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
return bIsNotFilterable;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function _isCustomAggregate(metamodelContext: ODataMetaModel, sEntitySetPath: string, sContextPath: string) {
|
|
235
|
-
let bCustomAggregate = false;
|
|
236
|
-
const bApplySupported = metamodelContext?.getObject(sEntitySetPath + "@Org.OData.Aggregation.V1.ApplySupported") ? true : false;
|
|
237
|
-
if (bApplySupported) {
|
|
238
|
-
const oAnnotations = metamodelContext.getObject(`${sEntitySetPath}@`);
|
|
239
|
-
const oCustomAggreggates = metaModelUtil.getAllCustomAggregates(oAnnotations);
|
|
240
|
-
const aCustomAggregates = oCustomAggreggates ? Object.keys(oCustomAggreggates) : undefined;
|
|
241
|
-
if (aCustomAggregates && aCustomAggregates?.indexOf(sContextPath) > -1) {
|
|
242
|
-
bCustomAggregate = true;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
return bCustomAggregate;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// TODO rework this!
|
|
249
|
-
function _isContextPathFilterable(oModelContext: ODataMetaModel, sEntitySetPath: string, sContexPath: string) {
|
|
250
|
-
const sFullPath = `${sEntitySetPath}/${sContexPath}`,
|
|
251
|
-
aESParts = sFullPath.split("/").splice(0, 2),
|
|
252
|
-
aContext = sFullPath.split("/").splice(2);
|
|
253
|
-
let bIsNotFilterable = false,
|
|
254
|
-
sContext = "";
|
|
255
|
-
|
|
256
|
-
sEntitySetPath = aESParts.join("/");
|
|
257
|
-
|
|
258
|
-
bIsNotFilterable = aContext.some(function (item: string, index: number, array: string[]) {
|
|
259
|
-
if (sContext.length > 0) {
|
|
260
|
-
sContext += `/${item}`;
|
|
261
|
-
} else {
|
|
262
|
-
sContext = item;
|
|
263
|
-
}
|
|
264
|
-
if (index === array.length - 2) {
|
|
265
|
-
// In case of "/Customer/Set/Property" this is to check navigation restrictions of "Customer" for non-filterable properties in "Set"
|
|
266
|
-
const oNavigationRestrictions = getNavigationRestrictions(oModelContext, sEntitySetPath, item);
|
|
267
|
-
const oFilterRestrictions = oNavigationRestrictions && oNavigationRestrictions.FilterRestrictions;
|
|
268
|
-
const aNonFilterableProperties = oFilterRestrictions && oFilterRestrictions.NonFilterableProperties;
|
|
269
|
-
const sTargetPropertyPath = array[array.length - 1];
|
|
270
|
-
if (
|
|
271
|
-
aNonFilterableProperties &&
|
|
272
|
-
aNonFilterableProperties.find(function (oPropertyPath) {
|
|
273
|
-
return oPropertyPath.$PropertyPath === sTargetPropertyPath;
|
|
274
|
-
})
|
|
275
|
-
) {
|
|
276
|
-
return true;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
if (index === array.length - 1) {
|
|
280
|
-
//last path segment
|
|
281
|
-
bIsNotFilterable = _isInNonFilterableProperties(oModelContext, sEntitySetPath, sContext);
|
|
282
|
-
} else if (oModelContext.getObject(`${sEntitySetPath}/$NavigationPropertyBinding/${item}`)) {
|
|
283
|
-
//check existing context path and initialize it
|
|
284
|
-
bIsNotFilterable = _isInNonFilterableProperties(oModelContext, sEntitySetPath, sContext);
|
|
285
|
-
sContext = "";
|
|
286
|
-
//set the new EntitySet
|
|
287
|
-
sEntitySetPath = `/${oModelContext.getObject(`${sEntitySetPath}/$NavigationPropertyBinding/${item}`)}`;
|
|
288
|
-
}
|
|
289
|
-
return bIsNotFilterable === true;
|
|
290
|
-
});
|
|
291
|
-
return bIsNotFilterable;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// TODO check used places and rework this
|
|
295
|
-
function isPropertyFilterable(
|
|
296
|
-
metaModelContext: ODataMetaModel,
|
|
297
|
-
sEntitySetPath: string,
|
|
298
|
-
sProperty: string,
|
|
299
|
-
bSkipHiddenFilter?: boolean
|
|
300
|
-
): boolean | CompiledBindingToolkitExpression {
|
|
301
|
-
if (typeof sProperty !== "string") {
|
|
302
|
-
throw new Error("sProperty parameter must be a string");
|
|
303
|
-
}
|
|
304
|
-
let bIsFilterable;
|
|
305
|
-
|
|
306
|
-
// Parameters should be rendered as filterfields
|
|
307
|
-
if (metaModelContext.getObject(`${sEntitySetPath}/@com.sap.vocabularies.Common.v1.ResultContext`)?.valueOf() === true) {
|
|
308
|
-
return true;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
const oNavigationContext = metaModelContext.createBindingContext(`${sEntitySetPath}/${sProperty}`) as Context;
|
|
312
|
-
|
|
313
|
-
if (!bSkipHiddenFilter) {
|
|
314
|
-
if (
|
|
315
|
-
oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.Hidden") === true ||
|
|
316
|
-
oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.HiddenFilter") === true
|
|
317
|
-
) {
|
|
318
|
-
return false;
|
|
319
|
-
}
|
|
320
|
-
const sHiddenPath = oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.Hidden/$Path");
|
|
321
|
-
const sHiddenFilterPath = oNavigationContext.getProperty("@com.sap.vocabularies.UI.v1.HiddenFilter/$Path");
|
|
322
|
-
|
|
323
|
-
if (sHiddenPath && sHiddenFilterPath) {
|
|
324
|
-
return compileExpression(not(or(pathInModel(sHiddenPath), pathInModel(sHiddenFilterPath))));
|
|
325
|
-
} else if (sHiddenPath) {
|
|
326
|
-
return compileExpression(not(pathInModel(sHiddenPath)));
|
|
327
|
-
} else if (sHiddenFilterPath) {
|
|
328
|
-
return compileExpression(not(pathInModel(sHiddenFilterPath)));
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
// there is no navigation in entitySet path and property path
|
|
333
|
-
bIsFilterable =
|
|
334
|
-
sEntitySetPath.split("/").length === 2 && sProperty.indexOf("/") < 0
|
|
335
|
-
? !_isInNonFilterableProperties(metaModelContext, sEntitySetPath, sProperty) &&
|
|
336
|
-
!_isCustomAggregate(metaModelContext, sEntitySetPath, sProperty)
|
|
337
|
-
: !_isContextPathFilterable(metaModelContext, sEntitySetPath, sProperty);
|
|
338
|
-
// check if type can be used for filtering
|
|
339
|
-
if (bIsFilterable && oNavigationContext) {
|
|
340
|
-
const sPropertyDataType = getPropertyDataType(oNavigationContext);
|
|
341
|
-
if (sPropertyDataType) {
|
|
342
|
-
bIsFilterable = sPropertyDataType ? isTypeFilterable(sPropertyDataType as keyof typeof DefaultTypeForEdmType) : false;
|
|
343
|
-
} else {
|
|
344
|
-
bIsFilterable = false;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return bIsFilterable;
|
|
349
|
-
}
|
|
350
|
-
function getShellServices(oControl: Control | Component): IShellServices {
|
|
351
|
-
return getAppComponent(oControl).getShellServices();
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
function getHash(): string {
|
|
355
|
-
const sHash = window.location.hash;
|
|
356
|
-
return sHash.split("&")[0];
|
|
357
|
-
}
|
|
116
|
+
// there is no navigation in entitySet path and property path
|
|
358
117
|
|
|
359
118
|
async function _getSOIntents(
|
|
360
119
|
oShellServiceHelper: IShellServices,
|
|
@@ -454,6 +213,29 @@ function _getRelatedIntents(
|
|
|
454
213
|
}
|
|
455
214
|
}
|
|
456
215
|
|
|
216
|
+
/**
|
|
217
|
+
* @description This function fetches the related intents when semantic object and action are passed from feEnvironment.getIntent() only in case of My Inbox integration
|
|
218
|
+
* @param semanticObjectAndAction This specifies the semantic object and action for fetching the intents
|
|
219
|
+
* @param oBindingContext This sepcifies the binding context for updating related apps
|
|
220
|
+
* @param appComponentSOItems This is a list of semantic items used for updating the related apps button
|
|
221
|
+
* @param aLinks This is an array comprising of related intents
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
function _getRelatedIntentsWithSemanticObjectsAndAction(
|
|
225
|
+
semanticObjectAndAction: MyInboxIntent,
|
|
226
|
+
oBindingContext: Context,
|
|
227
|
+
appComponentSOItems: SemanticItem[],
|
|
228
|
+
aLinks: LinkDefinition[]
|
|
229
|
+
) {
|
|
230
|
+
if (aLinks.length > 0) {
|
|
231
|
+
const actions = [semanticObjectAndAction.action];
|
|
232
|
+
const excludedActions: [] = [];
|
|
233
|
+
const soMappings: [] = [];
|
|
234
|
+
const targetParams = { navigationContexts: oBindingContext, semanticObjectMapping: soMappings };
|
|
235
|
+
_getRelatedAppsMenuItems(aLinks, excludedActions, targetParams, appComponentSOItems, actions);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
457
239
|
type SemanticObjectConfig = {
|
|
458
240
|
additionalSemanticObjects: Record<string, SemanticObject>;
|
|
459
241
|
};
|
|
@@ -468,9 +250,10 @@ async function updateRelateAppsModel(
|
|
|
468
250
|
oObjectPageLayout: ObjectPageLayout,
|
|
469
251
|
aSemKeys: { $PropertyPath: string }[],
|
|
470
252
|
oMetaModel: ODataMetaModel,
|
|
471
|
-
oMetaPath: string
|
|
253
|
+
oMetaPath: string,
|
|
254
|
+
appComponent: AppComponent
|
|
472
255
|
): Promise<RelatedAppsConfig[]> {
|
|
473
|
-
const oShellServiceHelper: IShellServices = getShellServices(
|
|
256
|
+
const oShellServiceHelper: IShellServices = appComponent.getShellServices();
|
|
474
257
|
const oParam: Record<string, unknown> = {};
|
|
475
258
|
let sCurrentSemObj = "",
|
|
476
259
|
sCurrentAction = "";
|
|
@@ -525,6 +308,21 @@ async function updateRelateAppsModel(
|
|
|
525
308
|
);
|
|
526
309
|
}
|
|
527
310
|
}
|
|
311
|
+
|
|
312
|
+
// appComponentSOItems is updated in case of My Inbox integration when semantic object and action are passed from feEnvironment.getIntent() method
|
|
313
|
+
// In other cases it remains as an empty list
|
|
314
|
+
// We concat this list towards the end with aManifestSOItems
|
|
315
|
+
|
|
316
|
+
const appComponentSOItems: SemanticItem[] = [];
|
|
317
|
+
const componentData: ComponentData = appComponent.getComponentData();
|
|
318
|
+
if (componentData.feEnvironment && componentData.feEnvironment.getIntent()) {
|
|
319
|
+
const intent: MyInboxIntent = componentData.feEnvironment.getIntent();
|
|
320
|
+
semanticObjectIntents = await Promise.resolve(
|
|
321
|
+
_getSOIntents(oShellServiceHelper, oObjectPageLayout, intent.semanticObject, oParam)
|
|
322
|
+
);
|
|
323
|
+
_getRelatedIntentsWithSemanticObjectsAndAction(intent, oBindingContext, appComponentSOItems, semanticObjectIntents);
|
|
324
|
+
}
|
|
325
|
+
|
|
528
326
|
const internalModelContext = oObjectPageLayout.getBindingContext("internal") as InternalModelContext;
|
|
529
327
|
const aLinks = await fnGetParseShellHashAndGetLinks();
|
|
530
328
|
if (aLinks) {
|
|
@@ -551,7 +349,7 @@ async function updateRelateAppsModel(
|
|
|
551
349
|
_getRelatedAppsMenuItems(aLinks, aExcludedActions, oTargetParams, aAnnotationsSOItems);
|
|
552
350
|
|
|
553
351
|
aManifestSOItems.forEach(function ({ targetSemObject }) {
|
|
554
|
-
if (aAnnotationsSOItems[0]
|
|
352
|
+
if (aAnnotationsSOItems[0]?.targetSemObject === targetSemObject) {
|
|
555
353
|
isSemanticObjectHasSameTargetInManifest = true;
|
|
556
354
|
}
|
|
557
355
|
});
|
|
@@ -559,15 +357,14 @@ async function updateRelateAppsModel(
|
|
|
559
357
|
// remove all actions from current hash application if manifest contains empty allowedActions
|
|
560
358
|
if (
|
|
561
359
|
oManifestData.additionalSemanticObjects &&
|
|
360
|
+
aAnnotationsSOItems[0] &&
|
|
562
361
|
oManifestData.additionalSemanticObjects[aAnnotationsSOItems[0].targetSemObject] &&
|
|
563
|
-
oManifestData.additionalSemanticObjects[aAnnotationsSOItems[0].targetSemObject].allowedActions
|
|
362
|
+
!!oManifestData.additionalSemanticObjects[aAnnotationsSOItems[0].targetSemObject].allowedActions
|
|
564
363
|
) {
|
|
565
364
|
isSemanticObjectHasSameTargetInManifest = true;
|
|
566
365
|
}
|
|
567
|
-
|
|
568
|
-
aRelatedAppsMenuItems = isSemanticObjectHasSameTargetInManifest
|
|
569
|
-
? aManifestSOItems
|
|
570
|
-
: aManifestSOItems.concat(aAnnotationsSOItems);
|
|
366
|
+
const soItems = aManifestSOItems.concat(appComponentSOItems);
|
|
367
|
+
aRelatedAppsMenuItems = isSemanticObjectHasSameTargetInManifest ? soItems : soItems.concat(aAnnotationsSOItems);
|
|
571
368
|
// If no app in list, related apps button will be hidden
|
|
572
369
|
internalModelContext.setProperty("relatedApps/visibility", aRelatedAppsMenuItems.length > 0);
|
|
573
370
|
internalModelContext.setProperty("relatedApps/items", aRelatedAppsMenuItems);
|
|
@@ -621,9 +418,9 @@ function _getSemanticObjectAnnotations(oEntityAnnotations: Record<string, unknow
|
|
|
621
418
|
return oSemanticObjectAnnotations;
|
|
622
419
|
}
|
|
623
420
|
|
|
624
|
-
function fnUpdateRelatedAppsDetails(oObjectPageLayout: ObjectPageLayout) {
|
|
421
|
+
function fnUpdateRelatedAppsDetails(oObjectPageLayout: ObjectPageLayout, appComponent: AppComponent) {
|
|
625
422
|
const oMetaModel = oObjectPageLayout.getModel().getMetaModel() as ODataMetaModel;
|
|
626
|
-
const oBindingContext = oObjectPageLayout.getBindingContext() as
|
|
423
|
+
const oBindingContext = oObjectPageLayout.getBindingContext() as ODataV4Context;
|
|
627
424
|
const path = (oBindingContext && oBindingContext.getPath()) || "";
|
|
628
425
|
const oMetaPath = oMetaModel.getMetaPath(path);
|
|
629
426
|
// Semantic Key Vocabulary
|
|
@@ -636,13 +433,21 @@ function fnUpdateRelatedAppsDetails(oObjectPageLayout: ObjectPageLayout) {
|
|
|
636
433
|
oBindingContext
|
|
637
434
|
.requestObject()
|
|
638
435
|
.then(async function (requestedObject: Record<string, unknown> | undefined) {
|
|
639
|
-
return updateRelateAppsModel(
|
|
436
|
+
return CommonUtils.updateRelateAppsModel(
|
|
437
|
+
oBindingContext,
|
|
438
|
+
requestedObject,
|
|
439
|
+
oObjectPageLayout,
|
|
440
|
+
aSemKeys,
|
|
441
|
+
oMetaModel,
|
|
442
|
+
oMetaPath,
|
|
443
|
+
appComponent
|
|
444
|
+
);
|
|
640
445
|
})
|
|
641
446
|
.catch(function (oError: unknown) {
|
|
642
447
|
Log.error("Cannot update the related app details", oError as string);
|
|
643
448
|
});
|
|
644
449
|
} else {
|
|
645
|
-
return updateRelateAppsModel(oBindingContext, oEntry, oObjectPageLayout, aSemKeys, oMetaModel, oMetaPath);
|
|
450
|
+
return CommonUtils.updateRelateAppsModel(oBindingContext, oEntry, oObjectPageLayout, aSemKeys, oMetaModel, oMetaPath, appComponent);
|
|
646
451
|
}
|
|
647
452
|
}
|
|
648
453
|
|
|
@@ -660,14 +465,6 @@ function fnFireButtonPress(oButton: Control) {
|
|
|
660
465
|
}
|
|
661
466
|
}
|
|
662
467
|
|
|
663
|
-
function fnResolveStringtoBoolean(sValue: string | boolean) {
|
|
664
|
-
if (sValue === "true" || sValue === true) {
|
|
665
|
-
return true;
|
|
666
|
-
} else {
|
|
667
|
-
return false;
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
468
|
function getAppComponent(oControl: Control | Component): AppComponent {
|
|
672
469
|
if (oControl.isA<AppComponent>("sap.fe.core.AppComponent")) {
|
|
673
470
|
return oControl;
|
|
@@ -698,69 +495,6 @@ function getTargetView(oControl: ManagedObject | null): View {
|
|
|
698
495
|
return oControl!;
|
|
699
496
|
}
|
|
700
497
|
|
|
701
|
-
function isFieldControlPathInapplicable(sFieldControlPath: string, oAttribute: Record<string, unknown>) {
|
|
702
|
-
let bInapplicable = false;
|
|
703
|
-
const aParts = sFieldControlPath.split("/");
|
|
704
|
-
// sensitive data is removed only if the path has already been resolved.
|
|
705
|
-
if (aParts.length > 1) {
|
|
706
|
-
bInapplicable =
|
|
707
|
-
oAttribute[aParts[0]] !== undefined &&
|
|
708
|
-
(oAttribute[aParts[0]] as Record<string, unknown>).hasOwnProperty(aParts[1]) &&
|
|
709
|
-
(oAttribute[aParts[0]] as Record<string, unknown>)[aParts[1]] === 0;
|
|
710
|
-
} else {
|
|
711
|
-
bInapplicable = oAttribute[sFieldControlPath] === 0;
|
|
712
|
-
}
|
|
713
|
-
return bInapplicable;
|
|
714
|
-
}
|
|
715
|
-
type UnknownODataObject = {
|
|
716
|
-
entitySet?: string;
|
|
717
|
-
contextData: {
|
|
718
|
-
"@odata.context"?: string;
|
|
719
|
-
"%40odata.context"?: string;
|
|
720
|
-
"@odata.metadataEtag"?: string;
|
|
721
|
-
"%40odata.metadataEtag"?: string;
|
|
722
|
-
SAP__Messages?: string;
|
|
723
|
-
[S: string]: string | undefined;
|
|
724
|
-
};
|
|
725
|
-
};
|
|
726
|
-
function removeSensitiveData(aAttributes: UnknownODataObject[], oMetaModel: ODataMetaModel) {
|
|
727
|
-
const aOutAttributes = [];
|
|
728
|
-
for (let i = 0; i < aAttributes.length; i++) {
|
|
729
|
-
const sEntitySet = aAttributes[i].entitySet,
|
|
730
|
-
oAttribute = aAttributes[i].contextData;
|
|
731
|
-
|
|
732
|
-
delete oAttribute["@odata.context"];
|
|
733
|
-
delete oAttribute["%40odata.context"];
|
|
734
|
-
delete oAttribute["@odata.metadataEtag"];
|
|
735
|
-
delete oAttribute["%40odata.metadataEtag"];
|
|
736
|
-
delete oAttribute["SAP__Messages"];
|
|
737
|
-
const aProperties = Object.keys(oAttribute);
|
|
738
|
-
for (let j = 0; j < aProperties.length; j++) {
|
|
739
|
-
const sProp = aProperties[j],
|
|
740
|
-
aPropertyAnnotations = oMetaModel.getObject(`/${sEntitySet}/${sProp}@`);
|
|
741
|
-
if (aPropertyAnnotations) {
|
|
742
|
-
if (
|
|
743
|
-
aPropertyAnnotations["@com.sap.vocabularies.PersonalData.v1.IsPotentiallySensitive"] ||
|
|
744
|
-
aPropertyAnnotations["@com.sap.vocabularies.UI.v1.ExcludeFromNavigationContext"] ||
|
|
745
|
-
aPropertyAnnotations["@com.sap.vocabularies.Analytics.v1.Measure"]
|
|
746
|
-
) {
|
|
747
|
-
delete oAttribute[sProp];
|
|
748
|
-
} else if (aPropertyAnnotations["@com.sap.vocabularies.Common.v1.FieldControl"]) {
|
|
749
|
-
const oFieldControl = aPropertyAnnotations["@com.sap.vocabularies.Common.v1.FieldControl"];
|
|
750
|
-
if (oFieldControl["$EnumMember"] && oFieldControl["$EnumMember"].split("/")[1] === "Inapplicable") {
|
|
751
|
-
delete oAttribute[sProp];
|
|
752
|
-
} else if (oFieldControl["$Path"] && CommonUtils.isFieldControlPathInapplicable(oFieldControl["$Path"], oAttribute)) {
|
|
753
|
-
delete oAttribute[sProp];
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
aOutAttributes.push(oAttribute);
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
return aOutAttributes;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
498
|
function _fnCheckIsMatch(oObject: object, oKeysToCheck: Record<string, unknown>) {
|
|
765
499
|
for (const sKey in oKeysToCheck) {
|
|
766
500
|
if (oKeysToCheck[sKey] !== oObject[sKey as keyof typeof oObject]) {
|
|
@@ -830,6 +564,7 @@ function fnGetIBNActions(oControl: Table | ObjectPageDynamicHeaderTitle, aIBNAct
|
|
|
830
564
|
*/
|
|
831
565
|
function fnUpdateDataFieldForIBNButtonsVisibility(aIBNActions: Control[], oView: View) {
|
|
832
566
|
const oParams: Record<string, { value: unknown }> = {};
|
|
567
|
+
const oAppComponent = CommonUtils.getAppComponent(oView);
|
|
833
568
|
const isSticky = ModelHelper.isStickySessionSupported((oView.getModel() as ODataModel).getMetaModel());
|
|
834
569
|
const fnGetLinks = function (oData?: Record<string, unknown> | undefined) {
|
|
835
570
|
if (oData) {
|
|
@@ -844,7 +579,8 @@ function fnUpdateDataFieldForIBNButtonsVisibility(aIBNActions: Control[], oView:
|
|
|
844
579
|
aIBNActions.forEach(function (oIBNAction) {
|
|
845
580
|
const sSemanticObject = oIBNAction.data("IBNData").semanticObject;
|
|
846
581
|
const sAction = oIBNAction.data("IBNData").action;
|
|
847
|
-
|
|
582
|
+
oAppComponent
|
|
583
|
+
.getShellServices()
|
|
848
584
|
.getLinks({
|
|
849
585
|
semanticObject: sSemanticObject,
|
|
850
586
|
action: sAction,
|
|
@@ -860,6 +596,7 @@ function fnUpdateDataFieldForIBNButtonsVisibility(aIBNActions: Control[], oView:
|
|
|
860
596
|
}
|
|
861
597
|
);
|
|
862
598
|
}
|
|
599
|
+
return;
|
|
863
600
|
})
|
|
864
601
|
.catch(function (oError: unknown) {
|
|
865
602
|
Log.error("Cannot retrieve the links from the shell service", oError as string);
|
|
@@ -881,49 +618,8 @@ function fnUpdateDataFieldForIBNButtonsVisibility(aIBNActions: Control[], oView:
|
|
|
881
618
|
}
|
|
882
619
|
}
|
|
883
620
|
|
|
884
|
-
function
|
|
885
|
-
|
|
886
|
-
if (oResourceBundle) {
|
|
887
|
-
if (sEntitySetName) {
|
|
888
|
-
// There are console errors logged when making calls to getText for keys that are not defined in the resource bundle
|
|
889
|
-
// for instance keys which are supposed to be provided by the application, e.g, <key>|<entitySet> to override instance specific text
|
|
890
|
-
// hence check if text exists (using "hasText") in the resource bundle before calling "getText"
|
|
891
|
-
|
|
892
|
-
// "hasText" only checks for the key in the immediate resource bundle and not it's custom bundles
|
|
893
|
-
// hence we need to do this recurrsively to check if the key exists in any of the bundles the forms the FE resource bundle
|
|
894
|
-
const bResourceKeyExists = checkIfResourceKeyExists(
|
|
895
|
-
(oResourceBundle as InternalResourceBundle).aCustomBundles,
|
|
896
|
-
`${sFrameworkKey}|${sEntitySetName}`
|
|
897
|
-
);
|
|
898
|
-
|
|
899
|
-
// if resource key with entity set name for instance specific text overriding is provided by the application
|
|
900
|
-
// then use the same key otherwise use the Framework key
|
|
901
|
-
sResourceKey = bResourceKeyExists ? `${sFrameworkKey}|${sEntitySetName}` : sFrameworkKey;
|
|
902
|
-
}
|
|
903
|
-
return oResourceBundle.getText(sResourceKey, parameters);
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
// do not allow override so get text from the internal bundle directly
|
|
907
|
-
oResourceBundle = Core.getLibraryResourceBundle("sap.fe.core");
|
|
908
|
-
return oResourceBundle.getText(sResourceKey, parameters);
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
function checkIfResourceKeyExists(aCustomBundles: InternalResourceBundle[], sKey: string) {
|
|
912
|
-
if (aCustomBundles.length) {
|
|
913
|
-
for (let i = aCustomBundles.length - 1; i >= 0; i--) {
|
|
914
|
-
const sValue = aCustomBundles[i].hasText(sKey);
|
|
915
|
-
// text found return true
|
|
916
|
-
if (sValue) {
|
|
917
|
-
return true;
|
|
918
|
-
}
|
|
919
|
-
checkIfResourceKeyExists(aCustomBundles[i].aCustomBundles, sKey);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
return false;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
function getActionPath(actionContext: Context, bReturnOnlyPath: boolean, sActionName?: string, bCheckStaticValue?: boolean) {
|
|
926
|
-
sActionName = !sActionName ? actionContext.getObject(actionContext.getPath()).toString() : sActionName;
|
|
621
|
+
function getActionPath(actionContext: Context, bReturnOnlyPath: boolean, inActionName?: string, bCheckStaticValue?: boolean) {
|
|
622
|
+
const sActionName: string = !inActionName ? actionContext.getObject(actionContext.getPath()).toString() : inActionName;
|
|
927
623
|
let sContextPath = actionContext.getPath().split("/@")[0];
|
|
928
624
|
const sEntityTypeName = (actionContext.getObject(sContextPath) as MetaModelEntityType).$Type;
|
|
929
625
|
const sEntityName = getEntitySetName(actionContext.getModel() as ODataMetaModel, sEntityTypeName);
|
|
@@ -1010,7 +706,7 @@ export type _RequestedProperty = {
|
|
|
1010
706
|
sDynamicActionEnabledPath: string;
|
|
1011
707
|
};
|
|
1012
708
|
async function requestProperty(
|
|
1013
|
-
oSelectedContext:
|
|
709
|
+
oSelectedContext: ODataV4Context,
|
|
1014
710
|
sAction: string,
|
|
1015
711
|
sProperty: string,
|
|
1016
712
|
sDynamicActionEnabledPath: string
|
|
@@ -1020,13 +716,13 @@ async function requestProperty(
|
|
|
1020
716
|
? requestSingletonProperty(sProperty, oSelectedContext.getModel())
|
|
1021
717
|
: _requestObject(sAction, oSelectedContext, sProperty);
|
|
1022
718
|
|
|
1023
|
-
return oPromise.then(
|
|
1024
|
-
return
|
|
719
|
+
return oPromise.then(function (vPropertyValue: unknown) {
|
|
720
|
+
return {
|
|
1025
721
|
vPropertyValue: vPropertyValue,
|
|
1026
722
|
oSelectedContext: oSelectedContext,
|
|
1027
723
|
sAction: sAction,
|
|
1028
724
|
sDynamicActionEnabledPath: sDynamicActionEnabledPath
|
|
1029
|
-
}
|
|
725
|
+
};
|
|
1030
726
|
});
|
|
1031
727
|
}
|
|
1032
728
|
|
|
@@ -1051,6 +747,7 @@ async function setContextsBasedOnOperationAvailable(
|
|
|
1051
747
|
});
|
|
1052
748
|
setDynamicActionContexts(oInternalModelContext, aResults[0].sAction, aApplicableContexts, aNotApplicableContexts);
|
|
1053
749
|
}
|
|
750
|
+
return;
|
|
1054
751
|
})
|
|
1055
752
|
.catch(function (oError: unknown) {
|
|
1056
753
|
Log.trace("Cannot retrieve property value from path", oError as string);
|
|
@@ -1140,7 +837,6 @@ export function getOperatorsForProperty(
|
|
|
1140
837
|
"FIRSTDAYYEAR",
|
|
1141
838
|
"LASTDAYYEAR"
|
|
1142
839
|
];
|
|
1143
|
-
const aBasicDateTimeOps = ["EQ", "BT"];
|
|
1144
840
|
const aMultiRangeOps = ["EQ", "GE", "LE", "LT", "GT", "BT", "NE", "NOTBT", "NOTLE", "NOTLT", "NOTGE", "NOTGT"];
|
|
1145
841
|
const aSearchExpressionOps = ["Contains", "NotContains", "StartsWith", "NotStartsWith", "EndsWith", "NotEndsWith"];
|
|
1146
842
|
const aSemanticDateOpsExt = SemanticDateOperators.getSupportedOperations();
|
|
@@ -1153,9 +849,9 @@ export function getOperatorsForProperty(
|
|
|
1153
849
|
}
|
|
1154
850
|
|
|
1155
851
|
if (oSettings && oSettings.operatorConfiguration && oSettings.operatorConfiguration.length > 0) {
|
|
1156
|
-
aSemanticDateOps = SemanticDateOperators.getFilterOperations(oSettings.operatorConfiguration);
|
|
852
|
+
aSemanticDateOps = SemanticDateOperators.getFilterOperations(oSettings.operatorConfiguration, sType);
|
|
1157
853
|
} else {
|
|
1158
|
-
aSemanticDateOps = SemanticDateOperators.getSemanticDateOperations();
|
|
854
|
+
aSemanticDateOps = SemanticDateOperators.getSemanticDateOperations(sType);
|
|
1159
855
|
}
|
|
1160
856
|
// Get the default Operators for this Property Type
|
|
1161
857
|
let aDefaultOperators = _getDefaultOperators(sType);
|
|
@@ -1186,7 +882,7 @@ export function getOperatorsForProperty(
|
|
|
1186
882
|
if (sType === "Edm.Date") {
|
|
1187
883
|
aExpressionOps = aSemanticDateOps;
|
|
1188
884
|
} else if (sType === "Edm.DateTimeOffset") {
|
|
1189
|
-
aExpressionOps = aSemanticDateOps
|
|
885
|
+
aExpressionOps = aSemanticDateOps;
|
|
1190
886
|
} else {
|
|
1191
887
|
aExpressionOps = aSingleRangeOps;
|
|
1192
888
|
}
|
|
@@ -1331,7 +1027,7 @@ function addSelectOptionsToConditions(
|
|
|
1331
1027
|
aValidOperators: string[],
|
|
1332
1028
|
aSemanticDateOperators: string[] = [];
|
|
1333
1029
|
|
|
1334
|
-
if (isParameter ||
|
|
1030
|
+
if (isParameter || MetaModelFunction.isPropertyFilterable(metaModelContext, sContextPath, sConditionProp, true)) {
|
|
1335
1031
|
const oPropertyMetadata = oValidProperties[sConditionProp];
|
|
1336
1032
|
aSelectOptions = oSelectionVariant.getSelectOption(sSelectOptionProp) as SelectOption[];
|
|
1337
1033
|
const settings = getFilterConfigurationSetting(oViewData, sConditionProp);
|
|
@@ -1833,160 +1529,21 @@ function addDefaultDisplayCurrency(
|
|
|
1833
1529
|
}
|
|
1834
1530
|
}
|
|
1835
1531
|
|
|
1836
|
-
function getNonComputedVisibleFields(metaModelContext: ODataMetaModel, sPath: string, oView?: View) {
|
|
1837
|
-
const aTechnicalKeys = metaModelContext.getObject(`${sPath}/`).$Key;
|
|
1838
|
-
const aNonComputedVisibleFields: unknown[] = [];
|
|
1839
|
-
const aImmutableVisibleFields: unknown[] = [];
|
|
1840
|
-
const oEntityType = metaModelContext.getObject(`${sPath}/`);
|
|
1841
|
-
for (const item in oEntityType) {
|
|
1842
|
-
if (oEntityType[item].$kind && oEntityType[item].$kind === "Property") {
|
|
1843
|
-
const oAnnotations = (metaModelContext.getObject(`${sPath}/${item}@`) || {}) as Record<string, unknown>,
|
|
1844
|
-
bIsKey = aTechnicalKeys.indexOf(item) > -1,
|
|
1845
|
-
bIsImmutable = oAnnotations["@Org.OData.Core.V1.Immutable"],
|
|
1846
|
-
bIsNonComputed = !oAnnotations["@Org.OData.Core.V1.Computed"],
|
|
1847
|
-
bIsVisible = !oAnnotations["@com.sap.vocabularies.UI.v1.Hidden"],
|
|
1848
|
-
bIsComputedDefaultValue = oAnnotations["@Org.OData.Core.V1.ComputedDefaultValue"],
|
|
1849
|
-
bIsKeyComputedDefaultValueWithText =
|
|
1850
|
-
bIsKey && oEntityType[item].$Type === "Edm.Guid"
|
|
1851
|
-
? bIsComputedDefaultValue && oAnnotations["@com.sap.vocabularies.Common.v1.Text"]
|
|
1852
|
-
: false;
|
|
1853
|
-
if (
|
|
1854
|
-
(bIsKeyComputedDefaultValueWithText || (bIsKey && oEntityType[item].$Type !== "Edm.Guid")) &&
|
|
1855
|
-
bIsNonComputed &&
|
|
1856
|
-
bIsVisible
|
|
1857
|
-
) {
|
|
1858
|
-
aNonComputedVisibleFields.push(item);
|
|
1859
|
-
} else if (bIsImmutable && bIsNonComputed && bIsVisible) {
|
|
1860
|
-
aImmutableVisibleFields.push(item);
|
|
1861
|
-
}
|
|
1862
|
-
|
|
1863
|
-
if (!bIsNonComputed && bIsComputedDefaultValue && oView) {
|
|
1864
|
-
const oDiagnostics = getAppComponent(oView).getDiagnostics();
|
|
1865
|
-
const sMessage = "Core.ComputedDefaultValue is ignored as Core.Computed is already set to true";
|
|
1866
|
-
oDiagnostics.addIssue(
|
|
1867
|
-
IssueCategory.Annotation,
|
|
1868
|
-
IssueSeverity.Medium,
|
|
1869
|
-
sMessage,
|
|
1870
|
-
IssueCategoryType,
|
|
1871
|
-
IssueCategoryType?.Annotations?.IgnoredAnnotation
|
|
1872
|
-
);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
const aRequiredProperties = CommonUtils.getRequiredPropertiesFromInsertRestrictions(sPath, metaModelContext);
|
|
1877
|
-
if (aRequiredProperties.length) {
|
|
1878
|
-
aRequiredProperties.forEach(function (sProperty: string) {
|
|
1879
|
-
const oAnnotations = metaModelContext.getObject(`${sPath}/${sProperty}@`) as Record<string, unknown>,
|
|
1880
|
-
bIsVisible = !oAnnotations || !oAnnotations["@com.sap.vocabularies.UI.v1.Hidden"];
|
|
1881
|
-
if (bIsVisible && aNonComputedVisibleFields.indexOf(sProperty) === -1 && aImmutableVisibleFields.indexOf(sProperty) === -1) {
|
|
1882
|
-
aNonComputedVisibleFields.push(sProperty);
|
|
1883
|
-
}
|
|
1884
|
-
});
|
|
1885
|
-
}
|
|
1886
|
-
return aNonComputedVisibleFields.concat(aImmutableVisibleFields);
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
function getRequiredProperties(sPath: string, metaModelContext: ODataMetaModel, bCheckUpdateRestrictions = false) {
|
|
1890
|
-
const aRequiredProperties: string[] = [];
|
|
1891
|
-
let aRequiredPropertiesWithPaths: { $PropertyPath: string }[] = [];
|
|
1892
|
-
const navigationText = "$NavigationPropertyBinding";
|
|
1893
|
-
let oEntitySetAnnotations;
|
|
1894
|
-
if (sPath.endsWith("$")) {
|
|
1895
|
-
// if sPath comes with a $ in the end, removing it as it is of no significance
|
|
1896
|
-
sPath = sPath.replace("/$", "");
|
|
1897
|
-
}
|
|
1898
|
-
const entityTypePathParts = sPath.replaceAll("%2F", "/").split("/").filter(ModelHelper.filterOutNavPropBinding);
|
|
1899
|
-
const entitySetPath = ModelHelper.getEntitySetPath(sPath, metaModelContext);
|
|
1900
|
-
const entitySetPathParts = entitySetPath.split("/").filter(ModelHelper.filterOutNavPropBinding);
|
|
1901
|
-
const isContainment = metaModelContext.getObject(`/${entityTypePathParts.join("/")}/$ContainsTarget`);
|
|
1902
|
-
const containmentNavPath = isContainment && entityTypePathParts[entityTypePathParts.length - 1];
|
|
1903
|
-
|
|
1904
|
-
//Restrictions directly at Entity Set
|
|
1905
|
-
//e.g. FR in "NS.EntityContainer/SalesOrderManage" ContextPath: /SalesOrderManage
|
|
1906
|
-
if (!isContainment) {
|
|
1907
|
-
oEntitySetAnnotations = metaModelContext.getObject(`${entitySetPath}@`);
|
|
1908
|
-
}
|
|
1909
|
-
if (entityTypePathParts.length > 1) {
|
|
1910
|
-
const navPath = isContainment ? containmentNavPath : entitySetPathParts[entitySetPathParts.length - 1];
|
|
1911
|
-
const parentEntitySetPath = isContainment ? entitySetPath : `/${entitySetPathParts.slice(0, -1).join(`/${navigationText}/`)}`;
|
|
1912
|
-
//Navigation restrictions
|
|
1913
|
-
//e.g. Parent "/Customer" with NavigationPropertyPath="Set" ContextPath: Customer/Set
|
|
1914
|
-
const oNavRest = CommonUtils.getNavigationRestrictions(metaModelContext, parentEntitySetPath, navPath.replaceAll("%2F", "/"));
|
|
1915
|
-
|
|
1916
|
-
if (oNavRest !== undefined && CommonUtils.hasRestrictedPropertiesInAnnotations(oNavRest, true, bCheckUpdateRestrictions)) {
|
|
1917
|
-
aRequiredPropertiesWithPaths = bCheckUpdateRestrictions
|
|
1918
|
-
? oNavRest["UpdateRestrictions"]!.RequiredProperties || []
|
|
1919
|
-
: oNavRest["InsertRestrictions"]!.RequiredProperties || [];
|
|
1920
|
-
}
|
|
1921
|
-
if (
|
|
1922
|
-
(!aRequiredPropertiesWithPaths || !aRequiredPropertiesWithPaths.length) &&
|
|
1923
|
-
CommonUtils.hasRestrictedPropertiesInAnnotations(oEntitySetAnnotations, false, bCheckUpdateRestrictions)
|
|
1924
|
-
) {
|
|
1925
|
-
aRequiredPropertiesWithPaths = CommonUtils.getRequiredPropertiesFromAnnotations(
|
|
1926
|
-
oEntitySetAnnotations,
|
|
1927
|
-
bCheckUpdateRestrictions
|
|
1928
|
-
);
|
|
1929
|
-
}
|
|
1930
|
-
} else if (CommonUtils.hasRestrictedPropertiesInAnnotations(oEntitySetAnnotations, false, bCheckUpdateRestrictions)) {
|
|
1931
|
-
aRequiredPropertiesWithPaths = CommonUtils.getRequiredPropertiesFromAnnotations(oEntitySetAnnotations, bCheckUpdateRestrictions);
|
|
1932
|
-
}
|
|
1933
|
-
aRequiredPropertiesWithPaths.forEach(function (oRequiredProperty) {
|
|
1934
|
-
const sProperty = oRequiredProperty.$PropertyPath;
|
|
1935
|
-
aRequiredProperties.push(sProperty);
|
|
1936
|
-
});
|
|
1937
|
-
return aRequiredProperties;
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
function getRequiredPropertiesFromInsertRestrictions(sPath: string, oMetaModelContext: ODataMetaModel) {
|
|
1941
|
-
return CommonUtils.getRequiredProperties(sPath, oMetaModelContext);
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
function getRequiredPropertiesFromUpdateRestrictions(sPath: string, oMetaModelContext: ODataMetaModel) {
|
|
1945
|
-
return CommonUtils.getRequiredProperties(sPath, oMetaModelContext, true);
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
function getRequiredPropertiesFromAnnotations(oAnnotations: MetaModelEntitySetAnnotation, bCheckUpdateRestrictions = false) {
|
|
1949
|
-
if (bCheckUpdateRestrictions) {
|
|
1950
|
-
return oAnnotations["@Org.OData.Capabilities.V1.UpdateRestrictions"]?.RequiredProperties || [];
|
|
1951
|
-
}
|
|
1952
|
-
return oAnnotations["@Org.OData.Capabilities.V1.InsertRestrictions"]?.RequiredProperties || [];
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
function hasRestrictedPropertiesInAnnotations(
|
|
1956
|
-
oAnnotations: MetaModelType<NavigationPropertyRestrictionTypes> | MetaModelEntitySetAnnotation | undefined,
|
|
1957
|
-
bIsNavigationRestrictions = false,
|
|
1958
|
-
bCheckUpdateRestrictions = false
|
|
1959
|
-
) {
|
|
1960
|
-
if (bIsNavigationRestrictions) {
|
|
1961
|
-
const oNavAnnotations = oAnnotations as MetaModelType<NavigationPropertyRestrictionTypes>;
|
|
1962
|
-
if (bCheckUpdateRestrictions) {
|
|
1963
|
-
return oNavAnnotations && oNavAnnotations["UpdateRestrictions"] && oNavAnnotations["UpdateRestrictions"].RequiredProperties
|
|
1964
|
-
? true
|
|
1965
|
-
: false;
|
|
1966
|
-
}
|
|
1967
|
-
return oNavAnnotations && oNavAnnotations["InsertRestrictions"] && oNavAnnotations["InsertRestrictions"].RequiredProperties
|
|
1968
|
-
? true
|
|
1969
|
-
: false;
|
|
1970
|
-
} else if (bCheckUpdateRestrictions) {
|
|
1971
|
-
const oEntityAnnotation = oAnnotations as MetaModelEntitySetAnnotation;
|
|
1972
|
-
return oEntityAnnotation &&
|
|
1973
|
-
oEntityAnnotation["@Org.OData.Capabilities.V1.UpdateRestrictions"] &&
|
|
1974
|
-
oEntityAnnotation["@Org.OData.Capabilities.V1.UpdateRestrictions"].RequiredProperties
|
|
1975
|
-
? true
|
|
1976
|
-
: false;
|
|
1977
|
-
}
|
|
1978
|
-
const oEntityAnnotation = oAnnotations as MetaModelEntitySetAnnotation;
|
|
1979
|
-
return oEntityAnnotation &&
|
|
1980
|
-
oEntityAnnotation["@Org.OData.Capabilities.V1.InsertRestrictions"] &&
|
|
1981
|
-
oEntityAnnotation["@Org.OData.Capabilities.V1.InsertRestrictions"].RequiredProperties
|
|
1982
|
-
? true
|
|
1983
|
-
: false;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
1532
|
type UserDefaultParameter = {
|
|
1987
1533
|
$Name: string;
|
|
1988
1534
|
getPath?(): string;
|
|
1989
1535
|
};
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* Retrieves the user defaults from the startup app state (if available) or the startup parameter and sets them to a model.
|
|
1539
|
+
*
|
|
1540
|
+
* @param oAppComponent
|
|
1541
|
+
* @param aParameters
|
|
1542
|
+
* @param oModel
|
|
1543
|
+
* @param bIsAction
|
|
1544
|
+
* @param bIsCreate
|
|
1545
|
+
* @param oActionDefaultValues
|
|
1546
|
+
*/
|
|
1990
1547
|
async function setUserDefaults(
|
|
1991
1548
|
oAppComponent: AppComponent,
|
|
1992
1549
|
aParameters: UserDefaultParameter[],
|
|
@@ -1994,59 +1551,39 @@ async function setUserDefaults(
|
|
|
1994
1551
|
bIsAction: boolean,
|
|
1995
1552
|
bIsCreate?: boolean,
|
|
1996
1553
|
oActionDefaultValues?: Record<string, string>
|
|
1997
|
-
) {
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1554
|
+
): Promise<void> {
|
|
1555
|
+
const oComponentData = oAppComponent.getComponentData(),
|
|
1556
|
+
oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
|
|
1557
|
+
oShellServices = oAppComponent.getShellServices();
|
|
1558
|
+
const oStartupAppState = await oShellServices.getStartupAppState(oAppComponent);
|
|
1559
|
+
const oData = oStartupAppState?.getData() || {},
|
|
1560
|
+
aExtendedParameters = (oData.selectionVariant && oData.selectionVariant.SelectOptions) || [];
|
|
1561
|
+
aParameters.forEach(function (oParameter) {
|
|
1562
|
+
const sPropertyName = bIsAction
|
|
1563
|
+
? `/${oParameter.$Name}`
|
|
1564
|
+
: (oParameter.getPath?.().slice(oParameter.getPath().lastIndexOf("/") + 1) as string);
|
|
1565
|
+
const sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
|
|
1566
|
+
if (oActionDefaultValues && bIsCreate) {
|
|
1567
|
+
if (oActionDefaultValues[sParameterName]) {
|
|
1568
|
+
oModel.setProperty(sPropertyName, oActionDefaultValues[sParameterName]);
|
|
1569
|
+
}
|
|
1570
|
+
} else if (oStartupParameters[sParameterName]) {
|
|
1571
|
+
oModel.setProperty(sPropertyName, oStartupParameters[sParameterName][0]);
|
|
1572
|
+
} else if (aExtendedParameters.length > 0) {
|
|
1573
|
+
for (const oExtendedParameter of aExtendedParameters) {
|
|
1574
|
+
if (oExtendedParameter.PropertyName === sParameterName) {
|
|
1575
|
+
const oRange = oExtendedParameter.Ranges.length
|
|
1576
|
+
? oExtendedParameter.Ranges[oExtendedParameter.Ranges.length - 1]
|
|
1577
|
+
: undefined;
|
|
1578
|
+
if (oRange && oRange.Sign === "I" && oRange.Option === "EQ") {
|
|
1579
|
+
oModel.setProperty(sPropertyName, oRange.Low); // high is ignored when Option=EQ
|
|
2011
1580
|
}
|
|
2012
|
-
} else if (oStartupParameters[sParameterName]) {
|
|
2013
|
-
oModel.setProperty(sPropertyName, oStartupParameters[sParameterName][0]);
|
|
2014
1581
|
}
|
|
2015
|
-
}
|
|
2016
|
-
return resolve(true);
|
|
1582
|
+
}
|
|
2017
1583
|
}
|
|
2018
|
-
return oShellServices.getStartupAppState(oAppComponent).then(function (oStartupAppState) {
|
|
2019
|
-
const oData = oStartupAppState?.getData() || {},
|
|
2020
|
-
aExtendedParameters = (oData.selectionVariant && oData.selectionVariant.SelectOptions) || [];
|
|
2021
|
-
aParameters.forEach(function (oParameter) {
|
|
2022
|
-
const sPropertyName = bIsAction
|
|
2023
|
-
? `/${oParameter.$Name}`
|
|
2024
|
-
: (oParameter.getPath?.().slice(oParameter.getPath().lastIndexOf("/") + 1) as string);
|
|
2025
|
-
const sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
|
|
2026
|
-
if (oActionDefaultValues && bIsCreate) {
|
|
2027
|
-
if (oActionDefaultValues[sParameterName]) {
|
|
2028
|
-
oModel.setProperty(sPropertyName, oActionDefaultValues[sParameterName]);
|
|
2029
|
-
}
|
|
2030
|
-
} else if (oStartupParameters[sParameterName]) {
|
|
2031
|
-
oModel.setProperty(sPropertyName, oStartupParameters[sParameterName][0]);
|
|
2032
|
-
} else if (aExtendedParameters.length > 0) {
|
|
2033
|
-
for (const i in aExtendedParameters) {
|
|
2034
|
-
const oExtendedParameter = aExtendedParameters[i];
|
|
2035
|
-
if (oExtendedParameter.PropertyName === sParameterName) {
|
|
2036
|
-
const oRange = oExtendedParameter.Ranges.length
|
|
2037
|
-
? oExtendedParameter.Ranges[oExtendedParameter.Ranges.length - 1]
|
|
2038
|
-
: undefined;
|
|
2039
|
-
if (oRange && oRange.Sign === "I" && oRange.Option === "EQ") {
|
|
2040
|
-
oModel.setProperty(sPropertyName, oRange.Low); // high is ignored when Option=EQ
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
});
|
|
2046
|
-
return resolve(true);
|
|
2047
|
-
});
|
|
2048
1584
|
});
|
|
2049
1585
|
}
|
|
1586
|
+
|
|
2050
1587
|
export type InboundParameter = {
|
|
2051
1588
|
useForCreate: boolean;
|
|
2052
1589
|
};
|
|
@@ -2298,6 +1835,7 @@ async function fnUpdateSemanticTargetsModel(
|
|
|
2298
1835
|
);
|
|
2299
1836
|
return oFinalSemanticObjects;
|
|
2300
1837
|
}
|
|
1838
|
+
return;
|
|
2301
1839
|
})
|
|
2302
1840
|
.catch(function (oError: unknown) {
|
|
2303
1841
|
Log.error("fnUpdateSemanticTargetsModel: Cannot read links", oError as string);
|
|
@@ -2355,9 +1893,9 @@ function fnGetSemanticTargetsFromPageModel(oController: PageController, sPageMod
|
|
|
2355
1893
|
return list;
|
|
2356
1894
|
}
|
|
2357
1895
|
if (obj instanceof Array) {
|
|
2358
|
-
|
|
2359
|
-
list = list.concat(_fnfindValuesHelper(
|
|
2360
|
-
}
|
|
1896
|
+
obj.forEach((item) => {
|
|
1897
|
+
list = list.concat(_fnfindValuesHelper(item, key, []));
|
|
1898
|
+
});
|
|
2361
1899
|
return list;
|
|
2362
1900
|
}
|
|
2363
1901
|
if (obj[key]) {
|
|
@@ -2396,8 +1934,8 @@ function fnGetSemanticTargetsFromPageModel(oController: PageController, sPageMod
|
|
|
2396
1934
|
}
|
|
2397
1935
|
let aSemanticObjectsFound = _fnfindValues(oPageModel, "semanticObjectPath");
|
|
2398
1936
|
aSemanticObjectsFound = _fnDeleteDuplicateSemanticObjects(aSemanticObjectsFound);
|
|
2399
|
-
const oShellServiceHelper =
|
|
2400
|
-
let sCurrentHash =
|
|
1937
|
+
const oShellServiceHelper = oAppComponent.getShellServices();
|
|
1938
|
+
let sCurrentHash = oShellServiceHelper.getHash();
|
|
2401
1939
|
const aSemanticObjectsForGetLinks = [];
|
|
2402
1940
|
const aSemanticObjects: SemanticObject[] = [];
|
|
2403
1941
|
let _oSemanticObject;
|
|
@@ -2530,7 +2068,7 @@ function getFilterRestrictionsByPath(entityPath: string, oContext: ODataMetaMode
|
|
|
2530
2068
|
const entitySetPath = ModelHelper.getEntitySetPath(entityPath, oContext);
|
|
2531
2069
|
const entitySetPathParts = entitySetPath.split("/").filter(ModelHelper.filterOutNavPropBinding);
|
|
2532
2070
|
const isContainment = oContext.getObject(`${entityTypePath}$ContainsTarget`);
|
|
2533
|
-
const containmentNavPath = isContainment && entityTypePathParts[entityTypePathParts.length - 1];
|
|
2071
|
+
const containmentNavPath = !!isContainment && entityTypePathParts[entityTypePathParts.length - 1];
|
|
2534
2072
|
|
|
2535
2073
|
//LEAST PRIORITY - Filter restrictions directly at Entity Set
|
|
2536
2074
|
//e.g. FR in "NS.EntityContainer/SalesOrderManage" ContextPath: /SalesOrderManage
|
|
@@ -2546,7 +2084,7 @@ function getFilterRestrictionsByPath(entityPath: string, oContext: ODataMetaMode
|
|
|
2546
2084
|
}
|
|
2547
2085
|
|
|
2548
2086
|
if (entityTypePathParts.length > 1) {
|
|
2549
|
-
const navPath = isContainment ? containmentNavPath : entitySetPathParts[entitySetPathParts.length - 1];
|
|
2087
|
+
const navPath = isContainment ? (containmentNavPath as string) : entitySetPathParts[entitySetPathParts.length - 1];
|
|
2550
2088
|
// In case of containment we take entitySet provided as parent. And in case of normal we would remove the last navigation from entitySetPath.
|
|
2551
2089
|
const parentEntitySetPath = isContainment ? entitySetPath : `/${entitySetPathParts.slice(0, -1).join(`/${navigationText}/`)}`;
|
|
2552
2090
|
//THIRD HIGHEST PRIORITY - Reading property path restrictions - Annotation at main entity but directly on navigation property path
|
|
@@ -2591,7 +2129,7 @@ function getFilterRestrictionsByPath(entityPath: string, oContext: ODataMetaMode
|
|
|
2591
2129
|
|
|
2592
2130
|
//SECOND HIGHEST priority - Navigation restrictions
|
|
2593
2131
|
//e.g. Parent "/Customer" with NavigationPropertyPath="Set" ContextPath: Customer/Set
|
|
2594
|
-
const oNavRestrictions =
|
|
2132
|
+
const oNavRestrictions = MetaModelFunction.getNavigationRestrictions(oContext, parentEntitySetPath, navPath.replaceAll("%2F", "/"));
|
|
2595
2133
|
const oNavFilterRest = oNavRestrictions && (oNavRestrictions["FilterRestrictions"] as MetaModelType<FilterRestrictionsType>);
|
|
2596
2134
|
const navResReqProps = getFilterRestrictions(oNavFilterRest, "RequiredProperties") || [];
|
|
2597
2135
|
oRet.RequiredProperties = uniqueSort(oRet.RequiredProperties.concat(navResReqProps));
|
|
@@ -2649,31 +2187,26 @@ async function templateControlFragment(
|
|
|
2649
2187
|
return oModifier.targets === "xmlTree" && oFragment.length > 0 ? oFragment[0] : oFragment;
|
|
2650
2188
|
});
|
|
2651
2189
|
} else {
|
|
2652
|
-
|
|
2653
|
-
.
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
id: oOptions.id,
|
|
2667
|
-
definition: oFragment as unknown as string,
|
|
2668
|
-
controller: oOptions.controller
|
|
2669
|
-
});
|
|
2670
|
-
});
|
|
2190
|
+
const oFragment = await XMLPreprocessor.process(
|
|
2191
|
+
XMLTemplateProcessor.loadTemplate(sFragmentName, "fragment"),
|
|
2192
|
+
{ name: sFragmentName },
|
|
2193
|
+
oPreprocessorSettings
|
|
2194
|
+
);
|
|
2195
|
+
const oControl = oFragment.firstElementChild;
|
|
2196
|
+
if (!!oOptions.isXML && oControl) {
|
|
2197
|
+
return oControl;
|
|
2198
|
+
}
|
|
2199
|
+
return Fragment.load({
|
|
2200
|
+
id: oOptions.id,
|
|
2201
|
+
definition: oFragment as unknown as string,
|
|
2202
|
+
controller: oOptions.controller
|
|
2203
|
+
});
|
|
2671
2204
|
}
|
|
2672
2205
|
}
|
|
2673
2206
|
|
|
2674
2207
|
function getSingletonPath(path: string, metaModel: ODataMetaModel): string | undefined {
|
|
2675
2208
|
const parts = path.split("/").filter(Boolean),
|
|
2676
|
-
propertyName = parts.pop()
|
|
2209
|
+
propertyName = parts.pop()!,
|
|
2677
2210
|
navigationPath = parts.join("/"),
|
|
2678
2211
|
entitySet = navigationPath && metaModel.getObject(`/${navigationPath}`);
|
|
2679
2212
|
if (entitySet?.$kind === "Singleton") {
|
|
@@ -2698,48 +2231,6 @@ async function requestSingletonProperty(path: string, model: ODataModel) {
|
|
|
2698
2231
|
return Promise.resolve(null);
|
|
2699
2232
|
}
|
|
2700
2233
|
|
|
2701
|
-
function addEventToBindingInfo(oControl: Control, sEventName: string, fHandler: Function) {
|
|
2702
|
-
let oBindingInfo: AggregationBindingInfo;
|
|
2703
|
-
const setBindingInfo = function () {
|
|
2704
|
-
if (oBindingInfo) {
|
|
2705
|
-
if (!oBindingInfo.events) {
|
|
2706
|
-
oBindingInfo.events = {};
|
|
2707
|
-
}
|
|
2708
|
-
if (!oBindingInfo.events[sEventName]) {
|
|
2709
|
-
oBindingInfo.events[sEventName] = fHandler;
|
|
2710
|
-
} else {
|
|
2711
|
-
const fOriginalHandler = oBindingInfo.events[sEventName];
|
|
2712
|
-
oBindingInfo.events[sEventName] = function (...args: unknown[]) {
|
|
2713
|
-
fHandler.apply(this, ...args);
|
|
2714
|
-
fOriginalHandler.apply(this, ...args);
|
|
2715
|
-
};
|
|
2716
|
-
}
|
|
2717
|
-
}
|
|
2718
|
-
};
|
|
2719
|
-
if (oControl.isA<Chart & DelegateMixin>("sap.ui.mdc.Chart")) {
|
|
2720
|
-
oControl
|
|
2721
|
-
.innerChartBound()
|
|
2722
|
-
.then(function () {
|
|
2723
|
-
oBindingInfo = oControl.getControlDelegate()._getChart(oControl).getBindingInfo("data");
|
|
2724
|
-
setBindingInfo();
|
|
2725
|
-
})
|
|
2726
|
-
.catch(function (sError: unknown) {
|
|
2727
|
-
Log.error(sError as string);
|
|
2728
|
-
});
|
|
2729
|
-
} else {
|
|
2730
|
-
oBindingInfo = oControl.data("rowsBindingInfo");
|
|
2731
|
-
setBindingInfo();
|
|
2732
|
-
}
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
async function loadMacroLibrary() {
|
|
2736
|
-
return new Promise<void>(function (resolve) {
|
|
2737
|
-
sap.ui.require(["sap/fe/macros/macroLibrary"], function (/*macroLibrary*/) {
|
|
2738
|
-
resolve();
|
|
2739
|
-
});
|
|
2740
|
-
});
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
2234
|
// Get the path for action parameters that is needed to read the annotations
|
|
2744
2235
|
function getParameterPath(sPath: string, sParameter: string) {
|
|
2745
2236
|
let sContext;
|
|
@@ -2786,28 +2277,128 @@ function _fntranslatedTextFromExpBindingString(expBinding: string, control: Cont
|
|
|
2786
2277
|
function isSmallDevice() {
|
|
2787
2278
|
return !system.desktop || Device.resize.width <= 320;
|
|
2788
2279
|
}
|
|
2280
|
+
/**
|
|
2281
|
+
* Get filter information for a SelectionVariant annotation.
|
|
2282
|
+
*
|
|
2283
|
+
* @param oControl The table/chart instance
|
|
2284
|
+
* @param selectionVariantPath Relative SelectionVariant annotation path
|
|
2285
|
+
* @param isChart
|
|
2286
|
+
* @returns Information on filters
|
|
2287
|
+
* filters: array of sap.ui.model.filters
|
|
2288
|
+
* text: Text property of the SelectionVariant
|
|
2289
|
+
* @private
|
|
2290
|
+
* @ui5-restricted
|
|
2291
|
+
*/
|
|
2292
|
+
interface ISelectionOption {
|
|
2293
|
+
PropertyName: { $PropertyPath: string };
|
|
2294
|
+
Ranges: {
|
|
2295
|
+
[key: string]: {
|
|
2296
|
+
Option: { $EnumMember: String };
|
|
2297
|
+
Low: unknown;
|
|
2298
|
+
High: unknown;
|
|
2299
|
+
};
|
|
2300
|
+
};
|
|
2301
|
+
}
|
|
2302
|
+
function getFiltersInfoForSV(oControl: Control | MDCChart | MDCTable, selectionVariantPath: string, isChart?: boolean) {
|
|
2303
|
+
const sEntityTypePath = oControl.data("entityType"),
|
|
2304
|
+
oMetaModel = CommonUtils.getAppComponent(oControl as Control).getMetaModel(),
|
|
2305
|
+
mPropertyFilters: Record<string, Filter[]> = {},
|
|
2306
|
+
aFilters = [],
|
|
2307
|
+
aPaths: string[] = [];
|
|
2308
|
+
let sText = "";
|
|
2309
|
+
let oSelectionVariant = oMetaModel.getObject(`${sEntityTypePath}${selectionVariantPath}`);
|
|
2310
|
+
// for chart the structure varies hence read it from main object
|
|
2311
|
+
if (isChart) {
|
|
2312
|
+
oSelectionVariant = oSelectionVariant.SelectionVariant;
|
|
2313
|
+
}
|
|
2314
|
+
if (oSelectionVariant) {
|
|
2315
|
+
sText = oSelectionVariant.Text;
|
|
2316
|
+
(oSelectionVariant.SelectOptions || [])
|
|
2317
|
+
.filter(function (oSelectOption: ISelectionOption) {
|
|
2318
|
+
return oSelectOption && oSelectOption.PropertyName && oSelectOption.PropertyName.$PropertyPath;
|
|
2319
|
+
})
|
|
2320
|
+
.forEach(function (oSelectOption: ISelectionOption) {
|
|
2321
|
+
const sPath = oSelectOption.PropertyName.$PropertyPath;
|
|
2322
|
+
if (!aPaths.includes(sPath)) {
|
|
2323
|
+
aPaths.push(sPath);
|
|
2324
|
+
}
|
|
2325
|
+
for (const j in oSelectOption.Ranges) {
|
|
2326
|
+
const oRange = oSelectOption.Ranges[j];
|
|
2327
|
+
mPropertyFilters[sPath] = (mPropertyFilters[sPath] || []).concat(
|
|
2328
|
+
new Filter(sPath, oRange.Option?.$EnumMember?.split("/").pop() as undefined, oRange.Low, oRange.High)
|
|
2329
|
+
);
|
|
2330
|
+
}
|
|
2331
|
+
});
|
|
2332
|
+
|
|
2333
|
+
for (const sPropertyPath in mPropertyFilters) {
|
|
2334
|
+
aFilters.push(
|
|
2335
|
+
new Filter({
|
|
2336
|
+
filters: mPropertyFilters[sPropertyPath],
|
|
2337
|
+
and: false
|
|
2338
|
+
})
|
|
2339
|
+
);
|
|
2340
|
+
}
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
return {
|
|
2344
|
+
properties: aPaths,
|
|
2345
|
+
filters: aFilters,
|
|
2346
|
+
text: sText
|
|
2347
|
+
};
|
|
2348
|
+
}
|
|
2789
2349
|
|
|
2790
2350
|
function getConverterContextForPath(sMetaPath: string, oMetaModel: ODataMetaModel, sEntitySet: string, oDiagnostics: Diagnostics) {
|
|
2791
2351
|
const oContext = oMetaModel.createBindingContext(sMetaPath) as ODataV4Context;
|
|
2792
2352
|
return ConverterContext?.createConverterContextForMacro(sEntitySet, oContext || oMetaModel, oDiagnostics, mergeObjects, undefined);
|
|
2793
2353
|
}
|
|
2794
2354
|
|
|
2355
|
+
/**
|
|
2356
|
+
* This function returns an ID which should be used in the internal chart for the measure or dimension.
|
|
2357
|
+
* For standard cases, this is just the ID of the property.
|
|
2358
|
+
* If it is necessary to use another ID internally inside the chart (e.g. on duplicate property IDs) this method can be overwritten.
|
|
2359
|
+
* In this case, <code>getPropertyFromNameAndKind</code> needs to be overwritten as well.
|
|
2360
|
+
*
|
|
2361
|
+
* @param name ID of the property
|
|
2362
|
+
* @param kind Type of the property (measure or dimension)
|
|
2363
|
+
* @returns Internal ID for the sap.chart.Chart
|
|
2364
|
+
* @private
|
|
2365
|
+
* @ui5-restricted
|
|
2366
|
+
*/
|
|
2367
|
+
function getInternalChartNameFromPropertyNameAndKind(name: string, kind: string) {
|
|
2368
|
+
return name.replace("_fe_" + kind + "_", "");
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
/**
|
|
2372
|
+
* This function returns an array of chart properties by remvoing _fe_groupable prefix.
|
|
2373
|
+
*
|
|
2374
|
+
* @param {Array} aFilters Chart filter properties
|
|
2375
|
+
* @returns Chart properties without prefixes
|
|
2376
|
+
* @private
|
|
2377
|
+
* @ui5-restricted
|
|
2378
|
+
*/
|
|
2379
|
+
interface IFilterProp {
|
|
2380
|
+
sPath: string;
|
|
2381
|
+
}
|
|
2382
|
+
function getChartPropertiesWithoutPrefixes(aFilters: IFilterProp[]) {
|
|
2383
|
+
aFilters.forEach((element: IFilterProp) => {
|
|
2384
|
+
if (element.sPath && element.sPath.includes("fe_groupable")) {
|
|
2385
|
+
element.sPath = CommonUtils.getInternalChartNameFromPropertyNameAndKind(element.sPath, "groupable");
|
|
2386
|
+
}
|
|
2387
|
+
});
|
|
2388
|
+
return aFilters;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2795
2391
|
const CommonUtils = {
|
|
2796
|
-
isPropertyFilterable: isPropertyFilterable,
|
|
2797
|
-
isFieldControlPathInapplicable: isFieldControlPathInapplicable,
|
|
2798
|
-
removeSensitiveData: removeSensitiveData,
|
|
2799
2392
|
fireButtonPress: fnFireButtonPress,
|
|
2800
2393
|
getTargetView: getTargetView,
|
|
2801
2394
|
getCurrentPageView: getCurrentPageView,
|
|
2802
2395
|
hasTransientContext: fnHasTransientContexts,
|
|
2803
2396
|
updateRelatedAppsDetails: fnUpdateRelatedAppsDetails,
|
|
2804
|
-
resolveStringtoBoolean: fnResolveStringtoBoolean,
|
|
2805
2397
|
getAppComponent: getAppComponent,
|
|
2806
2398
|
getMandatoryFilterFields: fnGetMandatoryFilterFields,
|
|
2807
2399
|
getContextPathProperties: fnGetContextPathProperties,
|
|
2808
2400
|
getParameterInfo: getParameterInfo,
|
|
2809
2401
|
updateDataFieldForIBNButtonsVisibility: fnUpdateDataFieldForIBNButtonsVisibility,
|
|
2810
|
-
getTranslatedText: getTranslatedText,
|
|
2811
2402
|
getEntitySetName: getEntitySetName,
|
|
2812
2403
|
getActionPath: getActionPath,
|
|
2813
2404
|
computeDisplayMode: computeDisplayMode,
|
|
@@ -2819,10 +2410,7 @@ const CommonUtils = {
|
|
|
2819
2410
|
addExternalStateFiltersToSelectionVariant: addExternalStateFiltersToSelectionVariant,
|
|
2820
2411
|
addPageContextToSelectionVariant: addPageContextToSelectionVariant,
|
|
2821
2412
|
addDefaultDisplayCurrency: addDefaultDisplayCurrency,
|
|
2822
|
-
getNonComputedVisibleFields: getNonComputedVisibleFields,
|
|
2823
2413
|
setUserDefaults: setUserDefaults,
|
|
2824
|
-
getShellServices: getShellServices,
|
|
2825
|
-
getHash: getHash,
|
|
2826
2414
|
getIBNActions: fnGetIBNActions,
|
|
2827
2415
|
getHeaderFacetItemConfigForExternalNavigation: getHeaderFacetItemConfigForExternalNavigation,
|
|
2828
2416
|
getSemanticObjectMapping: getSemanticObjectMapping,
|
|
@@ -2831,16 +2419,12 @@ const CommonUtils = {
|
|
|
2831
2419
|
getSemanticTargetsFromPageModel: fnGetSemanticTargetsFromPageModel,
|
|
2832
2420
|
getSemanticObjectsFromPath: fnGetSemanticObjectsFromPath,
|
|
2833
2421
|
updateSemanticTargets: fnUpdateSemanticTargetsModel,
|
|
2834
|
-
getPropertyDataType: getPropertyDataType,
|
|
2835
2422
|
waitForContextRequested: waitForContextRequested,
|
|
2836
|
-
getNavigationRestrictions: getNavigationRestrictions,
|
|
2837
|
-
getSearchRestrictions: getSearchRestrictions,
|
|
2838
2423
|
getFilterRestrictionsByPath: getFilterRestrictionsByPath,
|
|
2839
2424
|
getSpecificAllowedExpression: getSpecificAllowedExpression,
|
|
2840
2425
|
getAdditionalParamsForCreate: getAdditionalParamsForCreate,
|
|
2841
2426
|
requestSingletonProperty: requestSingletonProperty,
|
|
2842
2427
|
templateControlFragment: templateControlFragment,
|
|
2843
|
-
addEventToBindingInfo: addEventToBindingInfo,
|
|
2844
2428
|
FilterRestrictions: {
|
|
2845
2429
|
REQUIRED_PROPERTIES: "RequiredProperties",
|
|
2846
2430
|
NON_FILTERABLE_PROPERTIES: "NonFilterableProperties",
|
|
@@ -2848,13 +2432,6 @@ const CommonUtils = {
|
|
|
2848
2432
|
},
|
|
2849
2433
|
AllowedExpressionsPrio: ["SingleValue", "MultiValue", "SingleRange", "MultiRange", "SearchExpression", "MultiRangeOrSearchExpression"],
|
|
2850
2434
|
normalizeSearchTerm: normalizeSearchTerm,
|
|
2851
|
-
getSingletonPath: getSingletonPath,
|
|
2852
|
-
getRequiredPropertiesFromUpdateRestrictions: getRequiredPropertiesFromUpdateRestrictions,
|
|
2853
|
-
getRequiredPropertiesFromInsertRestrictions: getRequiredPropertiesFromInsertRestrictions,
|
|
2854
|
-
hasRestrictedPropertiesInAnnotations: hasRestrictedPropertiesInAnnotations,
|
|
2855
|
-
getRequiredPropertiesFromAnnotations: getRequiredPropertiesFromAnnotations,
|
|
2856
|
-
getRequiredProperties: getRequiredProperties,
|
|
2857
|
-
checkIfResourceKeyExists: checkIfResourceKeyExists,
|
|
2858
2435
|
setContextsBasedOnOperationAvailable: setContextsBasedOnOperationAvailable,
|
|
2859
2436
|
setDynamicActionContexts: setDynamicActionContexts,
|
|
2860
2437
|
requestProperty: requestProperty,
|
|
@@ -2866,7 +2443,9 @@ const CommonUtils = {
|
|
|
2866
2443
|
createSemanticDatesFromConditions: createSemanticDatesFromConditions,
|
|
2867
2444
|
updateRelateAppsModel: updateRelateAppsModel,
|
|
2868
2445
|
getSemanticObjectAnnotations: _getSemanticObjectAnnotations,
|
|
2869
|
-
|
|
2446
|
+
getFiltersInfoForSV: getFiltersInfoForSV,
|
|
2447
|
+
getInternalChartNameFromPropertyNameAndKind: getInternalChartNameFromPropertyNameAndKind,
|
|
2448
|
+
getChartPropertiesWithoutPrefixes: getChartPropertiesWithoutPrefixes,
|
|
2870
2449
|
isSmallDevice,
|
|
2871
2450
|
getConverterContextForPath
|
|
2872
2451
|
};
|