@sapui5/sap.fe.core 1.111.1 → 1.112.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 +4 -4
- 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 +11 -11
- package/src/sap/fe/core/AppComponent-dbg.js +27 -5
- 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 +58 -3
- 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 +152 -365
- 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 +201 -478
- package/src/sap/fe/core/ExtensionAPI-dbg.js +2 -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 +9 -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 +163 -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 +169 -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 +147 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockTemplateProcessor-dbg.js +905 -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} +290 -362
- 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 +181 -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 +890 -220
- 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 +974 -239
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation-dbg.js +24 -34
- 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 +71 -61
- 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 +1 -1
- package/src/sap/fe/core/controllerextensions/PageReady.ts +24 -0
- 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 +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +2 -3
- 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/TransactionHelper-dbg.js +45 -31
- 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 +52 -42
- package/src/sap/fe/core/controllerextensions/editFlow/draft-dbg.js +44 -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 +43 -63
- package/src/sap/fe/core/controllerextensions/editFlow/draftDataLossPopup.js.map +1 -1
- package/src/sap/fe/core/controllerextensions/editFlow/operations/_internal-dbg.js +77 -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 +114 -0
- package/src/sap/fe/core/controllerextensions/editFlow/operations/facade-dbg.js +1505 -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 +1985 -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 -11
- 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 -13
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling-dbg.js +43 -41
- 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 +44 -47
- 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 +12 -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 +32 -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 +1 -1
- package/src/sap/fe/core/converters/ConverterContext.ts +2 -1
- 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 +17 -1
- 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 +16 -0
- package/src/sap/fe/core/converters/MetaModelConverter-dbg.js +61 -49
- 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 +65 -51
- 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 +65 -16
- 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 +62 -18
- package/src/sap/fe/core/converters/common/AnnotationConverter-dbg.js +1010 -957
- 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 +8 -8
- 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 +28 -26
- 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 +1 -1
- package/src/sap/fe/core/converters/controls/Common/Form.ts +3 -3
- package/src/sap/fe/core/converters/controls/Common/KPI-dbg.js +6 -6
- 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 +15 -15
- package/src/sap/fe/core/converters/controls/Common/Table-dbg.js +97 -69
- 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 +161 -137
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions-dbg.js +3 -3
- 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 +10 -9
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar-dbg.js +48 -44
- 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 +130 -86
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters-dbg.js +34 -26
- 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 +62 -45
- 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 +34 -13
- 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 +54 -20
- package/src/sap/fe/core/converters/helpers/Aggregation-dbg.js +3 -1
- package/src/sap/fe/core/converters/helpers/Aggregation.js.map +1 -1
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +8 -0
- 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 +9 -8
- 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 +8 -7
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction-dbg.js +8 -7
- 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 +9 -6
- package/src/sap/fe/core/converters/templates/ListReportConverter-dbg.js +25 -33
- 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 +35 -35
- package/src/sap/fe/core/converters/templates/ObjectPageConverter-dbg.js +11 -4
- 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 +7 -1
- 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 +2 -2
- 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 +1 -1
- package/src/sap/fe/core/formatters/ValueFormatter-dbg.js +5 -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 +6 -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 +6 -6
- package/src/sap/fe/core/helpers/BindingToolkit.js.map +1 -1
- package/src/sap/fe/core/helpers/BindingToolkit.ts +8 -8
- 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 +20 -18
- 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 +22 -23
- package/src/sap/fe/core/helpers/MessageStrip-dbg.js +4 -5
- 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 +4 -4
- package/src/sap/fe/core/helpers/MetaModelFunction-dbg.js +354 -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 +408 -0
- package/src/sap/fe/core/helpers/ModelHelper-dbg.js +13 -13
- package/src/sap/fe/core/helpers/ModelHelper.js.map +1 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +13 -13
- 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 +26 -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 +19 -0
- package/src/sap/fe/core/helpers/SemanticDateOperators-dbg.js +93 -18
- 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 +70 -17
- 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/Synchronization-dbg.js +1 -1
- package/src/sap/fe/core/helpers/Synchronization.ts +2 -0
- package/src/sap/fe/core/helpers/TypeGuards-dbg.js +5 -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 +12 -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 +127 -125
- 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/messagebundle.properties +33 -0
- package/src/sap/fe/core/messagebundle_ar.properties +12 -10
- package/src/sap/fe/core/messagebundle_bg.properties +11 -9
- package/src/sap/fe/core/messagebundle_ca.properties +11 -9
- package/src/sap/fe/core/messagebundle_cs.properties +11 -9
- package/src/sap/fe/core/messagebundle_cy.properties +11 -9
- package/src/sap/fe/core/messagebundle_da.properties +11 -9
- package/src/sap/fe/core/messagebundle_de.properties +3 -1
- package/src/sap/fe/core/messagebundle_el.properties +11 -9
- package/src/sap/fe/core/messagebundle_en.properties +3 -1
- package/src/sap/fe/core/messagebundle_en_GB.properties +2 -0
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +20 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +21 -3
- package/src/sap/fe/core/messagebundle_es.properties +11 -9
- package/src/sap/fe/core/messagebundle_es_MX.properties +11 -9
- package/src/sap/fe/core/messagebundle_et.properties +11 -9
- package/src/sap/fe/core/messagebundle_fi.properties +11 -9
- package/src/sap/fe/core/messagebundle_fr.properties +11 -9
- package/src/sap/fe/core/messagebundle_fr_CA.properties +3 -1
- package/src/sap/fe/core/messagebundle_hi.properties +2 -0
- package/src/sap/fe/core/messagebundle_hr.properties +11 -9
- package/src/sap/fe/core/messagebundle_hu.properties +11 -9
- package/src/sap/fe/core/messagebundle_id.properties +3 -1
- package/src/sap/fe/core/messagebundle_it.properties +11 -9
- package/src/sap/fe/core/messagebundle_iw.properties +11 -9
- package/src/sap/fe/core/messagebundle_ja.properties +11 -9
- package/src/sap/fe/core/messagebundle_kk.properties +11 -9
- package/src/sap/fe/core/messagebundle_ko.properties +2 -0
- package/src/sap/fe/core/messagebundle_lt.properties +11 -9
- package/src/sap/fe/core/messagebundle_lv.properties +2 -0
- package/src/sap/fe/core/messagebundle_ms.properties +12 -10
- package/src/sap/fe/core/messagebundle_nl.properties +12 -10
- package/src/sap/fe/core/messagebundle_no.properties +11 -9
- package/src/sap/fe/core/messagebundle_pl.properties +2 -0
- package/src/sap/fe/core/messagebundle_pt.properties +11 -9
- package/src/sap/fe/core/messagebundle_pt_PT.properties +11 -9
- package/src/sap/fe/core/messagebundle_ro.properties +3 -1
- package/src/sap/fe/core/messagebundle_ru.properties +3 -1
- package/src/sap/fe/core/messagebundle_sh.properties +11 -9
- package/src/sap/fe/core/messagebundle_sk.properties +11 -9
- package/src/sap/fe/core/messagebundle_sl.properties +11 -9
- package/src/sap/fe/core/messagebundle_sv.properties +2 -0
- package/src/sap/fe/core/messagebundle_th.properties +11 -9
- package/src/sap/fe/core/messagebundle_tr.properties +11 -9
- package/src/sap/fe/core/messagebundle_uk.properties +11 -9
- package/src/sap/fe/core/messagebundle_vi.properties +12 -10
- package/src/sap/fe/core/messagebundle_zh_CN.properties +2 -0
- package/src/sap/fe/core/messagebundle_zh_TW.properties +2 -0
- 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 +4 -3
- 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 +15 -5
- 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 +3 -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 +29 -3
- package/src/sap/fe/core/services/ShellServicesFactory-dbg.js +1 -1
- package/src/sap/fe/core/services/ShellServicesFactory.ts +14 -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 +502 -333
- package/src/sap/fe/core/services/TemplatedViewServiceFactory-dbg.js +18 -5
- 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 +41 -12
- 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/DataModelPathHelper-dbg.js +185 -86
- 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 +190 -82
- package/src/sap/fe/core/templating/DisplayModeFormatter-dbg.js +1 -1
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +1 -1
- package/src/sap/fe/core/templating/EntitySetHelper-dbg.js +2 -3
- 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 +1 -3
- 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/PropertyHelper-dbg.js +1 -1
- package/src/sap/fe/core/templating/PropertyHelper.ts +2 -2
- package/src/sap/fe/core/templating/UIFormatters-dbg.js +1 -1
- package/src/sap/fe/core/templating/UIFormatters.ts +4 -0
- 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/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,863 +0,0 @@
|
|
|
1
|
-
import Log from "sap/base/Log";
|
|
2
|
-
import type AppComponent from "sap/fe/core/AppComponent";
|
|
3
|
-
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
4
|
-
import BusyLocker from "sap/fe/core/controllerextensions/BusyLocker";
|
|
5
|
-
import { send } from "sap/fe/core/controllerextensions/collaboration/ActivitySync";
|
|
6
|
-
import { Activity } from "sap/fe/core/controllerextensions/collaboration/CollaborationCommon";
|
|
7
|
-
import sticky from "sap/fe/core/controllerextensions/editFlow/sticky";
|
|
8
|
-
import TransactionHelper from "sap/fe/core/controllerextensions/editFlow/TransactionHelper";
|
|
9
|
-
import { defineUI5Class, finalExtension, publicExtension } from "sap/fe/core/helpers/ClassSupport";
|
|
10
|
-
import EditState from "sap/fe/core/helpers/EditState";
|
|
11
|
-
import FELibrary from "sap/fe/core/library";
|
|
12
|
-
import type PageController from "sap/fe/core/PageController";
|
|
13
|
-
import TableAPI from "sap/fe/macros/table/TableAPI";
|
|
14
|
-
import Button from "sap/m/Button";
|
|
15
|
-
import Dialog from "sap/m/Dialog";
|
|
16
|
-
import Text from "sap/m/Text";
|
|
17
|
-
import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
|
|
18
|
-
import type View from "sap/ui/core/mvc/View";
|
|
19
|
-
import type Table from "sap/ui/mdc/Table";
|
|
20
|
-
import type JSONModel from "sap/ui/model/json/JSONModel";
|
|
21
|
-
import type Model from "sap/ui/model/Model";
|
|
22
|
-
import type Context from "sap/ui/model/odata/v4/Context";
|
|
23
|
-
import type ODataListBinding from "sap/ui/model/odata/v4/ODataListBinding";
|
|
24
|
-
import ODataMetaModel from "sap/ui/model/odata/v4/ODataMetaModel";
|
|
25
|
-
|
|
26
|
-
const ProgrammingModel = FELibrary.ProgrammingModel,
|
|
27
|
-
DraftStatus = FELibrary.DraftStatus,
|
|
28
|
-
EditMode = FELibrary.EditMode,
|
|
29
|
-
CreationMode = FELibrary.CreationMode;
|
|
30
|
-
|
|
31
|
-
@defineUI5Class("sap.fe.core.controllerextensions.InternalEditFlow")
|
|
32
|
-
class InternalEditFlow extends ControllerExtension {
|
|
33
|
-
protected base!: PageController;
|
|
34
|
-
private _pTasks: any;
|
|
35
|
-
private oActionPromise?: Promise<any>;
|
|
36
|
-
private fnDirtyStateProvider?: Function;
|
|
37
|
-
private fnHandleSessionTimeout?: Function;
|
|
38
|
-
private fnStickyDiscardAfterNavigation?: Function;
|
|
39
|
-
|
|
40
|
-
getAppComponent(): AppComponent {
|
|
41
|
-
return this.base.getAppComponent();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Sets that the current page contains a newly created object.
|
|
46
|
-
*
|
|
47
|
-
* @param bCreationMode True if the object is new
|
|
48
|
-
*/
|
|
49
|
-
setCreationMode(bCreationMode: boolean) {
|
|
50
|
-
const uiModelContext = this.base.getView().getBindingContext("ui") as Context;
|
|
51
|
-
this.getGlobalUIModel().setProperty("createMode", bCreationMode, uiModelContext, true);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Indicates whether the current page contains a newly created object or not.
|
|
56
|
-
*
|
|
57
|
-
* @returns True if the object is new
|
|
58
|
-
*/
|
|
59
|
-
getCreationMode(): boolean {
|
|
60
|
-
const uiModelContext = this.base.getView().getBindingContext("ui") as Context;
|
|
61
|
-
return !!this.getGlobalUIModel().getProperty("createMode", uiModelContext);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Indicates whether the object being edited (or one of its sub-objects) has been modified or not.
|
|
66
|
-
*
|
|
67
|
-
* @returns True if the object has been modified
|
|
68
|
-
*/
|
|
69
|
-
isDocumentModified(): boolean {
|
|
70
|
-
return !!this.getGlobalUIModel().getProperty("/isDocumentModified");
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Sets that the object being edited (or one of its sub-objects) has been modified.
|
|
75
|
-
*
|
|
76
|
-
* @param modified True if the object has been modified
|
|
77
|
-
*/
|
|
78
|
-
setDocumentModified(modified: boolean) {
|
|
79
|
-
this.getGlobalUIModel().setProperty("/isDocumentModified", modified);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Sets that the object being edited has been modified by creating a sub-object.
|
|
84
|
-
*
|
|
85
|
-
* @param listBinding The list binding on which the object has been created
|
|
86
|
-
*/
|
|
87
|
-
setDocumentModifiedOnCreate(listBinding: ODataListBinding) {
|
|
88
|
-
// Set the modified flag only on relative listBindings, i.e. when creating a sub-object
|
|
89
|
-
// If the listBinding is not relative, then it's a creation from the ListReport, and by default a newly created root object isn't considered as modified
|
|
90
|
-
if (listBinding.isRelative()) {
|
|
91
|
-
this.setDocumentModified(true);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
@publicExtension()
|
|
96
|
-
@finalExtension()
|
|
97
|
-
createMultipleDocuments(
|
|
98
|
-
oListBinding: any,
|
|
99
|
-
aData: any,
|
|
100
|
-
bCreateAtEnd: any,
|
|
101
|
-
bFromCopyPaste: boolean,
|
|
102
|
-
beforeCreateCallBack: any,
|
|
103
|
-
bInactive = false
|
|
104
|
-
) {
|
|
105
|
-
const transactionHelper = this.getTransactionHelper(),
|
|
106
|
-
oLockObject = this.getGlobalUIModel();
|
|
107
|
-
|
|
108
|
-
BusyLocker.lock(oLockObject);
|
|
109
|
-
let aFinalContexts: any[] = [];
|
|
110
|
-
return this.syncTask()
|
|
111
|
-
.then(() => {
|
|
112
|
-
return beforeCreateCallBack
|
|
113
|
-
? beforeCreateCallBack({ contextPath: oListBinding && oListBinding.getPath() })
|
|
114
|
-
: Promise.resolve();
|
|
115
|
-
})
|
|
116
|
-
.then(() => {
|
|
117
|
-
const oModel = oListBinding.getModel(),
|
|
118
|
-
oMetaModel = oModel.getMetaModel();
|
|
119
|
-
let sMetaPath: string;
|
|
120
|
-
|
|
121
|
-
if (oListBinding.getContext()) {
|
|
122
|
-
sMetaPath = oMetaModel.getMetaPath(`${oListBinding.getContext().getPath()}/${oListBinding.getPath()}`);
|
|
123
|
-
} else {
|
|
124
|
-
sMetaPath = oMetaModel.getMetaPath(oListBinding.getPath());
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
this.handleCreateEvents(oListBinding);
|
|
128
|
-
|
|
129
|
-
// Iterate on all items and store the corresponding creation promise
|
|
130
|
-
const aCreationPromises = aData.map((mPropertyValues: any) => {
|
|
131
|
-
const mParameters: any = { data: {} };
|
|
132
|
-
|
|
133
|
-
mParameters.keepTransientContextOnFailed = false; // currently not fully supported
|
|
134
|
-
mParameters.busyMode = "None";
|
|
135
|
-
mParameters.creationMode = CreationMode.CreationRow;
|
|
136
|
-
mParameters.parentControl = this.getView();
|
|
137
|
-
mParameters.createAtEnd = bCreateAtEnd;
|
|
138
|
-
mParameters.inactive = bInactive;
|
|
139
|
-
|
|
140
|
-
// Remove navigation properties as we don't support deep create
|
|
141
|
-
for (const sPropertyPath in mPropertyValues) {
|
|
142
|
-
const oProperty = oMetaModel.getObject(`${sMetaPath}/${sPropertyPath}`);
|
|
143
|
-
if (oProperty && oProperty.$kind !== "NavigationProperty" && mPropertyValues[sPropertyPath]) {
|
|
144
|
-
mParameters.data[sPropertyPath] = mPropertyValues[sPropertyPath];
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return transactionHelper.createDocument(
|
|
149
|
-
oListBinding,
|
|
150
|
-
mParameters,
|
|
151
|
-
this.getAppComponent(),
|
|
152
|
-
this.getMessageHandler(),
|
|
153
|
-
bFromCopyPaste,
|
|
154
|
-
this.getView()
|
|
155
|
-
);
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
return Promise.all(aCreationPromises);
|
|
159
|
-
})
|
|
160
|
-
.then((aContexts: any) => {
|
|
161
|
-
if (!bInactive) {
|
|
162
|
-
this.setDocumentModifiedOnCreate(oListBinding);
|
|
163
|
-
}
|
|
164
|
-
// transient contexts are reliably removed once oNewContext.created() is resolved
|
|
165
|
-
aFinalContexts = aContexts;
|
|
166
|
-
return Promise.all(
|
|
167
|
-
aContexts.map(function (oNewContext: any) {
|
|
168
|
-
if (!oNewContext.bInactive) {
|
|
169
|
-
return oNewContext.created();
|
|
170
|
-
}
|
|
171
|
-
})
|
|
172
|
-
);
|
|
173
|
-
})
|
|
174
|
-
.then(() => {
|
|
175
|
-
const oBindingContext = this.getView().getBindingContext();
|
|
176
|
-
|
|
177
|
-
// if there are transient contexts, we must avoid requesting side effects
|
|
178
|
-
// this is avoid a potential list refresh, there could be a side effect that refreshes the list binding
|
|
179
|
-
// if list binding is refreshed, transient contexts might be lost
|
|
180
|
-
if (!CommonUtils.hasTransientContext(oListBinding)) {
|
|
181
|
-
this.getAppComponent()
|
|
182
|
-
.getSideEffectsService()
|
|
183
|
-
.requestSideEffectsForNavigationProperty(oListBinding.getPath(), oBindingContext as Context);
|
|
184
|
-
}
|
|
185
|
-
})
|
|
186
|
-
.catch(function (err: any) {
|
|
187
|
-
Log.error("Error while creating multiple documents.");
|
|
188
|
-
return Promise.reject(err);
|
|
189
|
-
})
|
|
190
|
-
.finally(function () {
|
|
191
|
-
BusyLocker.unlock(oLockObject);
|
|
192
|
-
})
|
|
193
|
-
.then(() => {
|
|
194
|
-
return aFinalContexts;
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
@publicExtension()
|
|
198
|
-
@finalExtension()
|
|
199
|
-
deleteMultipleDocuments(aContexts: any, mParameters: any) {
|
|
200
|
-
const oLockObject = this.getGlobalUIModel();
|
|
201
|
-
const oControl = this.getView().byId(mParameters.controlId);
|
|
202
|
-
if (!oControl) {
|
|
203
|
-
throw new Error("parameter controlId missing or incorrect");
|
|
204
|
-
} else {
|
|
205
|
-
mParameters.parentControl = oControl;
|
|
206
|
-
}
|
|
207
|
-
const oListBinding = (oControl.getBinding("items") || (oControl as Table).getRowBinding()) as ODataListBinding;
|
|
208
|
-
mParameters.bFindActiveContexts = true;
|
|
209
|
-
BusyLocker.lock(oLockObject);
|
|
210
|
-
|
|
211
|
-
return this.deleteDocumentTransaction(aContexts, mParameters)
|
|
212
|
-
.then(() => {
|
|
213
|
-
let oResult;
|
|
214
|
-
|
|
215
|
-
// Multiple object deletion is triggered from a list
|
|
216
|
-
// First clear the selection in the table as it's not valid any more
|
|
217
|
-
if (oControl.isA("sap.ui.mdc.Table")) {
|
|
218
|
-
(oControl as any).clearSelection();
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// Then refresh the list-binding (LR), or require side-effects (OP)
|
|
222
|
-
const oBindingContext = this.getView().getBindingContext();
|
|
223
|
-
if ((oListBinding as any).isRoot()) {
|
|
224
|
-
// keep promise chain pending until refresh of listbinding is completed
|
|
225
|
-
oResult = new Promise<void>((resolve) => {
|
|
226
|
-
oListBinding.attachEventOnce("dataReceived", function () {
|
|
227
|
-
resolve();
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
oListBinding.refresh();
|
|
231
|
-
} else if (oBindingContext) {
|
|
232
|
-
// if there are transient contexts, we must avoid requesting side effects
|
|
233
|
-
// this is avoid a potential list refresh, there could be a side effect that refreshes the list binding
|
|
234
|
-
// if list binding is refreshed, transient contexts might be lost
|
|
235
|
-
if (!CommonUtils.hasTransientContext(oListBinding)) {
|
|
236
|
-
this.getAppComponent()
|
|
237
|
-
.getSideEffectsService()
|
|
238
|
-
.requestSideEffectsForNavigationProperty(oListBinding.getPath(), oBindingContext as Context);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// deleting at least one object should also set the UI to dirty
|
|
243
|
-
if (!this.getAppComponent()._isFclEnabled()) {
|
|
244
|
-
EditState.setEditStateDirty();
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
send(
|
|
248
|
-
this.getView(),
|
|
249
|
-
Activity.Delete,
|
|
250
|
-
aContexts.map((context: Context) => context.getPath())
|
|
251
|
-
);
|
|
252
|
-
|
|
253
|
-
return oResult;
|
|
254
|
-
})
|
|
255
|
-
.catch(function (oError: any) {
|
|
256
|
-
Log.error("Error while deleting the document(s)", oError);
|
|
257
|
-
})
|
|
258
|
-
.finally(function () {
|
|
259
|
-
BusyLocker.unlock(oLockObject);
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Decides if a document is to be shown in display or edit mode.
|
|
265
|
-
*
|
|
266
|
-
* @function
|
|
267
|
-
* @name _computeEditMode
|
|
268
|
-
* @memberof sap.fe.core.controllerextensions.InternalEditFlow
|
|
269
|
-
* @param {sap.ui.model.odata.v4.Context} oContext The context to be displayed or edited
|
|
270
|
-
* @returns {Promise} Promise resolves once the edit mode is computed
|
|
271
|
-
*/
|
|
272
|
-
|
|
273
|
-
@publicExtension()
|
|
274
|
-
@finalExtension()
|
|
275
|
-
async computeEditMode(oContext: any): Promise<void> {
|
|
276
|
-
const sProgrammingModel = this.getProgrammingModel(oContext);
|
|
277
|
-
|
|
278
|
-
if (sProgrammingModel === ProgrammingModel.Draft) {
|
|
279
|
-
try {
|
|
280
|
-
this.setDraftStatus(DraftStatus.Clear);
|
|
281
|
-
this._setEditablePending(true);
|
|
282
|
-
const bIsActiveEntity = await oContext.requestObject("IsActiveEntity");
|
|
283
|
-
if (bIsActiveEntity === false) {
|
|
284
|
-
// in case the document is draft set it in edit mode
|
|
285
|
-
this.setEditMode(EditMode.Editable);
|
|
286
|
-
const bHasActiveEntity = await oContext.requestObject("HasActiveEntity");
|
|
287
|
-
this.setEditMode(undefined, !bHasActiveEntity);
|
|
288
|
-
} else {
|
|
289
|
-
// active document, stay on display mode
|
|
290
|
-
this.setEditMode(EditMode.Display, false);
|
|
291
|
-
}
|
|
292
|
-
this._setEditablePending(false);
|
|
293
|
-
} catch (oError: any) {
|
|
294
|
-
Log.error("Error while determining the editMode for draft", oError);
|
|
295
|
-
throw oError;
|
|
296
|
-
}
|
|
297
|
-
} else if (sProgrammingModel === ProgrammingModel.Sticky) {
|
|
298
|
-
const lastInvokedActionName = this.getInternalModel().getProperty("/lastInvokedAction");
|
|
299
|
-
if (lastInvokedActionName && this._hasNewActionForSticky(oContext, this.getView(), lastInvokedActionName)) {
|
|
300
|
-
this.setEditMode(EditMode.Editable, true);
|
|
301
|
-
if (!this.getAppComponent()._isFclEnabled()) {
|
|
302
|
-
EditState.setEditStateDirty();
|
|
303
|
-
}
|
|
304
|
-
this.handleStickyOn(oContext);
|
|
305
|
-
this.getInternalModel().setProperty("/lastInvokedAction", undefined);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Sets the edit mode.
|
|
312
|
-
*
|
|
313
|
-
* @param sEditMode The edit mode
|
|
314
|
-
* @param bCreationMode True if the object has been newly created
|
|
315
|
-
*/
|
|
316
|
-
@publicExtension()
|
|
317
|
-
@finalExtension()
|
|
318
|
-
setEditMode(sEditMode?: string, bCreationMode?: boolean) {
|
|
319
|
-
// at this point of time it's not meant to release the edit flow for freestyle usage therefore we can
|
|
320
|
-
// rely on the global UI model to exist
|
|
321
|
-
const oGlobalModel = this.getGlobalUIModel();
|
|
322
|
-
|
|
323
|
-
if (sEditMode) {
|
|
324
|
-
oGlobalModel.setProperty("/isEditable", sEditMode === "Editable", undefined, true);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
if (bCreationMode !== undefined) {
|
|
328
|
-
// Since setCreationMode is public in EditFlow and can be overriden, make sure to call it via the controller
|
|
329
|
-
// to ensure any overrides are taken into account
|
|
330
|
-
this.setCreationMode(bCreationMode);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
_setEditablePending(pending: boolean) {
|
|
335
|
-
const globalModel = this.getGlobalUIModel();
|
|
336
|
-
globalModel.setProperty("/isEditablePending", pending, undefined, true);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
@publicExtension()
|
|
340
|
-
@finalExtension()
|
|
341
|
-
setDraftStatus(sDraftState: any) {
|
|
342
|
-
// at this point of time it's not meant to release the edit flow for freestyle usage therefore we can
|
|
343
|
-
// rely on the global UI model to exist
|
|
344
|
-
(this.base.getView().getModel("ui") as JSONModel).setProperty("/draftStatus", sDraftState, undefined, true);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
@publicExtension()
|
|
348
|
-
@finalExtension()
|
|
349
|
-
getRoutingListener() {
|
|
350
|
-
// at this point of time it's not meant to release the edit flow for FPM custom pages and the routing
|
|
351
|
-
// listener is not yet public therefore keep the logic here for now
|
|
352
|
-
|
|
353
|
-
if (this.base._routing) {
|
|
354
|
-
return this.base._routing;
|
|
355
|
-
} else {
|
|
356
|
-
throw new Error("Edit Flow works only with a given routing listener");
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
@publicExtension()
|
|
361
|
-
@finalExtension()
|
|
362
|
-
getGlobalUIModel(): JSONModel {
|
|
363
|
-
// at this point of time it's not meant to release the edit flow for freestyle usage therefore we can
|
|
364
|
-
// rely on the global UI model to exist
|
|
365
|
-
return this.base.getView().getModel("ui") as JSONModel;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Performs a task in sync with other tasks created via this function.
|
|
370
|
-
* Returns the promise chain of the task.
|
|
371
|
-
*
|
|
372
|
-
* @function
|
|
373
|
-
* @name sap.fe.core.controllerextensions.EditFlow#syncTask
|
|
374
|
-
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
375
|
-
* @static
|
|
376
|
-
* @param [vTask] Optional, a promise or function to be executed synchronously
|
|
377
|
-
* @returns Promise resolves once the task is completed
|
|
378
|
-
* @ui5-restricted
|
|
379
|
-
* @final
|
|
380
|
-
*/
|
|
381
|
-
@publicExtension()
|
|
382
|
-
@finalExtension()
|
|
383
|
-
syncTask(vTask?: Function | Promise<any>) {
|
|
384
|
-
let fnNewTask;
|
|
385
|
-
if (vTask instanceof Promise) {
|
|
386
|
-
fnNewTask = function () {
|
|
387
|
-
return vTask;
|
|
388
|
-
};
|
|
389
|
-
} else if (typeof vTask === "function") {
|
|
390
|
-
fnNewTask = vTask;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
this._pTasks = this._pTasks || Promise.resolve();
|
|
394
|
-
if (fnNewTask) {
|
|
395
|
-
this._pTasks = this._pTasks.then(fnNewTask).catch(function () {
|
|
396
|
-
return Promise.resolve();
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
return this._pTasks;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
@publicExtension()
|
|
404
|
-
@finalExtension()
|
|
405
|
-
getProgrammingModel(oContext?: any): typeof ProgrammingModel {
|
|
406
|
-
return this.getTransactionHelper().getProgrammingModel(oContext);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
@publicExtension()
|
|
410
|
-
@finalExtension()
|
|
411
|
-
async deleteDocumentTransaction(oContext: any, mParameters: any): Promise<void> {
|
|
412
|
-
const oResourceBundle = (this.getView().getController() as any).oResourceBundle,
|
|
413
|
-
transactionHelper = this.getTransactionHelper();
|
|
414
|
-
|
|
415
|
-
mParameters = mParameters || {};
|
|
416
|
-
|
|
417
|
-
// TODO: this setting and removing of contexts shouldn't be in the transaction helper at all
|
|
418
|
-
// for the time being I kept it and provide the internal model context to not break something
|
|
419
|
-
mParameters.internalModelContext = mParameters.controlId
|
|
420
|
-
? sap.ui.getCore().byId(mParameters.controlId)?.getBindingContext("internal")
|
|
421
|
-
: null;
|
|
422
|
-
|
|
423
|
-
await this.syncTask();
|
|
424
|
-
await transactionHelper.deleteDocument(oContext, mParameters, this.getAppComponent(), oResourceBundle, this.getMessageHandler());
|
|
425
|
-
const internalModel = this.getInternalModel();
|
|
426
|
-
internalModel.setProperty("/sessionOn", false);
|
|
427
|
-
internalModel.setProperty("/stickySessionToken", undefined);
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Handles the create event: shows messages and in case of a draft, updates the draft indicator.
|
|
432
|
-
*
|
|
433
|
-
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
434
|
-
* @param oBinding OData list binding object
|
|
435
|
-
*/
|
|
436
|
-
@publicExtension()
|
|
437
|
-
@finalExtension()
|
|
438
|
-
handleCreateEvents(oBinding: any) {
|
|
439
|
-
this.setDraftStatus(DraftStatus.Clear);
|
|
440
|
-
|
|
441
|
-
oBinding = (oBinding.getBinding && oBinding.getBinding()) || oBinding;
|
|
442
|
-
const sProgrammingModel = this.getProgrammingModel(oBinding);
|
|
443
|
-
|
|
444
|
-
oBinding.attachEvent("createSent", () => {
|
|
445
|
-
if (sProgrammingModel === ProgrammingModel.Draft) {
|
|
446
|
-
this.setDraftStatus(DraftStatus.Saving);
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
oBinding.attachEvent("createCompleted", (oEvent: any) => {
|
|
450
|
-
const bSuccess = oEvent.getParameter("success");
|
|
451
|
-
if (sProgrammingModel === ProgrammingModel.Draft) {
|
|
452
|
-
this.setDraftStatus(bSuccess ? DraftStatus.Saved : DraftStatus.Clear);
|
|
453
|
-
}
|
|
454
|
-
this.getMessageHandler().showMessageDialog();
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
@publicExtension()
|
|
459
|
-
@finalExtension()
|
|
460
|
-
getTransactionHelper() {
|
|
461
|
-
return TransactionHelper;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
@publicExtension()
|
|
465
|
-
@finalExtension()
|
|
466
|
-
getInternalModel(): JSONModel {
|
|
467
|
-
return this.base.getView().getModel("internal") as JSONModel;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
* Creates a new promise to wait for an action to be executed
|
|
472
|
-
*
|
|
473
|
-
* @function
|
|
474
|
-
* @name _createActionPromise
|
|
475
|
-
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
476
|
-
* @returns {Function} The resolver function which can be used to externally resolve the promise
|
|
477
|
-
*/
|
|
478
|
-
|
|
479
|
-
@publicExtension()
|
|
480
|
-
@finalExtension()
|
|
481
|
-
createActionPromise(sActionName: any, sControlId: any) {
|
|
482
|
-
let fResolver, fRejector;
|
|
483
|
-
this.oActionPromise = new Promise((resolve, reject) => {
|
|
484
|
-
fResolver = resolve;
|
|
485
|
-
fRejector = reject;
|
|
486
|
-
}).then((oResponse: any) => {
|
|
487
|
-
return Object.assign({ controlId: sControlId }, this.getActionResponseDataAndKeys(sActionName, oResponse));
|
|
488
|
-
});
|
|
489
|
-
return { fResolver: fResolver, fRejector: fRejector };
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Gets the getCurrentActionPromise object.
|
|
494
|
-
*
|
|
495
|
-
* @function
|
|
496
|
-
* @name _getCurrentActionPromise
|
|
497
|
-
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
498
|
-
* @returns Returns the promise
|
|
499
|
-
*/
|
|
500
|
-
@publicExtension()
|
|
501
|
-
@finalExtension()
|
|
502
|
-
getCurrentActionPromise() {
|
|
503
|
-
return this.oActionPromise;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
@publicExtension()
|
|
507
|
-
@finalExtension()
|
|
508
|
-
deleteCurrentActionPromise() {
|
|
509
|
-
this.oActionPromise = undefined;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* @function
|
|
514
|
-
* @name getActionResponseDataAndKeys
|
|
515
|
-
* @memberof sap.fe.core.controllerextensions.EditFlow
|
|
516
|
-
* @param sActionName The name of the action that is executed
|
|
517
|
-
* @param oResponse The bound action's response data or response context
|
|
518
|
-
* @returns Object with data and names of the key fields of the response
|
|
519
|
-
*/
|
|
520
|
-
@publicExtension()
|
|
521
|
-
@finalExtension()
|
|
522
|
-
getActionResponseDataAndKeys(sActionName: string, oResponse: any) {
|
|
523
|
-
if (Array.isArray(oResponse)) {
|
|
524
|
-
if (oResponse.length === 1) {
|
|
525
|
-
oResponse = oResponse[0].value;
|
|
526
|
-
} else {
|
|
527
|
-
return null;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
if (!oResponse) {
|
|
531
|
-
return null;
|
|
532
|
-
}
|
|
533
|
-
const oView = this.getView(),
|
|
534
|
-
oMetaModel = (oView.getModel().getMetaModel() as any).getData(),
|
|
535
|
-
sActionReturnType =
|
|
536
|
-
oMetaModel && oMetaModel[sActionName] && oMetaModel[sActionName][0] && oMetaModel[sActionName][0].$ReturnType
|
|
537
|
-
? oMetaModel[sActionName][0].$ReturnType.$Type
|
|
538
|
-
: null,
|
|
539
|
-
aKey = sActionReturnType && oMetaModel[sActionReturnType] ? oMetaModel[sActionReturnType].$Key : null;
|
|
540
|
-
|
|
541
|
-
return {
|
|
542
|
-
oData: oResponse.getObject(),
|
|
543
|
-
keys: aKey
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
@publicExtension()
|
|
548
|
-
@finalExtension()
|
|
549
|
-
getMessageHandler() {
|
|
550
|
-
// at this point of time it's not meant to release the edit flow for FPM custom pages therefore keep
|
|
551
|
-
// the logic here for now
|
|
552
|
-
|
|
553
|
-
if (this.base.messageHandler) {
|
|
554
|
-
return this.base.messageHandler;
|
|
555
|
-
} else {
|
|
556
|
-
throw new Error("Edit Flow works only with a given message handler");
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
@publicExtension()
|
|
561
|
-
@finalExtension()
|
|
562
|
-
handleStickyOn(oContext: Context) {
|
|
563
|
-
const oAppComponent = this.getAppComponent();
|
|
564
|
-
|
|
565
|
-
try {
|
|
566
|
-
if (oAppComponent === undefined || oContext === undefined) {
|
|
567
|
-
throw new Error("undefined AppComponent or Context for function handleStickyOn");
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
if (!oAppComponent.getRouterProxy().hasNavigationGuard()) {
|
|
571
|
-
const sHashTracker = oAppComponent.getRouterProxy().getHash(),
|
|
572
|
-
oInternalModel = this.getInternalModel();
|
|
573
|
-
|
|
574
|
-
// Set a guard in the RouterProxy
|
|
575
|
-
// A timeout is necessary, as with deferred creation the hashChanger is not updated yet with
|
|
576
|
-
// the new hash, and the guard cannot be found in the managed history of the router proxy
|
|
577
|
-
setTimeout(function () {
|
|
578
|
-
oAppComponent.getRouterProxy().setNavigationGuard(oContext.getPath().substring(1));
|
|
579
|
-
}, 0);
|
|
580
|
-
|
|
581
|
-
// Setting back navigation on shell service, to get the dicard message box in case of sticky
|
|
582
|
-
oAppComponent.getShellServices().setBackNavigation(this.onBackNavigationInSession.bind(this));
|
|
583
|
-
|
|
584
|
-
this.fnDirtyStateProvider = this._registerDirtyStateProvider(oAppComponent, oInternalModel, sHashTracker);
|
|
585
|
-
oAppComponent.getShellServices().registerDirtyStateProvider(this.fnDirtyStateProvider);
|
|
586
|
-
|
|
587
|
-
// handle session timeout
|
|
588
|
-
const i18nModel = this.getView().getModel("sap.fe.i18n");
|
|
589
|
-
this.fnHandleSessionTimeout = this._attachSessionTimeout(oContext, i18nModel);
|
|
590
|
-
(this.getView().getModel() as any).attachSessionTimeout(this.fnHandleSessionTimeout);
|
|
591
|
-
|
|
592
|
-
this.fnStickyDiscardAfterNavigation = this._attachRouteMatched(this, oContext, oAppComponent);
|
|
593
|
-
oAppComponent.getRoutingService().attachRouteMatched(this.fnStickyDiscardAfterNavigation);
|
|
594
|
-
}
|
|
595
|
-
} catch (error) {
|
|
596
|
-
Log.info(error as any);
|
|
597
|
-
return undefined;
|
|
598
|
-
}
|
|
599
|
-
return true;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
@publicExtension()
|
|
603
|
-
@finalExtension()
|
|
604
|
-
handleStickyOff() {
|
|
605
|
-
const oAppComponent = this.getAppComponent();
|
|
606
|
-
try {
|
|
607
|
-
if (oAppComponent === undefined) {
|
|
608
|
-
throw new Error("undefined AppComponent for function handleStickyOff");
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
if (oAppComponent && oAppComponent.getRouterProxy) {
|
|
612
|
-
// If we have exited from the app, CommonUtils.getAppComponent doesn't return a
|
|
613
|
-
// sap.fe.core.AppComponent, hence the 'if' above
|
|
614
|
-
oAppComponent.getRouterProxy().discardNavigationGuard();
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
if (this.fnDirtyStateProvider) {
|
|
618
|
-
oAppComponent.getShellServices().deregisterDirtyStateProvider(this.fnDirtyStateProvider);
|
|
619
|
-
this.fnDirtyStateProvider = undefined;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
if (this.getView().getModel() && this.fnHandleSessionTimeout) {
|
|
623
|
-
(this.getView().getModel() as any).detachSessionTimeout(this.fnHandleSessionTimeout);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
oAppComponent.getRoutingService().detachRouteMatched(this.fnStickyDiscardAfterNavigation);
|
|
627
|
-
this.fnStickyDiscardAfterNavigation = undefined;
|
|
628
|
-
|
|
629
|
-
this.setEditMode(EditMode.Display, false);
|
|
630
|
-
|
|
631
|
-
if (oAppComponent) {
|
|
632
|
-
// If we have exited from the app, CommonUtils.getAppComponent doesn't return a
|
|
633
|
-
// sap.fe.core.AppComponent, hence the 'if' above
|
|
634
|
-
oAppComponent.getShellServices().setBackNavigation();
|
|
635
|
-
}
|
|
636
|
-
} catch (error) {
|
|
637
|
-
Log.info(error as any);
|
|
638
|
-
return undefined;
|
|
639
|
-
}
|
|
640
|
-
return true;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* @description Method to display a 'discard' popover when exiting a sticky session.
|
|
645
|
-
* @function
|
|
646
|
-
* @name onBackNavigationInSession
|
|
647
|
-
* @memberof sap.fe.core.controllerextensions.InternalEditFlow
|
|
648
|
-
*/
|
|
649
|
-
@publicExtension()
|
|
650
|
-
@finalExtension()
|
|
651
|
-
onBackNavigationInSession() {
|
|
652
|
-
const oView = this.getView(),
|
|
653
|
-
oAppComponent = this.getAppComponent(),
|
|
654
|
-
oRouterProxy = oAppComponent.getRouterProxy();
|
|
655
|
-
|
|
656
|
-
if (oRouterProxy.checkIfBackIsOutOfGuard()) {
|
|
657
|
-
const oBindingContext = oView && oView.getBindingContext();
|
|
658
|
-
|
|
659
|
-
sticky.processDataLossConfirmation(
|
|
660
|
-
async () => {
|
|
661
|
-
await this.discardStickySession(oBindingContext);
|
|
662
|
-
history.back();
|
|
663
|
-
},
|
|
664
|
-
oView,
|
|
665
|
-
this.getProgrammingModel(oBindingContext)
|
|
666
|
-
);
|
|
667
|
-
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
history.back();
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
@publicExtension()
|
|
674
|
-
@finalExtension()
|
|
675
|
-
async discardStickySession(oContext: any) {
|
|
676
|
-
const discardedContext = await sticky.discardDocument(oContext);
|
|
677
|
-
if (discardedContext?.hasPendingChanges()) {
|
|
678
|
-
discardedContext.getBinding().resetChanges();
|
|
679
|
-
}
|
|
680
|
-
discardedContext?.refresh();
|
|
681
|
-
this.handleStickyOff();
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
_hasNewActionForSticky(oContext: any, oView: View, sCustomAction: string) {
|
|
685
|
-
try {
|
|
686
|
-
if (oContext === undefined || oView === undefined) {
|
|
687
|
-
throw new Error("Invalid input parameters for function _hasNewActionForSticky");
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
const oMetaModel = oView.getModel().getMetaModel() as ODataMetaModel,
|
|
691
|
-
sMetaPath = oContext.getPath().substring(0, oContext.getPath().indexOf("(")),
|
|
692
|
-
oStickySession = oMetaModel.getObject(`${sMetaPath}@com.sap.vocabularies.Session.v1.StickySessionSupported`);
|
|
693
|
-
|
|
694
|
-
if (oStickySession && oStickySession.NewAction && oStickySession.NewAction === sCustomAction) {
|
|
695
|
-
return true;
|
|
696
|
-
} else if (oStickySession && oStickySession.AdditionalNewActions) {
|
|
697
|
-
return sCustomAction ===
|
|
698
|
-
oStickySession.AdditionalNewActions.find(function (sAdditionalAction: string) {
|
|
699
|
-
return sAdditionalAction === sCustomAction;
|
|
700
|
-
})
|
|
701
|
-
? true
|
|
702
|
-
: false;
|
|
703
|
-
} else {
|
|
704
|
-
return false;
|
|
705
|
-
}
|
|
706
|
-
} catch (error) {
|
|
707
|
-
Log.info(error as any);
|
|
708
|
-
return undefined;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
_registerDirtyStateProvider(oAppComponent: AppComponent, oInternalModel: JSONModel, sHashTracker: string) {
|
|
713
|
-
return function fnDirtyStateProvider(oNavigationContext: any) {
|
|
714
|
-
try {
|
|
715
|
-
if (oNavigationContext === undefined) {
|
|
716
|
-
throw new Error("Invalid input parameters for function fnDirtyStateProvider");
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
const sTargetHash = oNavigationContext.innerAppRoute,
|
|
720
|
-
oRouterProxy = oAppComponent.getRouterProxy();
|
|
721
|
-
let sLclHashTracker = "";
|
|
722
|
-
let bDirty: boolean;
|
|
723
|
-
const bSessionON = oInternalModel.getProperty("/sessionOn");
|
|
724
|
-
|
|
725
|
-
if (!bSessionON) {
|
|
726
|
-
// If the sticky session was terminated before hand.
|
|
727
|
-
// Eexample in case of navigating away from application using IBN.
|
|
728
|
-
return undefined;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
if (!oRouterProxy.isNavigationFinalized()) {
|
|
732
|
-
// If navigation is currently happening in RouterProxy, it's a transient state
|
|
733
|
-
// (not dirty)
|
|
734
|
-
bDirty = false;
|
|
735
|
-
sLclHashTracker = sTargetHash;
|
|
736
|
-
} else if (sHashTracker === sTargetHash) {
|
|
737
|
-
// the hash didn't change so either the user attempts to refresh or to leave the app
|
|
738
|
-
bDirty = true;
|
|
739
|
-
} else if (oRouterProxy.checkHashWithGuard(sTargetHash) || oRouterProxy.isGuardCrossAllowedByUser()) {
|
|
740
|
-
// the user attempts to navigate within the root object
|
|
741
|
-
// or crossing the guard has already been allowed by the RouterProxy
|
|
742
|
-
sLclHashTracker = sTargetHash;
|
|
743
|
-
bDirty = false;
|
|
744
|
-
} else {
|
|
745
|
-
// the user attempts to navigate within the app, for example back to the list report
|
|
746
|
-
bDirty = true;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
if (bDirty) {
|
|
750
|
-
// the FLP doesn't call the dirty state provider anymore once it's dirty, as they can't
|
|
751
|
-
// change this due to compatibility reasons we set it back to not-dirty
|
|
752
|
-
setTimeout(function () {
|
|
753
|
-
oAppComponent.getShellServices().setDirtyFlag(false);
|
|
754
|
-
}, 0);
|
|
755
|
-
} else {
|
|
756
|
-
sHashTracker = sLclHashTracker;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
return bDirty;
|
|
760
|
-
} catch (error) {
|
|
761
|
-
Log.info(error as any);
|
|
762
|
-
return undefined;
|
|
763
|
-
}
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
_attachSessionTimeout(oContext: any, i18nModel: Model) {
|
|
768
|
-
return () => {
|
|
769
|
-
try {
|
|
770
|
-
if (oContext === undefined) {
|
|
771
|
-
throw new Error("Context missing for function fnHandleSessionTimeout");
|
|
772
|
-
}
|
|
773
|
-
// remove transient messages since we will showing our own message
|
|
774
|
-
this.getMessageHandler().removeTransitionMessages();
|
|
775
|
-
|
|
776
|
-
const oDialog = new Dialog({
|
|
777
|
-
title: "{sap.fe.i18n>C_EDITFLOW_OBJECT_PAGE_SESSION_EXPIRED_DIALOG_TITLE}",
|
|
778
|
-
state: "Warning",
|
|
779
|
-
content: new Text({ text: "{sap.fe.i18n>C_EDITFLOW_OBJECT_PAGE_SESSION_EXPIRED_DIALOG_MESSAGE}" }),
|
|
780
|
-
beginButton: new Button({
|
|
781
|
-
text: "{sap.fe.i18n>C_COMMON_DIALOG_OK}",
|
|
782
|
-
type: "Emphasized",
|
|
783
|
-
press: () => {
|
|
784
|
-
// remove sticky handling after navigation since session has already been terminated
|
|
785
|
-
this.handleStickyOff();
|
|
786
|
-
this.getRoutingListener().navigateBackFromContext(oContext);
|
|
787
|
-
}
|
|
788
|
-
}),
|
|
789
|
-
afterClose: function () {
|
|
790
|
-
oDialog.destroy();
|
|
791
|
-
}
|
|
792
|
-
});
|
|
793
|
-
oDialog.addStyleClass("sapUiContentPadding");
|
|
794
|
-
oDialog.setModel(i18nModel, "sap.fe.i18n");
|
|
795
|
-
this.getView().addDependent(oDialog);
|
|
796
|
-
oDialog.open();
|
|
797
|
-
} catch (error) {
|
|
798
|
-
Log.info(error as any);
|
|
799
|
-
return undefined;
|
|
800
|
-
}
|
|
801
|
-
return true;
|
|
802
|
-
};
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
_attachRouteMatched(oFnContext: any, oContext: any, oAppComponent: AppComponent) {
|
|
806
|
-
return function fnStickyDiscardAfterNavigation() {
|
|
807
|
-
const sCurrentHash = oAppComponent.getRouterProxy().getHash();
|
|
808
|
-
// either current hash is empty so the user left the app or he navigated away from the object
|
|
809
|
-
if (!sCurrentHash || !oAppComponent.getRouterProxy().checkHashWithGuard(sCurrentHash)) {
|
|
810
|
-
oFnContext.discardStickySession(oContext);
|
|
811
|
-
setTimeout(() => {
|
|
812
|
-
//clear the session context to ensure the LR refreshes the list without a session
|
|
813
|
-
oContext.getModel().clearSessionContext();
|
|
814
|
-
}, 0);
|
|
815
|
-
}
|
|
816
|
-
};
|
|
817
|
-
}
|
|
818
|
-
_scrollAndFocusOnInactiveRow(table: Table) {
|
|
819
|
-
const rowBinding = table.getRowBinding() as ODataListBinding;
|
|
820
|
-
const activeRowIndex: number = rowBinding.getCount() || 0;
|
|
821
|
-
if (table.data("tableType") !== "ResponsiveTable") {
|
|
822
|
-
if (activeRowIndex > 0) {
|
|
823
|
-
table.scrollToIndex(activeRowIndex - 1);
|
|
824
|
-
}
|
|
825
|
-
table.focusRow(activeRowIndex, true);
|
|
826
|
-
} else {
|
|
827
|
-
/* In a responsive table, the empty rows appear at the beginning of the table. But when we create more, they appear below the new line.
|
|
828
|
-
* So we check the first inactive row first, then we set the focus on it when we press the button.
|
|
829
|
-
* This doesn't impact the GridTable because they appear at the end, and we already focus the before-the-last row (because 2 empty rows exist)
|
|
830
|
-
*/
|
|
831
|
-
const allRowContexts = rowBinding.getContexts();
|
|
832
|
-
if (!allRowContexts?.length) {
|
|
833
|
-
table.focusRow(activeRowIndex, true);
|
|
834
|
-
return;
|
|
835
|
-
}
|
|
836
|
-
let focusRow = activeRowIndex,
|
|
837
|
-
index = 0;
|
|
838
|
-
for (const singleContext of allRowContexts) {
|
|
839
|
-
if (singleContext.isInactive() && index < focusRow) {
|
|
840
|
-
focusRow = index;
|
|
841
|
-
}
|
|
842
|
-
index++;
|
|
843
|
-
}
|
|
844
|
-
if (focusRow > 0) {
|
|
845
|
-
table.scrollToIndex(focusRow);
|
|
846
|
-
}
|
|
847
|
-
table.focusRow(focusRow, true);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
async createEmptyRowsAndFocus(table: Table) {
|
|
851
|
-
const tableAPI = table.getParent() as TableAPI;
|
|
852
|
-
if (
|
|
853
|
-
tableAPI?.tableDefinition?.control?.inlineCreationRowsHiddenInEditMode &&
|
|
854
|
-
!table.getBindingContext("ui")?.getProperty("createMode")
|
|
855
|
-
) {
|
|
856
|
-
// With the parameter, we don't have empty rows in Edit mode, so we need to create them before setting the focus on them
|
|
857
|
-
await tableAPI.setUpEmptyRows(table, true);
|
|
858
|
-
}
|
|
859
|
-
this._scrollAndFocusOnInactiveRow(table);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
export default InternalEditFlow;
|