@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,11 @@
|
|
|
1
1
|
import Service from "sap/ui/core/service/Service";
|
|
2
2
|
import ServiceFactory from "sap/ui/core/service/ServiceFactory";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { NavigationHandler } from "sap/fe/navigation";
|
|
4
|
+
import SelectionVariant from "sap/fe/navigation/SelectionVariant";
|
|
5
|
+
import { ServiceContext } from "types/extension_types";
|
|
5
6
|
|
|
6
7
|
type NavigationServiceSettings = {};
|
|
7
|
-
class NavigationService extends Service<NavigationServiceSettings> {
|
|
8
|
+
export class NavigationService extends Service<NavigationServiceSettings> {
|
|
8
9
|
initPromise!: Promise<any>;
|
|
9
10
|
oNavHandler!: NavigationHandler;
|
|
10
11
|
init() {
|
|
@@ -30,7 +31,7 @@ class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
30
31
|
* <code>Measure</code> type.
|
|
31
32
|
* @param {object} [oInnerAppData] Object for storing current state of the app
|
|
32
33
|
* @param {Function} [fnOnError] Callback that is called if an error occurs during navigation <br>
|
|
33
|
-
* @param {object} oExternalAppData Object for storing the state which will be forwarded to the target component.
|
|
34
|
+
* @param {object} [oExternalAppData] Object for storing the state which will be forwarded to the target component.
|
|
34
35
|
* @param {string} [sNavMode] Argument is used to overwrite the FLP-configured target for opening a URL. If used, only the
|
|
35
36
|
* <code>explace</code> or <code>inplace</code> values are allowed. Any other value will lead to an exception
|
|
36
37
|
* <code>NavigationHandler.INVALID_NAV_MODE</code>.
|
|
@@ -38,11 +39,11 @@ class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
38
39
|
navigate(
|
|
39
40
|
sSemanticObject: string,
|
|
40
41
|
sActionName: string,
|
|
41
|
-
vNavigationParameters
|
|
42
|
-
oInnerAppData
|
|
43
|
-
fnOnError
|
|
44
|
-
oExternalAppData
|
|
45
|
-
sNavMode
|
|
42
|
+
vNavigationParameters?: string | object,
|
|
43
|
+
oInnerAppData?: object,
|
|
44
|
+
fnOnError?: Function,
|
|
45
|
+
oExternalAppData?: object,
|
|
46
|
+
sNavMode?: string
|
|
46
47
|
) {
|
|
47
48
|
// TODO: Navigation Handler does not handle navigation without a context
|
|
48
49
|
// but in v4 DataFieldForIBN with requiresContext false can trigger a navigation without any context
|
|
@@ -231,11 +232,7 @@ class NavigationService extends Service<NavigationServiceSettings> {
|
|
|
231
232
|
* (|)
|
|
232
233
|
* @returns {object} Instance of {@link sap.fe.navigation.SelectionVariant}
|
|
233
234
|
*/
|
|
234
|
-
mixAttributesAndSelectionVariant(
|
|
235
|
-
vSemanticAttributes: object | any[],
|
|
236
|
-
sSelectionVariant: string,
|
|
237
|
-
iSuppressionBehavior: number | undefined
|
|
238
|
-
) {
|
|
235
|
+
mixAttributesAndSelectionVariant(vSemanticAttributes: object | any[], sSelectionVariant: string, iSuppressionBehavior?: number) {
|
|
239
236
|
return this.oNavHandler.mixAttributesAndSelectionVariant(vSemanticAttributes, sSelectionVariant, iSuppressionBehavior);
|
|
240
237
|
}
|
|
241
238
|
|
|
@@ -7,95 +7,68 @@ sap.ui.define(["sap/ui/core/service/Service", "sap/ui/core/service/ServiceFactor
|
|
|
7
7
|
|
|
8
8
|
var _exports = {};
|
|
9
9
|
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
-
|
|
14
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
-
|
|
16
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
17
|
-
|
|
18
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
19
11
|
|
|
20
12
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
13
|
|
|
22
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
23
|
-
|
|
24
|
-
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
25
|
-
|
|
26
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
27
|
-
|
|
28
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
29
|
-
|
|
30
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
31
|
-
|
|
32
14
|
var ResourceModelService = /*#__PURE__*/function (_Service) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var _super = _createSuper(ResourceModelService);
|
|
15
|
+
_inheritsLoose(ResourceModelService, _Service);
|
|
36
16
|
|
|
37
17
|
function ResourceModelService() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return _super.apply(this, arguments);
|
|
18
|
+
return _Service.apply(this, arguments) || this;
|
|
41
19
|
}
|
|
42
20
|
|
|
43
21
|
_exports.ResourceModelService = ResourceModelService;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
oComponent.setModel(this.oResourceModel, mSettings.modelName);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
this.initPromise = this.oResourceModel.getResourceBundle().then(function (oBundle) {
|
|
78
|
-
_this.oResourceModel.__bundle = oBundle;
|
|
79
|
-
return _this;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "getResourceModel",
|
|
84
|
-
value: function getResourceModel() {
|
|
85
|
-
return this.oResourceModel;
|
|
22
|
+
var _proto = ResourceModelService.prototype;
|
|
23
|
+
|
|
24
|
+
_proto.init = function init() {
|
|
25
|
+
var _this = this;
|
|
26
|
+
|
|
27
|
+
var oContext = this.getContext();
|
|
28
|
+
var mSettings = oContext.settings;
|
|
29
|
+
this.oFactory = oContext.factory; // When enhancing i18n keys the value in the last resource bundle takes precedence
|
|
30
|
+
// hence arrange various resource bundles so that enhanceI18n provided by the application is the last.
|
|
31
|
+
// The following order is used :
|
|
32
|
+
// 1. sap.fe bundle - sap.fe.core.messagebundle (passed with mSettings.bundles)
|
|
33
|
+
// 2. sap.fe bundle - sap.fe.templates.messagebundle (passed with mSettings.bundles)
|
|
34
|
+
// 3. Multiple bundles passed by the application as part of enhanceI18n
|
|
35
|
+
|
|
36
|
+
var aBundles = mSettings.bundles.concat(mSettings.enhanceI18n || []).map(function (vI18n) {
|
|
37
|
+
// if value passed for enhanceI18n is a Resource Model, return the associated bundle
|
|
38
|
+
// else the value is a bundleUrl, return Resource Bundle configuration so that a bundle can be created
|
|
39
|
+
return typeof vI18n.isA === "function" && vI18n.isA("sap.ui.model.resource.ResourceModel") ? vI18n.getResourceBundle() : {
|
|
40
|
+
bundleName: vI18n.replace(/\//g, ".")
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
this.oResourceModel = new ResourceModel({
|
|
44
|
+
bundleName: aBundles[0].bundleName,
|
|
45
|
+
enhanceWith: aBundles.slice(1),
|
|
46
|
+
async: true
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (oContext.scopeType === "component") {
|
|
50
|
+
var oComponent = oContext.scopeObject;
|
|
51
|
+
oComponent.setModel(this.oResourceModel, mSettings.modelName);
|
|
86
52
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
53
|
+
|
|
54
|
+
this.initPromise = Promise.all([this.oResourceModel.getResourceBundle(), this.oResourceModel._pEnhanced || Promise.resolve()]).then(function (oBundle) {
|
|
55
|
+
_this.oResourceModel.__bundle = oBundle[0];
|
|
56
|
+
return _this;
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
_proto.getResourceModel = function getResourceModel() {
|
|
61
|
+
return this.oResourceModel;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
_proto.getInterface = function getInterface() {
|
|
65
|
+
return this;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
_proto.exit = function exit() {
|
|
69
|
+
// Deregister global instance
|
|
70
|
+
this.oFactory.removeGlobalInstance();
|
|
71
|
+
};
|
|
99
72
|
|
|
100
73
|
return ResourceModelService;
|
|
101
74
|
}(Service);
|
|
@@ -103,49 +76,41 @@ sap.ui.define(["sap/ui/core/service/Service", "sap/ui/core/service/ServiceFactor
|
|
|
103
76
|
_exports.ResourceModelService = ResourceModelService;
|
|
104
77
|
|
|
105
78
|
var ResourceModelServiceFactory = /*#__PURE__*/function (_ServiceFactory) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var _super2 = _createSuper(ResourceModelServiceFactory);
|
|
79
|
+
_inheritsLoose(ResourceModelServiceFactory, _ServiceFactory);
|
|
109
80
|
|
|
110
81
|
function ResourceModelServiceFactory() {
|
|
111
82
|
var _this2;
|
|
112
83
|
|
|
113
|
-
_classCallCheck(this, ResourceModelServiceFactory);
|
|
114
|
-
|
|
115
84
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
116
85
|
args[_key] = arguments[_key];
|
|
117
86
|
}
|
|
118
87
|
|
|
119
|
-
_this2 =
|
|
120
|
-
|
|
121
|
-
_defineProperty(_assertThisInitialized(_this2), "_oInstances", {});
|
|
122
|
-
|
|
88
|
+
_this2 = _ServiceFactory.call.apply(_ServiceFactory, [this].concat(args)) || this;
|
|
89
|
+
_this2._oInstances = {};
|
|
123
90
|
return _this2;
|
|
124
91
|
}
|
|
125
92
|
|
|
126
|
-
|
|
127
|
-
key: "createInstance",
|
|
128
|
-
value: function createInstance(oServiceContext) {
|
|
129
|
-
var sKey = oServiceContext.settings.bundles.join(",") + (oServiceContext.settings.enhanceI18n ? "," + oServiceContext.settings.enhanceI18n.join(",") : "");
|
|
93
|
+
var _proto2 = ResourceModelServiceFactory.prototype;
|
|
130
94
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
factory: this
|
|
134
|
-
}, oServiceContext));
|
|
135
|
-
}
|
|
95
|
+
_proto2.createInstance = function createInstance(oServiceContext) {
|
|
96
|
+
var sKey = oServiceContext.settings.bundles.join(",") + (oServiceContext.settings.enhanceI18n ? "," + oServiceContext.settings.enhanceI18n.join(",") : "");
|
|
136
97
|
|
|
137
|
-
|
|
98
|
+
if (!this._oInstances[sKey]) {
|
|
99
|
+
this._oInstances[sKey] = new ResourceModelService(Object.assign({
|
|
100
|
+
factory: this
|
|
101
|
+
}, oServiceContext));
|
|
138
102
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
103
|
+
|
|
104
|
+
return this._oInstances[sKey].initPromise;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
_proto2.removeGlobalInstance = function removeGlobalInstance() {
|
|
108
|
+
this._oInstances = {};
|
|
109
|
+
};
|
|
145
110
|
|
|
146
111
|
return ResourceModelServiceFactory;
|
|
147
112
|
}(ServiceFactory);
|
|
148
113
|
|
|
149
114
|
return ResourceModelServiceFactory;
|
|
150
115
|
}, false);
|
|
151
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
116
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlc291cmNlT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0b1NlcnZpY2VDb250ZXh0LnNldHRpbmdzLmJ1bmRsZXMuam9pbihcIixcIikgK1xuXHRcdFx0KG9TZXJ2aWNlQ29udGV4dC5zZXR0aW5ncy5lbmhhbmNlSTE4biA/IFwiLFwiICsgb1NlcnZpY2VDb250ZXh0LnNldHRpbmdzLmVuaGFuY2VJMThuLmpvaW4oXCIsXCIpIDogXCJcIik7XG5cblx0XHRpZiAoIXRoaXMuX29JbnN0YW5jZXNbc0tleV0pIHtcblx0XHRcdHRoaXMuX29JbnN0YW5jZXNbc0tleV0gPSBuZXcgUmVzb3VyY2VNb2RlbFNlcnZpY2UoT2JqZWN0LmFzc2lnbih7IGZhY3Rvcnk6IHRoaXMgfSwgb1NlcnZpY2VDb250ZXh0KSk7XG5cdFx0fVxuXG5cdFx0cmV0dXJuIHRoaXMuX29JbnN0YW5jZXNbc0tleV0uaW5pdFByb21pc2U7XG5cdH1cblx0cmVtb3ZlR2xvYmFsSW5zdGFuY2UoKSB7XG5cdFx0dGhpcy5fb0luc3RhbmNlcyA9IHt9O1xuXHR9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFJlc291cmNlTW9kZWxTZXJ2aWNlRmFjdG9yeTtcbiJdfQ==
|
|
@@ -2,7 +2,7 @@ import Service from "sap/ui/core/service/Service";
|
|
|
2
2
|
import ServiceFactory from "sap/ui/core/service/ServiceFactory";
|
|
3
3
|
import ResourceModel from "sap/ui/model/resource/ResourceModel";
|
|
4
4
|
import ResourceBundle from "sap/base/i18n/ResourceBundle";
|
|
5
|
-
import { ServiceContext } from "
|
|
5
|
+
import { ServiceContext } from "types/extension_types";
|
|
6
6
|
type ResourceModelServiceSettings = {
|
|
7
7
|
bundles: ResourceBundle[];
|
|
8
8
|
enhanceI18n: string[];
|
|
@@ -41,8 +41,11 @@ export class ResourceModelService extends Service<ResourceModelServiceSettings>
|
|
|
41
41
|
oComponent.setModel(this.oResourceModel, mSettings.modelName);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
this.initPromise =
|
|
45
|
-
|
|
44
|
+
this.initPromise = Promise.all([
|
|
45
|
+
this.oResourceModel.getResourceBundle() as Promise<ResourceBundle>,
|
|
46
|
+
(this.oResourceModel as any)._pEnhanced || Promise.resolve()
|
|
47
|
+
]).then((oBundle: any[]) => {
|
|
48
|
+
(this.oResourceModel as any).__bundle = oBundle[0];
|
|
46
49
|
return this;
|
|
47
50
|
});
|
|
48
51
|
}
|