@sapui5/sap.fe.core 1.99.0 → 1.101.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -4
- package/src/sap/fe/core/.library +2 -3
- package/src/sap/fe/core/AnnotationHelper.js +43 -92
- package/src/sap/fe/core/AnnotationHelper.ts +43 -107
- package/src/sap/fe/core/AppComponent.js +381 -399
- package/src/sap/fe/core/AppComponent.ts +397 -0
- package/src/sap/fe/core/AppStateHandler.js +131 -162
- package/src/sap/fe/core/AppStateHandler.ts +2 -2
- package/src/sap/fe/core/BaseController.js +82 -58
- package/src/sap/fe/core/BaseController.ts +67 -0
- package/src/sap/fe/core/CommonUtils.js +179 -31
- package/src/sap/fe/core/CommonUtils.ts +295 -125
- package/src/sap/fe/core/ExtensionAPI.js +279 -274
- package/src/sap/fe/core/ExtensionAPI.ts +242 -0
- package/src/sap/fe/core/PageController.js +158 -29
- package/src/sap/fe/core/PageController.ts +65 -37
- package/src/sap/fe/core/RouterProxy.js +700 -750
- package/src/sap/fe/core/RouterProxy.ts +47 -31
- package/src/sap/fe/core/Synchronization.js +21 -31
- package/src/sap/fe/core/TemplateComponent.js +193 -118
- package/src/sap/fe/core/TemplateComponent.ts +104 -109
- package/src/sap/fe/core/TemplateModel.js +24 -44
- package/src/sap/fe/core/TemplateModel.ts +3 -3
- package/src/sap/fe/core/TransactionHelper.js +1368 -1369
- package/src/sap/fe/core/TransactionHelper.ts +201 -171
- package/src/sap/fe/core/actions/collaboration/ActivitySync.js +406 -0
- package/src/sap/fe/core/actions/collaboration/ActivitySync.ts +362 -0
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +146 -0
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.ts +129 -0
- package/src/sap/fe/core/actions/collaboration/Manage.js +264 -0
- package/src/sap/fe/core/actions/collaboration/Manage.ts +246 -0
- package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +100 -0
- package/src/sap/fe/core/actions/collaboration/UserDetails.fragment.xml +13 -0
- package/src/sap/fe/core/actions/draft.js +324 -220
- package/src/sap/fe/core/actions/draft.ts +209 -133
- package/src/sap/fe/core/actions/messageHandling.js +79 -48
- package/src/sap/fe/core/actions/messageHandling.ts +113 -83
- package/src/sap/fe/core/actions/operations.js +37 -18
- package/src/sap/fe/core/actions/operations.ts +51 -20
- package/src/sap/fe/core/actions/sticky.js +17 -4
- package/src/sap/fe/core/actions/sticky.ts +21 -4
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +60 -0
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +37 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +165 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +178 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +707 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +628 -0
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +436 -0
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +431 -0
- package/src/sap/fe/core/controllerextensions/EditFlow.js +1854 -1669
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +1792 -0
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +79 -54
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +60 -0
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +716 -779
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +785 -0
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +796 -816
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +810 -0
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +1056 -1005
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +1001 -0
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +498 -532
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +13 -12
- package/src/sap/fe/core/controllerextensions/MassEdit.js +141 -169
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +155 -0
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +221 -244
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +215 -0
- package/src/sap/fe/core/controllerextensions/PageReady.js +312 -345
- package/src/sap/fe/core/controllerextensions/PageReady.ts +57 -53
- package/src/sap/fe/core/controllerextensions/Paginator.js +188 -175
- package/src/sap/fe/core/controllerextensions/Paginator.ts +169 -0
- package/src/sap/fe/core/controllerextensions/Placeholder.js +157 -149
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +149 -0
- package/src/sap/fe/core/controllerextensions/Routing.js +144 -125
- package/src/sap/fe/core/controllerextensions/Routing.ts +131 -0
- package/src/sap/fe/core/controllerextensions/RoutingListener.js +7 -6
- package/src/sap/fe/core/controllerextensions/RoutingListener.ts +3 -0
- package/src/sap/fe/core/controllerextensions/Share.js +230 -268
- package/src/sap/fe/core/controllerextensions/Share.ts +231 -0
- package/src/sap/fe/core/controllerextensions/SideEffects.js +603 -644
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +68 -68
- package/src/sap/fe/core/controllerextensions/ViewState.js +774 -806
- package/src/sap/fe/core/controllerextensions/ViewState.ts +796 -0
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +2 -2
- package/src/sap/fe/core/controls/ActionPartial.fragment.xml +2 -2
- package/src/sap/fe/core/controls/Any.js +28 -0
- package/src/sap/fe/core/controls/Any.ts +30 -0
- package/src/sap/fe/core/controls/CommandExecution.js +92 -68
- package/src/sap/fe/core/controls/CommandExecution.ts +72 -0
- package/src/sap/fe/core/controls/ConditionalWrapper.js +165 -79
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +74 -0
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +366 -0
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +278 -0
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +167 -125
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +116 -0
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +44 -5
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +163 -122
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +155 -0
- package/src/sap/fe/core/controls/FieldWrapper.js +212 -141
- package/src/sap/fe/core/controls/FieldWrapper.ts +104 -0
- package/src/sap/fe/core/controls/FileWrapper.js +313 -0
- package/src/sap/fe/core/controls/FileWrapper.ts +169 -0
- package/src/sap/fe/core/controls/FilterBar.js +197 -159
- package/src/sap/fe/core/controls/FilterBar.ts +148 -0
- package/src/sap/fe/core/controls/FormElementWrapper.js +100 -39
- package/src/sap/fe/core/controls/FormElementWrapper.ts +37 -0
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +37 -42
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.ts +31 -0
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +147 -115
- package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +102 -0
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +300 -265
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +252 -0
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +185 -140
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +125 -0
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +335 -322
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +337 -0
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +37 -42
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +75 -74
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +71 -0
- package/src/sap/fe/core/converters/ConverterContext.js +348 -379
- package/src/sap/fe/core/converters/ConverterContext.ts +19 -16
- package/src/sap/fe/core/converters/ManifestSettings.js +13 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +17 -2
- package/src/sap/fe/core/converters/ManifestWrapper.js +354 -378
- package/src/sap/fe/core/converters/ManifestWrapper.ts +10 -0
- package/src/sap/fe/core/converters/MetaModelConverter.js +6 -4
- package/src/sap/fe/core/converters/MetaModelConverter.ts +5 -2
- package/src/sap/fe/core/converters/TemplateConverter.js +1 -1
- package/src/sap/fe/core/converters/TemplateConverter.ts +2 -1
- package/src/sap/fe/core/converters/annotations/DataField.js +26 -13
- package/src/sap/fe/core/converters/annotations/DataField.ts +40 -17
- package/src/sap/fe/core/converters/controls/Common/Action.js +10 -10
- package/src/sap/fe/core/converters/controls/Common/Action.ts +20 -19
- package/src/sap/fe/core/converters/controls/Common/Chart.js +8 -8
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +12 -11
- package/src/sap/fe/core/converters/controls/Common/Form.js +6 -6
- package/src/sap/fe/core/converters/controls/Common/Form.ts +7 -3
- package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +2 -2
- package/src/sap/fe/core/converters/controls/Common/Table.js +326 -86
- package/src/sap/fe/core/converters/controls/Common/Table.ts +384 -167
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +120 -55
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +158 -98
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +206 -223
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +263 -287
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +6 -6
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +20 -18
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +5 -2
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +4 -1
- package/src/sap/fe/core/converters/helpers/Aggregation.js +115 -133
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +20 -6
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +16 -4
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +12 -1
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +11 -0
- package/src/sap/fe/core/converters/helpers/Key.js +42 -57
- package/src/sap/fe/core/converters/helpers/Key.ts +1 -1
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +1 -1
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +0 -4
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +51 -27
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +69 -43
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +42 -25
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +91 -65
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +11 -9
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +8 -8
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +92 -98
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +91 -0
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +104 -0
- package/src/sap/fe/core/formatters/CollaborationFormatter.ts +60 -0
- package/src/sap/fe/core/formatters/KPIFormatter.js +3 -12
- package/src/sap/fe/core/formatters/KPIFormatter.ts +3 -2
- package/src/sap/fe/core/formatters/TableFormatter.js +53 -2
- package/src/sap/fe/core/formatters/TableFormatter.ts +51 -0
- package/src/sap/fe/core/formatters/ValueFormatter.js +4 -4
- package/src/sap/fe/core/formatters/ValueFormatter.ts +4 -7
- package/src/sap/fe/core/fpm/Component.js +80 -55
- package/src/sap/fe/core/fpm/Component.ts +43 -0
- package/src/sap/fe/core/helpers/AppStartupHelper.js +323 -309
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +363 -337
- package/src/sap/fe/core/helpers/BindingExpression.js +7 -7
- package/src/sap/fe/core/helpers/BindingExpression.ts +7 -7
- package/src/sap/fe/core/helpers/ClassSupport.js +307 -166
- package/src/sap/fe/core/helpers/ClassSupport.ts +348 -155
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +5 -4
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -5
- package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
- package/src/sap/fe/core/helpers/FPMHelper.ts +1 -1
- package/src/sap/fe/core/helpers/MassEditHelper.js +735 -684
- package/src/sap/fe/core/helpers/MassEditHelper.ts +803 -0
- package/src/sap/fe/core/helpers/ModelHelper.js +53 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +46 -0
- package/src/sap/fe/core/helpers/PasteHelper.js +4 -4
- package/src/sap/fe/core/helpers/PasteHelper.ts +4 -3
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +7 -3
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +7 -1
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.js +1 -7
- package/src/sap/fe/core/helpers/StableIdHelper.ts +0 -4
- package/src/sap/fe/core/jsx-runtime/jsx.js +35 -5
- package/src/sap/fe/core/jsx-runtime/jsx.ts +22 -8
- package/src/sap/fe/core/library.js +425 -451
- package/src/sap/fe/core/library.support.js +22 -33
- package/src/sap/fe/core/library.support.ts +23 -0
- package/src/sap/fe/core/library.ts +420 -0
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +5 -3
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +4 -4
- package/src/sap/fe/core/messagebundle.properties +45 -13
- package/src/sap/fe/core/messagebundle_ar.properties +29 -7
- package/src/sap/fe/core/messagebundle_bg.properties +29 -7
- package/src/sap/fe/core/messagebundle_ca.properties +29 -7
- package/src/sap/fe/core/messagebundle_cs.properties +29 -7
- package/src/sap/fe/core/messagebundle_cy.properties +29 -7
- package/src/sap/fe/core/messagebundle_da.properties +29 -7
- package/src/sap/fe/core/messagebundle_de.properties +29 -7
- package/src/sap/fe/core/messagebundle_el.properties +29 -7
- package/src/sap/fe/core/messagebundle_en.properties +29 -7
- package/src/sap/fe/core/messagebundle_en_GB.properties +29 -7
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +29 -7
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +29 -7
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +29 -7
- package/src/sap/fe/core/messagebundle_es.properties +29 -7
- package/src/sap/fe/core/messagebundle_es_MX.properties +29 -7
- package/src/sap/fe/core/messagebundle_et.properties +29 -7
- package/src/sap/fe/core/messagebundle_fi.properties +30 -8
- package/src/sap/fe/core/messagebundle_fr.properties +31 -9
- package/src/sap/fe/core/messagebundle_fr_CA.properties +31 -9
- package/src/sap/fe/core/messagebundle_hi.properties +29 -7
- package/src/sap/fe/core/messagebundle_hr.properties +29 -7
- package/src/sap/fe/core/messagebundle_hu.properties +29 -7
- package/src/sap/fe/core/messagebundle_id.properties +29 -7
- package/src/sap/fe/core/messagebundle_it.properties +29 -7
- package/src/sap/fe/core/messagebundle_iw.properties +29 -7
- package/src/sap/fe/core/messagebundle_ja.properties +28 -6
- package/src/sap/fe/core/messagebundle_kk.properties +29 -7
- package/src/sap/fe/core/messagebundle_ko.properties +29 -7
- package/src/sap/fe/core/messagebundle_lt.properties +29 -7
- package/src/sap/fe/core/messagebundle_lv.properties +30 -8
- package/src/sap/fe/core/messagebundle_ms.properties +29 -7
- package/src/sap/fe/core/messagebundle_nl.properties +29 -7
- package/src/sap/fe/core/messagebundle_no.properties +29 -7
- package/src/sap/fe/core/messagebundle_pl.properties +29 -7
- package/src/sap/fe/core/messagebundle_pt.properties +30 -8
- package/src/sap/fe/core/messagebundle_pt_PT.properties +29 -7
- package/src/sap/fe/core/messagebundle_ro.properties +29 -7
- package/src/sap/fe/core/messagebundle_ru.properties +29 -7
- package/src/sap/fe/core/messagebundle_sh.properties +29 -7
- package/src/sap/fe/core/messagebundle_sk.properties +29 -7
- package/src/sap/fe/core/messagebundle_sl.properties +29 -7
- package/src/sap/fe/core/messagebundle_sv.properties +30 -8
- package/src/sap/fe/core/messagebundle_th.properties +28 -6
- package/src/sap/fe/core/messagebundle_tr.properties +32 -10
- package/src/sap/fe/core/messagebundle_uk.properties +29 -7
- package/src/sap/fe/core/messagebundle_vi.properties +29 -7
- package/src/sap/fe/core/messagebundle_zh_CN.properties +29 -7
- package/src/sap/fe/core/messagebundle_zh_TW.properties +29 -7
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +47 -73
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +158 -196
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +5 -6
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +70 -96
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +7 -6
- package/src/sap/fe/core/services/NavigationServiceFactory.js +287 -342
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +11 -14
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +70 -105
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +6 -3
- package/src/sap/fe/core/services/RoutingServiceFactory.js +796 -820
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +62 -53
- package/src/sap/fe/core/services/ShellServicesFactory.js +694 -741
- package/src/sap/fe/core/services/ShellServicesFactory.ts +33 -33
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +570 -595
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +23 -4
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +357 -389
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +25 -29
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +43 -5
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +7 -4
- package/src/sap/fe/core/support/CommonHelper.js +1 -1
- package/src/sap/fe/core/support/CommonHelper.ts +1 -4
- package/src/sap/fe/core/support/Diagnostics.js +36 -48
- package/src/sap/fe/core/templating/DataModelPathHelper.js +91 -90
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +126 -123
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +23 -3
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +26 -5
- package/src/sap/fe/core/templating/FilterHelper.js +25 -32
- package/src/sap/fe/core/templating/FilterHelper.ts +36 -35
- package/src/sap/fe/core/templating/PropertyHelper.js +16 -2
- package/src/sap/fe/core/templating/PropertyHelper.ts +31 -24
- package/src/sap/fe/core/templating/UIFormatters.js +150 -44
- package/src/sap/fe/core/templating/UIFormatters.ts +165 -67
- package/src/sap/fe/core/type/Email.js +26 -8
- package/src/sap/fe/core/type/Email.ts +8 -7
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +0 -75
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DataField, UIAnnotationTerms, UIAnnotationTypes } from "@sap-ux/vocabularies-types";
|
|
2
2
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import { ConverterAction } from "sap/fe/core/converters/controls/Common/Action";
|
|
4
|
+
import { ManifestAction } from "sap/fe/core/converters/ManifestSettings";
|
|
5
|
+
import { BindingExpression, compileBinding, Expression, fn, or, ref, resolveBindingString } from "sap/fe/core/helpers/BindingExpression";
|
|
5
6
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
7
|
+
import { generate } from "sap/fe/core/helpers/StableIdHelper";
|
|
8
|
+
import mLibrary from "sap/m/library";
|
|
9
|
+
import ODataModelAnnotationHelper from "sap/ui/model/odata/v4/AnnotationHelper";
|
|
8
10
|
const ButtonType = mLibrary.ButtonType;
|
|
9
11
|
const AnnotationHelper = {
|
|
10
12
|
/* this helper can be activated to debug template processing
|
|
@@ -13,91 +15,21 @@ const AnnotationHelper = {
|
|
|
13
15
|
},
|
|
14
16
|
*/
|
|
15
17
|
|
|
16
|
-
getTargetContext: function(oTarget: any) {
|
|
18
|
+
getTargetContext: function (oTarget: any) {
|
|
17
19
|
const sTarget = oTarget.getObject(oTarget.getPath()),
|
|
18
20
|
sNavigationPath = ODataModelAnnotationHelper.getNavigationPath(oTarget.getPath());
|
|
19
21
|
return sNavigationPath + "/" + sTarget;
|
|
20
22
|
},
|
|
21
23
|
|
|
22
|
-
getNavigationContext: function(oContext: any) {
|
|
24
|
+
getNavigationContext: function (oContext: any) {
|
|
23
25
|
return ODataModelAnnotationHelper.getNavigationPath(oContext.getPath());
|
|
24
26
|
},
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Checks if the navigation collection is insertable.
|
|
28
|
-
*
|
|
29
|
-
* @function
|
|
30
|
-
* @static
|
|
31
|
-
* @name sap.fe.core.AnnotationHelper.getNavigationInsertableRestrictions
|
|
32
|
-
* @memberof sap.fe.core.AnnotationHelper
|
|
33
|
-
* @param oCollection
|
|
34
|
-
* @param {string} sCurrentCollectionName The name of the navigation collection
|
|
35
|
-
* @param {Array} aRestrictedProperties Array of RestrictedProperties of NavigationRestrictions of the root collection
|
|
36
|
-
* @param {boolean} bInsertable Insertable value of the navigation collection
|
|
37
|
-
* @param bCreationRow
|
|
38
|
-
* @returns {string} Expression if insertable or insertable path, false otherwise
|
|
39
|
-
* @private
|
|
40
|
-
* @ui5-restricted
|
|
41
|
-
*/
|
|
42
|
-
getNavigationInsertableRestrictions: function(
|
|
43
|
-
oCollection: any,
|
|
44
|
-
sCurrentCollectionName: string,
|
|
45
|
-
aRestrictedProperties: any[],
|
|
46
|
-
bInsertable: boolean | any,
|
|
47
|
-
bCreationRow: any
|
|
48
|
-
) {
|
|
49
|
-
// If insertable = true via NavigationRestriction of root collection, navigation collection is insertable
|
|
50
|
-
// If NOT insertable via NavigationRestriction of root collection, navigation collection is NOT insertable
|
|
51
|
-
// If insertable property is undefined for the NavigationRestrictions of the root collection,
|
|
52
|
-
// then insertable property of the navigation collection is considered.
|
|
53
|
-
// If insertable = true, navigation collection is insertable
|
|
54
|
-
// If insertable = false, navigation collection is NOT insertable
|
|
55
|
-
// If Insertable is undefined via navigation restriction of root collection
|
|
56
|
-
// and Insertable is undefined at navigation collection,
|
|
57
|
-
// then navigation collection is insertable.
|
|
58
|
-
let i,
|
|
59
|
-
oNavigationProperty,
|
|
60
|
-
sPath = "";
|
|
61
|
-
for (i in aRestrictedProperties) {
|
|
62
|
-
oNavigationProperty = aRestrictedProperties[i];
|
|
63
|
-
if (
|
|
64
|
-
oNavigationProperty.NavigationProperty.$NavigationPropertyPath === sCurrentCollectionName &&
|
|
65
|
-
oNavigationProperty.InsertRestrictions
|
|
66
|
-
) {
|
|
67
|
-
if (oNavigationProperty.InsertRestrictions.Insertable && oNavigationProperty.InsertRestrictions.Insertable.$Path) {
|
|
68
|
-
if (bCreationRow) {
|
|
69
|
-
sPath = oCollection.$Partner + "/";
|
|
70
|
-
}
|
|
71
|
-
return (
|
|
72
|
-
"{= ${" + sPath + oNavigationProperty.InsertRestrictions.Insertable.$Path + "} && ${ui>/editMode} === 'Editable' }"
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
return oNavigationProperty.InsertRestrictions.Insertable ? "{= ${ui>/editMode} === 'Editable' }" : false;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (bInsertable && bInsertable.$Path && bInsertable.$Path.indexOf("/") > -1) {
|
|
79
|
-
const aSplitInsertablePath = bInsertable.$Path.split("/");
|
|
80
|
-
const sNavigationPath = aSplitInsertablePath[0];
|
|
81
|
-
const sPartner = oCollection.$Partner;
|
|
82
|
-
if (sNavigationPath !== sPartner) {
|
|
83
|
-
// check for parent property
|
|
84
|
-
return "{= ${ui>/editMode} === 'Editable'}";
|
|
85
|
-
}
|
|
86
|
-
if (bCreationRow) {
|
|
87
|
-
sCurrentCollectionName = "";
|
|
88
|
-
} else {
|
|
89
|
-
sCurrentCollectionName = sCurrentCollectionName + "/";
|
|
90
|
-
}
|
|
91
|
-
return "{= ${ui>/editMode} === 'Editable' && ${" + sCurrentCollectionName + bInsertable.$Path + "}}";
|
|
92
|
-
}
|
|
93
|
-
return "{= " + (bInsertable !== false) + " && ${ui>/editMode} === 'Editable'}";
|
|
94
|
-
},
|
|
95
27
|
/**
|
|
96
28
|
* Checks if the footer is visible or not.
|
|
97
29
|
*
|
|
98
30
|
* @function
|
|
99
31
|
* @static
|
|
100
|
-
* @name sap.fe.core.AnnotationHelper.
|
|
32
|
+
* @name sap.fe.core.AnnotationHelper.getDataFieldBasedFooterVisibility
|
|
101
33
|
* @memberof sap.fe.core.AnnotationHelper
|
|
102
34
|
* @param {Array} aDataFields Array of DataFields in the identification
|
|
103
35
|
* @param {boolean} bConsiderEditable Whether the edit mode binding is required or not
|
|
@@ -105,7 +37,7 @@ const AnnotationHelper = {
|
|
|
105
37
|
* @private
|
|
106
38
|
* @ui5-restricted
|
|
107
39
|
**/
|
|
108
|
-
|
|
40
|
+
getDataFieldBasedFooterVisibility: function (aDataFields: any[], bConsiderEditable: boolean) {
|
|
109
41
|
let sHiddenExpression = "";
|
|
110
42
|
let sSemiHiddenExpression;
|
|
111
43
|
const aHiddenActionPath = [];
|
|
@@ -139,11 +71,11 @@ const AnnotationHelper = {
|
|
|
139
71
|
"{= " +
|
|
140
72
|
(bConsiderEditable ? "(" : "") +
|
|
141
73
|
sHiddenExpression +
|
|
142
|
-
(bConsiderEditable ? " || ${ui>/
|
|
74
|
+
(bConsiderEditable ? " || ${ui>/isEditable}) " : " ") +
|
|
143
75
|
"&& ${internal>isCreateDialogOpen} !== true}"
|
|
144
76
|
);
|
|
145
77
|
} else {
|
|
146
|
-
return "{= " + (bConsiderEditable ? "${ui>/
|
|
78
|
+
return "{= " + (bConsiderEditable ? "${ui>/isEditable} && " : "") + "${internal>isCreateDialogOpen} !== true}";
|
|
147
79
|
}
|
|
148
80
|
},
|
|
149
81
|
|
|
@@ -163,7 +95,7 @@ const AnnotationHelper = {
|
|
|
163
95
|
* @private
|
|
164
96
|
* @ui5-restricted
|
|
165
97
|
**/
|
|
166
|
-
getActionContext: function(oAction: object) {
|
|
98
|
+
getActionContext: function (oAction: object) {
|
|
167
99
|
return CommonUtils.getActionPath(oAction, true);
|
|
168
100
|
},
|
|
169
101
|
/**
|
|
@@ -181,7 +113,7 @@ const AnnotationHelper = {
|
|
|
181
113
|
* @private
|
|
182
114
|
* @ui5-restricted
|
|
183
115
|
**/
|
|
184
|
-
getPathToBoundActionOverload: function(oAction: object) {
|
|
116
|
+
getPathToBoundActionOverload: function (oAction: object) {
|
|
185
117
|
const sPath = CommonUtils.getActionPath(oAction, true);
|
|
186
118
|
return sPath + "/@$ui5.overload/0";
|
|
187
119
|
},
|
|
@@ -198,7 +130,7 @@ const AnnotationHelper = {
|
|
|
198
130
|
* @private
|
|
199
131
|
* @ui5-restricted
|
|
200
132
|
**/
|
|
201
|
-
buildEmphasizedButtonExpression: function(aIdentification?: any[]) {
|
|
133
|
+
buildEmphasizedButtonExpression: function (aIdentification?: any[]) {
|
|
202
134
|
if (!aIdentification) {
|
|
203
135
|
return ButtonType.Emphasized;
|
|
204
136
|
}
|
|
@@ -206,7 +138,7 @@ const AnnotationHelper = {
|
|
|
206
138
|
let bIsAlwaysDefault: boolean,
|
|
207
139
|
sHiddenSimplePath,
|
|
208
140
|
sHiddenExpression = "";
|
|
209
|
-
aIdentification.forEach(function(oDataField: any) {
|
|
141
|
+
aIdentification.forEach(function (oDataField: any) {
|
|
210
142
|
const oCriticalityProperty = oDataField.Criticality;
|
|
211
143
|
const oDataFieldHidden = oDataField["@com.sap.vocabularies.UI.v1.Hidden"];
|
|
212
144
|
if (oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" && !bIsAlwaysDefault && oCriticalityProperty) {
|
|
@@ -279,7 +211,7 @@ const AnnotationHelper = {
|
|
|
279
211
|
* @param {object} [oInterface] Contains the context, used in oDataContext
|
|
280
212
|
* @returns {boolean} `true` if sticky, `false` otherwise
|
|
281
213
|
*/
|
|
282
|
-
isStickySessionSupported: function(vCollectionOrMetaModel: object | undefined, oInterface: any | undefined) {
|
|
214
|
+
isStickySessionSupported: function (vCollectionOrMetaModel: object | undefined, oInterface: any | undefined) {
|
|
283
215
|
let oMetaModel;
|
|
284
216
|
if (oInterface) {
|
|
285
217
|
oMetaModel = oInterface.context.getModel();
|
|
@@ -296,7 +228,7 @@ const AnnotationHelper = {
|
|
|
296
228
|
* @param {object} oAction The action object
|
|
297
229
|
* @returns {boolean} `true` if action is coming from manifest, `false` otherwise
|
|
298
230
|
*/
|
|
299
|
-
isManifestAction: function(oAction: any) {
|
|
231
|
+
isManifestAction: function (oAction: any) {
|
|
300
232
|
const aActions = [
|
|
301
233
|
"Primary",
|
|
302
234
|
"DefaultApply",
|
|
@@ -304,32 +236,36 @@ const AnnotationHelper = {
|
|
|
304
236
|
"ForAction",
|
|
305
237
|
"ForNavigation",
|
|
306
238
|
"SwitchToActiveObject",
|
|
307
|
-
"SwitchToDraftObject"
|
|
239
|
+
"SwitchToDraftObject",
|
|
240
|
+
"DraftActions"
|
|
308
241
|
];
|
|
309
242
|
return aActions.indexOf(oAction.type) < 0;
|
|
310
243
|
},
|
|
311
244
|
/**
|
|
312
|
-
* Method returns whether footer is visible or not on object /
|
|
245
|
+
* Method returns whether footer is visible or not on object / subobject page.
|
|
313
246
|
*
|
|
314
247
|
* @function
|
|
315
248
|
* @name getFooterVisible
|
|
316
|
-
* @param {
|
|
317
|
-
* @param {
|
|
318
|
-
* @returns {boolean} `true` if
|
|
249
|
+
* @param {ConverterAction[]} footerActions The footer action object coming from the converter
|
|
250
|
+
* @param {DataField[]} dataFields Data field array for normal footer visibility processing
|
|
251
|
+
* @returns {boolean | BindingExpression<string>} `true` if any action is true, otherwise compiled Binding or `false`
|
|
319
252
|
*/
|
|
320
|
-
getFooterVisible: function(
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
253
|
+
getFooterVisible: function (footerActions: ConverterAction[], dataFields: DataField[]): boolean | BindingExpression<string> {
|
|
254
|
+
const manifestActions = footerActions.filter((action) => AnnotationHelper.isManifestAction(action)) as ManifestAction[];
|
|
255
|
+
let customActionVisibility: Expression<boolean>;
|
|
256
|
+
if (manifestActions.length) {
|
|
257
|
+
// If we have manifest actions
|
|
258
|
+
const customActionIndividualVisibility = manifestActions.map((action) => {
|
|
259
|
+
return resolveBindingString<boolean>(action.visible as string | boolean, "boolean");
|
|
260
|
+
});
|
|
261
|
+
// construct the footer's visibility-binding out of all actions' visibility-bindings, first the binding of all custom actions ...
|
|
262
|
+
customActionVisibility = or(...customActionIndividualVisibility);
|
|
263
|
+
// and then the binding of all annotation actions inside the footer ...
|
|
264
|
+
const annotationActionVisibility = this.getDataFieldBasedFooterVisibility(dataFields, true);
|
|
265
|
+
// finally, return everything.
|
|
266
|
+
return compileBinding(or(customActionVisibility, resolveBindingString<boolean>(annotationActionVisibility, "boolean")));
|
|
332
267
|
}
|
|
268
|
+
return this.getDataFieldBasedFooterVisibility(dataFields, true);
|
|
333
269
|
},
|
|
334
270
|
/**
|
|
335
271
|
* Build an expression calling an action handler via the FPM helper's actionWrapper function
|
|
@@ -343,7 +279,7 @@ const AnnotationHelper = {
|
|
|
343
279
|
* @param {string} oThis.id The table's ID
|
|
344
280
|
* @returns {string} The action wrapper binding expression
|
|
345
281
|
*/
|
|
346
|
-
buildActionWrapper: function(oAction: { handlerModule: string; handlerMethod: string }, oThis: { id: string } | undefined) {
|
|
282
|
+
buildActionWrapper: function (oAction: { handlerModule: string; handlerMethod: string }, oThis: { id: string } | undefined) {
|
|
347
283
|
const aParams: any[] = [ref("$event"), oAction.handlerModule, oAction.handlerMethod];
|
|
348
284
|
|
|
349
285
|
if (oThis && oThis.id) {
|
|
@@ -364,7 +300,7 @@ const AnnotationHelper = {
|
|
|
364
300
|
* @param {object} oConverterContext Object containing converted context
|
|
365
301
|
* @returns {string}
|
|
366
302
|
*/
|
|
367
|
-
getVariantBackReference: function(oViewData: any, oConverterContext: any) {
|
|
303
|
+
getVariantBackReference: function (oViewData: any, oConverterContext: any) {
|
|
368
304
|
if (oViewData && oViewData.variantManagement === "Page") {
|
|
369
305
|
return "fe::PageVariantManagement";
|
|
370
306
|
}
|
|
@@ -373,7 +309,7 @@ const AnnotationHelper = {
|
|
|
373
309
|
}
|
|
374
310
|
return undefined;
|
|
375
311
|
},
|
|
376
|
-
getDefaultPath: function(aViews: any) {
|
|
312
|
+
getDefaultPath: function (aViews: any) {
|
|
377
313
|
for (let i = 0; i < aViews.length; i++) {
|
|
378
314
|
if (aViews[i].defaultPath) {
|
|
379
315
|
return aViews[i].defaultPath;
|