@sapui5/sap.fe.core 1.100.0 → 1.101.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 +4 -4
- package/src/sap/fe/core/.library +2 -3
- package/src/sap/fe/core/AnnotationHelper.js +43 -24
- package/src/sap/fe/core/AnnotationHelper.ts +43 -37
- package/src/sap/fe/core/AppComponent.js +20 -27
- package/src/sap/fe/core/AppComponent.ts +19 -25
- package/src/sap/fe/core/AppStateHandler.js +5 -5
- package/src/sap/fe/core/AppStateHandler.ts +2 -2
- package/src/sap/fe/core/BaseController.js +9 -9
- package/src/sap/fe/core/BaseController.ts +3 -4
- package/src/sap/fe/core/CommonUtils.js +74 -17
- package/src/sap/fe/core/CommonUtils.ts +181 -110
- package/src/sap/fe/core/ExtensionAPI.js +11 -10
- package/src/sap/fe/core/ExtensionAPI.ts +22 -30
- package/src/sap/fe/core/PageController.js +12 -11
- package/src/sap/fe/core/PageController.ts +34 -34
- package/src/sap/fe/core/RouterProxy.js +36 -24
- package/src/sap/fe/core/RouterProxy.ts +36 -22
- package/src/sap/fe/core/TemplateComponent.js +193 -118
- package/src/sap/fe/core/TemplateComponent.ts +105 -117
- package/src/sap/fe/core/TemplateModel.js +6 -8
- package/src/sap/fe/core/TemplateModel.ts +2 -2
- package/src/sap/fe/core/TransactionHelper.js +33 -18
- package/src/sap/fe/core/TransactionHelper.ts +172 -153
- package/src/sap/fe/core/actions/collaboration/ActivitySync.js +31 -17
- package/src/sap/fe/core/actions/collaboration/ActivitySync.ts +52 -45
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +16 -6
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.ts +13 -3
- package/src/sap/fe/core/actions/collaboration/Manage.js +9 -7
- package/src/sap/fe/core/actions/collaboration/Manage.ts +33 -31
- package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +53 -56
- package/src/sap/fe/core/actions/draft.js +308 -166
- package/src/sap/fe/core/actions/draft.ts +177 -74
- package/src/sap/fe/core/actions/messageHandling.js +25 -13
- package/src/sap/fe/core/actions/messageHandling.ts +49 -39
- package/src/sap/fe/core/actions/operations.js +4 -4
- package/src/sap/fe/core/actions/operations.ts +3 -2
- 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 +506 -245
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +395 -275
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +11 -11
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +6 -7
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +15 -17
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +98 -96
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +15 -15
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +60 -53
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +94 -42
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +114 -91
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +14 -14
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +12 -11
- package/src/sap/fe/core/controllerextensions/MassEdit.js +12 -12
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +8 -9
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +13 -25
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +18 -28
- package/src/sap/fe/core/controllerextensions/PageReady.js +25 -23
- package/src/sap/fe/core/controllerextensions/PageReady.ts +49 -47
- package/src/sap/fe/core/controllerextensions/Paginator.js +13 -13
- package/src/sap/fe/core/controllerextensions/Paginator.ts +24 -18
- package/src/sap/fe/core/controllerextensions/Placeholder.js +10 -10
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
- package/src/sap/fe/core/controllerextensions/Routing.js +11 -11
- package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
- package/src/sap/fe/core/controllerextensions/Share.js +16 -16
- package/src/sap/fe/core/controllerextensions/Share.ts +32 -32
- package/src/sap/fe/core/controllerextensions/SideEffects.js +14 -14
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +62 -63
- package/src/sap/fe/core/controllerextensions/ViewState.js +17 -31
- package/src/sap/fe/core/controllerextensions/ViewState.ts +93 -102
- 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 +38 -15
- package/src/sap/fe/core/controls/CommandExecution.ts +20 -20
- package/src/sap/fe/core/controls/ConditionalWrapper.js +136 -65
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +49 -58
- 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 +73 -36
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +22 -32
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +44 -5
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +116 -66
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +121 -67
- package/src/sap/fe/core/controls/FieldWrapper.js +171 -87
- package/src/sap/fe/core/controls/FieldWrapper.ts +69 -80
- 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 +154 -119
- package/src/sap/fe/core/controls/FilterBar.ts +128 -123
- package/src/sap/fe/core/controls/FormElementWrapper.js +92 -37
- package/src/sap/fe/core/controls/FormElementWrapper.ts +32 -35
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +111 -89
- package/src/sap/fe/core/controls/filterbar/FilterContainer.ts +86 -82
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +242 -193
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +211 -204
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +152 -116
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +105 -105
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +1 -1
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +2 -2
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +37 -42
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +7 -6
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +15 -14
- package/src/sap/fe/core/converters/ManifestSettings.js +2 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +5 -1
- package/src/sap/fe/core/converters/annotations/DataField.js +1 -2
- package/src/sap/fe/core/converters/annotations/DataField.ts +3 -4
- 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 +5 -5
- package/src/sap/fe/core/converters/controls/Common/Form.ts +3 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +2 -3
- package/src/sap/fe/core/converters/controls/Common/Table.js +245 -112
- package/src/sap/fe/core/converters/controls/Common/Table.ts +305 -193
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +5 -5
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +4 -7
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +72 -43
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +134 -100
- 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/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 +27 -24
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +49 -40
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +33 -22
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +77 -62
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +5 -5
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +3 -7
- 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 +2 -2
- package/src/sap/fe/core/formatters/TableFormatter.ts +1 -1
- 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 +46 -17
- package/src/sap/fe/core/fpm/Component.ts +11 -16
- package/src/sap/fe/core/helpers/AppStartupHelper.js +4 -4
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +3 -3
- package/src/sap/fe/core/helpers/ClassSupport.js +273 -256
- package/src/sap/fe/core/helpers/ClassSupport.ts +314 -237
- package/src/sap/fe/core/helpers/MassEditHelper.js +173 -39
- package/src/sap/fe/core/helpers/MassEditHelper.ts +236 -132
- package/src/sap/fe/core/helpers/ModelHelper.js +29 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +23 -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 +3 -3
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +3 -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 +4 -5
- package/src/sap/fe/core/library.ts +17 -17
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +1 -1
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +0 -3
- package/src/sap/fe/core/messagebundle.properties +23 -8
- package/src/sap/fe/core/messagebundle_ar.properties +2 -0
- package/src/sap/fe/core/messagebundle_bg.properties +2 -0
- package/src/sap/fe/core/messagebundle_ca.properties +2 -0
- package/src/sap/fe/core/messagebundle_cs.properties +2 -0
- package/src/sap/fe/core/messagebundle_cy.properties +5 -3
- package/src/sap/fe/core/messagebundle_da.properties +2 -0
- package/src/sap/fe/core/messagebundle_de.properties +2 -0
- package/src/sap/fe/core/messagebundle_el.properties +2 -0
- package/src/sap/fe/core/messagebundle_en.properties +2 -0
- 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 +2 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +2 -0
- package/src/sap/fe/core/messagebundle_es.properties +2 -0
- package/src/sap/fe/core/messagebundle_es_MX.properties +2 -0
- package/src/sap/fe/core/messagebundle_et.properties +2 -0
- package/src/sap/fe/core/messagebundle_fi.properties +2 -0
- package/src/sap/fe/core/messagebundle_fr.properties +4 -2
- package/src/sap/fe/core/messagebundle_fr_CA.properties +5 -3
- package/src/sap/fe/core/messagebundle_hi.properties +2 -0
- package/src/sap/fe/core/messagebundle_hr.properties +5 -3
- package/src/sap/fe/core/messagebundle_hu.properties +2 -0
- package/src/sap/fe/core/messagebundle_id.properties +2 -0
- package/src/sap/fe/core/messagebundle_it.properties +2 -0
- package/src/sap/fe/core/messagebundle_iw.properties +2 -0
- package/src/sap/fe/core/messagebundle_ja.properties +2 -0
- package/src/sap/fe/core/messagebundle_kk.properties +2 -0
- package/src/sap/fe/core/messagebundle_ko.properties +2 -0
- package/src/sap/fe/core/messagebundle_lt.properties +2 -0
- package/src/sap/fe/core/messagebundle_lv.properties +5 -3
- package/src/sap/fe/core/messagebundle_ms.properties +2 -0
- package/src/sap/fe/core/messagebundle_nl.properties +2 -0
- package/src/sap/fe/core/messagebundle_no.properties +2 -0
- package/src/sap/fe/core/messagebundle_pl.properties +5 -3
- package/src/sap/fe/core/messagebundle_pt.properties +2 -0
- package/src/sap/fe/core/messagebundle_pt_PT.properties +2 -0
- package/src/sap/fe/core/messagebundle_ro.properties +5 -3
- package/src/sap/fe/core/messagebundle_ru.properties +5 -3
- package/src/sap/fe/core/messagebundle_sh.properties +2 -0
- package/src/sap/fe/core/messagebundle_sk.properties +2 -0
- package/src/sap/fe/core/messagebundle_sl.properties +2 -0
- package/src/sap/fe/core/messagebundle_sv.properties +3 -1
- package/src/sap/fe/core/messagebundle_th.properties +2 -0
- package/src/sap/fe/core/messagebundle_tr.properties +2 -0
- package/src/sap/fe/core/messagebundle_uk.properties +2 -0
- package/src/sap/fe/core/messagebundle_vi.properties +2 -0
- package/src/sap/fe/core/messagebundle_zh_CN.properties +5 -3
- package/src/sap/fe/core/messagebundle_zh_TW.properties +5 -3
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +4 -4
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +5 -5
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +1 -2
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +7 -7
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +6 -5
- package/src/sap/fe/core/services/NavigationServiceFactory.js +4 -4
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +4 -4
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/RoutingServiceFactory.js +98 -62
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +51 -42
- package/src/sap/fe/core/services/ShellServicesFactory.js +69 -29
- package/src/sap/fe/core/services/ShellServicesFactory.ts +26 -29
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +4 -4
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +8 -8
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +6 -17
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +43 -5
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.ts +6 -3
- package/src/sap/fe/core/support/CommonHelper.js +1 -1
- package/src/sap/fe/core/support/CommonHelper.ts +0 -3
- package/src/sap/fe/core/templating/DataModelPathHelper.js +2 -9
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +32 -38
- 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/PropertyHelper.js +15 -1
- package/src/sap/fe/core/templating/PropertyHelper.ts +30 -23
- package/src/sap/fe/core/templating/UIFormatters.js +121 -21
- package/src/sap/fe/core/templating/UIFormatters.ts +134 -49
- 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 -78
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.ts +0 -65
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
|
|
2
|
-
import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
|
|
3
1
|
import Log from "sap/base/Log";
|
|
4
2
|
import mergeObjects from "sap/base/util/merge";
|
|
5
|
-
import ControlVariantApplyAPI from "sap/ui/fl/apply/api/ControlVariantApplyAPI";
|
|
6
|
-
import StateUtil from "sap/ui/mdc/p13n/StateUtil";
|
|
7
|
-
import NavLibrary from "sap/fe/navigation/library";
|
|
8
3
|
import CommonUtils from "sap/fe/core/CommonUtils";
|
|
4
|
+
import { defineUI5Class, extensible, finalExtension, privateExtension, publicExtension } from "sap/fe/core/helpers/ClassSupport";
|
|
9
5
|
import KeepAliveHelper from "sap/fe/core/helpers/KeepAliveHelper";
|
|
10
6
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
11
|
-
import { Extensible, Final, Private, Public, UI5Class } from "sap/fe/core/helpers/ClassSupport";
|
|
12
|
-
import ControllerExtensionMetadata from "sap/fe/core/controllerextensions/ControllerExtensionMetadata";
|
|
13
7
|
import PageController from "sap/fe/core/PageController";
|
|
8
|
+
import NavLibrary from "sap/fe/navigation/library";
|
|
14
9
|
import ManagedObject from "sap/ui/base/ManagedObject";
|
|
10
|
+
import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
|
|
11
|
+
import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
|
|
12
|
+
import ControlVariantApplyAPI from "sap/ui/fl/apply/api/ControlVariantApplyAPI";
|
|
13
|
+
import StateUtil from "sap/ui/mdc/p13n/StateUtil";
|
|
15
14
|
// additionalStates are stored next to control IDs, so name clash avoidance needed. Fortunately IDs have restrictions:
|
|
16
15
|
// "Allowed is a sequence of characters (capital/lowercase), digits, underscores, dashes, points and/or colons."
|
|
17
16
|
// Therefore adding a symbol like # or @
|
|
@@ -22,12 +21,12 @@ const ADDITIONAL_STATES_KEY = "#additionalStates",
|
|
|
22
21
|
///////////////////////////////////////////////////////////////////
|
|
23
22
|
const _mControlStateHandlerMap: Record<string, any> = {
|
|
24
23
|
"sap.ui.fl.variants.VariantManagement": {
|
|
25
|
-
retrieve: function(oVM: any) {
|
|
24
|
+
retrieve: function (oVM: any) {
|
|
26
25
|
return {
|
|
27
26
|
"variantId": oVM.getCurrentVariantKey()
|
|
28
27
|
};
|
|
29
28
|
},
|
|
30
|
-
apply: function(oVM: any, oControlState: any) {
|
|
29
|
+
apply: function (oVM: any, oControlState: any) {
|
|
31
30
|
if (oControlState && oControlState.variantId !== undefined && oControlState.variantId !== oVM.getCurrentVariantKey()) {
|
|
32
31
|
const sVariantReference = this._checkIfVariantIdIsAvailable(oVM, oControlState.variantId)
|
|
33
32
|
? oControlState.variantId
|
|
@@ -40,14 +39,14 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
40
39
|
}
|
|
41
40
|
},
|
|
42
41
|
"sap.m.IconTabBar": {
|
|
43
|
-
retrieve: function(oTabBar: any) {
|
|
42
|
+
retrieve: function (oTabBar: any) {
|
|
44
43
|
return {
|
|
45
44
|
selectedKey: oTabBar.getSelectedKey()
|
|
46
45
|
};
|
|
47
46
|
},
|
|
48
|
-
apply: function(oTabBar: any, oControlState: any) {
|
|
47
|
+
apply: function (oTabBar: any, oControlState: any) {
|
|
49
48
|
if (oControlState && oControlState.selectedKey) {
|
|
50
|
-
const oSelectedItem = oTabBar.getItems().find(function(oItem: any) {
|
|
49
|
+
const oSelectedItem = oTabBar.getItems().find(function (oItem: any) {
|
|
51
50
|
return oItem.getKey() === oControlState.selectedKey;
|
|
52
51
|
});
|
|
53
52
|
if (oSelectedItem) {
|
|
@@ -57,39 +56,42 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
57
56
|
}
|
|
58
57
|
},
|
|
59
58
|
"sap.ui.mdc.FilterBar": {
|
|
60
|
-
retrieve: function(oFilterBar: any) {
|
|
61
|
-
return StateUtil.retrieveExternalState(oFilterBar).then(function(mFilterBarState: any) {
|
|
59
|
+
retrieve: function (oFilterBar: any) {
|
|
60
|
+
return StateUtil.retrieveExternalState(oFilterBar).then(function (mFilterBarState: any) {
|
|
62
61
|
// remove sensitive or view state irrelevant fields
|
|
63
62
|
const aPropertiesInfo = oFilterBar.getPropertyInfoSet(),
|
|
64
63
|
mFilter = mFilterBarState.filter || {};
|
|
65
64
|
aPropertiesInfo
|
|
66
|
-
.filter(function(oPropertyInfo: any) {
|
|
65
|
+
.filter(function (oPropertyInfo: any) {
|
|
67
66
|
return (
|
|
68
67
|
mFilter[oPropertyInfo.path] && (oPropertyInfo.removeFromAppState || mFilter[oPropertyInfo.path].length === 0)
|
|
69
68
|
);
|
|
70
69
|
})
|
|
71
|
-
.forEach(function(oPropertyInfo: any) {
|
|
70
|
+
.forEach(function (oPropertyInfo: any) {
|
|
72
71
|
delete mFilter[oPropertyInfo.path];
|
|
73
72
|
});
|
|
74
73
|
return mFilterBarState;
|
|
75
74
|
});
|
|
76
75
|
},
|
|
77
|
-
apply: function(oFilterBar: any, oControlState: any) {
|
|
76
|
+
apply: function (oFilterBar: any, oControlState: any) {
|
|
78
77
|
if (oControlState) {
|
|
79
78
|
return StateUtil.applyExternalState(oFilterBar, oControlState);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
},
|
|
83
82
|
"sap.ui.mdc.Table": {
|
|
84
|
-
retrieve: function(oTable: any) {
|
|
83
|
+
retrieve: function (oTable: any) {
|
|
85
84
|
return StateUtil.retrieveExternalState(oTable);
|
|
86
85
|
},
|
|
87
|
-
apply: function(oTable: any, oControlState: any) {
|
|
86
|
+
apply: function (oTable: any, oControlState: any) {
|
|
88
87
|
if (oControlState) {
|
|
88
|
+
if (!oControlState.supplementaryConfig) {
|
|
89
|
+
oControlState.supplementaryConfig = {};
|
|
90
|
+
}
|
|
89
91
|
return StateUtil.applyExternalState(oTable, oControlState);
|
|
90
92
|
}
|
|
91
93
|
},
|
|
92
|
-
refreshBinding: function(oTable: any) {
|
|
94
|
+
refreshBinding: function (oTable: any) {
|
|
93
95
|
const oTableBinding = oTable.getRowBinding();
|
|
94
96
|
if (oTableBinding) {
|
|
95
97
|
const oRootBinding = oTableBinding.getRootBinding();
|
|
@@ -111,15 +113,15 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
111
113
|
}
|
|
112
114
|
},
|
|
113
115
|
"sap.uxap.ObjectPageLayout": {
|
|
114
|
-
retrieve: function(oOPLayout: any) {
|
|
116
|
+
retrieve: function (oOPLayout: any) {
|
|
115
117
|
return {
|
|
116
118
|
selectedSection: oOPLayout.getSelectedSection()
|
|
117
119
|
};
|
|
118
120
|
},
|
|
119
|
-
apply: function(oOPLayout: any, oControlState: any) {
|
|
121
|
+
apply: function (oOPLayout: any, oControlState: any) {
|
|
120
122
|
oControlState && oOPLayout.setSelectedSection(oControlState.selectedSection);
|
|
121
123
|
},
|
|
122
|
-
refreshBinding: function(oOPLayout: any) {
|
|
124
|
+
refreshBinding: function (oOPLayout: any) {
|
|
123
125
|
const oBindingContext = oOPLayout.getBindingContext();
|
|
124
126
|
const oBinding = oBindingContext && oBindingContext.getBinding();
|
|
125
127
|
if (oBinding) {
|
|
@@ -133,7 +135,7 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
133
135
|
CommonUtils.getContextPathProperties(oMetaModel, sMetaPath, {
|
|
134
136
|
$kind: "NavigationProperty"
|
|
135
137
|
}) || {},
|
|
136
|
-
aNavPropertiesToRequest = Object.keys(oNavigationProperties).reduce(function(aPrev: any[], sNavProp: string) {
|
|
138
|
+
aNavPropertiesToRequest = Object.keys(oNavigationProperties).reduce(function (aPrev: any[], sNavProp: string) {
|
|
137
139
|
if (oNavigationProperties[sNavProp].$isCollection !== true) {
|
|
138
140
|
aPrev.push({ $NavigationPropertyPath: sNavProp });
|
|
139
141
|
}
|
|
@@ -153,60 +155,60 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
153
155
|
}
|
|
154
156
|
},
|
|
155
157
|
"sap.fe.macros.table.QuickFilterContainer": {
|
|
156
|
-
retrieve: function(oQuickFilter: any) {
|
|
158
|
+
retrieve: function (oQuickFilter: any) {
|
|
157
159
|
return {
|
|
158
160
|
selectedKey: oQuickFilter.getSelectorKey()
|
|
159
161
|
};
|
|
160
162
|
},
|
|
161
|
-
apply: function(oQuickFilter: any, oControlState: any) {
|
|
163
|
+
apply: function (oQuickFilter: any, oControlState: any) {
|
|
162
164
|
oControlState && oQuickFilter.setSelectorKey(oControlState.selectedKey);
|
|
163
165
|
}
|
|
164
166
|
},
|
|
165
167
|
"sap.m.SegmentedButton": {
|
|
166
|
-
retrieve: function(oSegmentedButton: any) {
|
|
168
|
+
retrieve: function (oSegmentedButton: any) {
|
|
167
169
|
return {
|
|
168
170
|
selectedKey: oSegmentedButton.getSelectedKey()
|
|
169
171
|
};
|
|
170
172
|
},
|
|
171
|
-
apply: function(oSegmentedButton: any, oControlState: any) {
|
|
173
|
+
apply: function (oSegmentedButton: any, oControlState: any) {
|
|
172
174
|
oControlState && oSegmentedButton.setSelectedKey(oControlState.selectedKey);
|
|
173
175
|
}
|
|
174
176
|
},
|
|
175
177
|
"sap.m.Select": {
|
|
176
|
-
retrieve: function(oSelect: any) {
|
|
178
|
+
retrieve: function (oSelect: any) {
|
|
177
179
|
return {
|
|
178
180
|
selectedKey: oSelect.getSelectedKey()
|
|
179
181
|
};
|
|
180
182
|
},
|
|
181
|
-
apply: function(oSelect: any, oControlState: any) {
|
|
183
|
+
apply: function (oSelect: any, oControlState: any) {
|
|
182
184
|
oControlState && oSelect.setSelectedKey(oControlState.selectedKey);
|
|
183
185
|
}
|
|
184
186
|
},
|
|
185
187
|
"sap.f.DynamicPage": {
|
|
186
|
-
retrieve: function(oDynamicPage: any) {
|
|
188
|
+
retrieve: function (oDynamicPage: any) {
|
|
187
189
|
return {
|
|
188
190
|
headerExpanded: oDynamicPage.getHeaderExpanded()
|
|
189
191
|
};
|
|
190
192
|
},
|
|
191
|
-
apply: function(oDynamicPage: any, oControlState: any) {
|
|
193
|
+
apply: function (oDynamicPage: any, oControlState: any) {
|
|
192
194
|
oControlState && oDynamicPage.setHeaderExpanded(oControlState.headerExpanded);
|
|
193
195
|
}
|
|
194
196
|
},
|
|
195
197
|
"sap.ui.core.mvc.View": {
|
|
196
|
-
retrieve: function(oView: any) {
|
|
198
|
+
retrieve: function (oView: any) {
|
|
197
199
|
const oController = oView.getController();
|
|
198
200
|
if (oController && oController.viewState) {
|
|
199
201
|
return oController.viewState.retrieveViewState(oController.viewState);
|
|
200
202
|
}
|
|
201
203
|
return {};
|
|
202
204
|
},
|
|
203
|
-
apply: function(oView: any, oControlState: any, oNavParameters: any) {
|
|
205
|
+
apply: function (oView: any, oControlState: any, oNavParameters: any) {
|
|
204
206
|
const oController = oView.getController();
|
|
205
207
|
if (oController && oController.viewState) {
|
|
206
208
|
return oController.viewState.applyViewState(oControlState, oNavParameters);
|
|
207
209
|
}
|
|
208
210
|
},
|
|
209
|
-
refreshBinding: function(oView: any) {
|
|
211
|
+
refreshBinding: function (oView: any) {
|
|
210
212
|
const oController = oView.getController();
|
|
211
213
|
if (oController && oController.viewState) {
|
|
212
214
|
return oController.viewState.refreshViewBindings();
|
|
@@ -214,14 +216,14 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
214
216
|
}
|
|
215
217
|
},
|
|
216
218
|
"sap.ui.core.ComponentContainer": {
|
|
217
|
-
retrieve: function(oComponentContainer: any) {
|
|
219
|
+
retrieve: function (oComponentContainer: any) {
|
|
218
220
|
const oComponent = oComponentContainer.getComponentInstance();
|
|
219
221
|
if (oComponent) {
|
|
220
222
|
return this.retrieveControlState(oComponent.getRootControl());
|
|
221
223
|
}
|
|
222
224
|
return {};
|
|
223
225
|
},
|
|
224
|
-
apply: function(oComponentContainer: any, oControlState: any, oNavParameters: any) {
|
|
226
|
+
apply: function (oComponentContainer: any, oControlState: any, oNavParameters: any) {
|
|
225
227
|
const oComponent = oComponentContainer.getComponentInstance();
|
|
226
228
|
if (oComponent) {
|
|
227
229
|
return this.applyControlState(oComponent.getRootControl(), oControlState, oNavParameters);
|
|
@@ -238,7 +240,7 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
238
240
|
* @public
|
|
239
241
|
* @since 1.85.0
|
|
240
242
|
*/
|
|
241
|
-
@
|
|
243
|
+
@defineUI5Class("sap.fe.core.controllerextensions.ViewState")
|
|
242
244
|
class ViewState extends ControllerExtension {
|
|
243
245
|
private _iRetrievingStateCounter: number;
|
|
244
246
|
private _pInitialStateApplied: Promise<unknown>;
|
|
@@ -251,24 +253,13 @@ class ViewState extends ControllerExtension {
|
|
|
251
253
|
constructor() {
|
|
252
254
|
super();
|
|
253
255
|
this._iRetrievingStateCounter = 0;
|
|
254
|
-
this._pInitialStateApplied = new Promise(resolve => {
|
|
256
|
+
this._pInitialStateApplied = new Promise((resolve) => {
|
|
255
257
|
this._pInitialStateAppliedResolve = resolve;
|
|
256
258
|
});
|
|
257
259
|
}
|
|
258
260
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
* @name sap.fe.core.controllerextensions.ViewState.getMetadata
|
|
262
|
-
* @function
|
|
263
|
-
*/
|
|
264
|
-
/**
|
|
265
|
-
* @private
|
|
266
|
-
* @name sap.fe.core.controllerextensions.ViewState.extend
|
|
267
|
-
* @function
|
|
268
|
-
*/
|
|
269
|
-
|
|
270
|
-
@Public
|
|
271
|
-
@Final
|
|
261
|
+
@publicExtension()
|
|
262
|
+
@finalExtension()
|
|
272
263
|
refreshViewBindings() {
|
|
273
264
|
return this.collectResults(this.base.viewState.adaptBindingRefreshControls).then((aControls: any) => {
|
|
274
265
|
let oPromiseChain = Promise.resolve();
|
|
@@ -291,15 +282,15 @@ class ViewState extends ControllerExtension {
|
|
|
291
282
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshControls
|
|
292
283
|
* @protected
|
|
293
284
|
*/
|
|
294
|
-
@
|
|
295
|
-
@
|
|
285
|
+
@publicExtension()
|
|
286
|
+
@extensible(OverrideExecution.After)
|
|
296
287
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
297
288
|
adaptBindingRefreshControls(aCollectedControls: ManagedObject[]) {
|
|
298
289
|
// to be overriden
|
|
299
290
|
}
|
|
300
291
|
|
|
301
|
-
@
|
|
302
|
-
@
|
|
292
|
+
@privateExtension()
|
|
293
|
+
@finalExtension()
|
|
303
294
|
refreshControlBinding(oControl: any) {
|
|
304
295
|
const oControlRefreshBindingHandler = this.getControlRefreshBindingHandler(oControl);
|
|
305
296
|
let oPromiseChain = Promise.resolve();
|
|
@@ -318,8 +309,8 @@ class ViewState extends ControllerExtension {
|
|
|
318
309
|
* @returns {object} A plain object with one function: <code>refreshBinding</code>
|
|
319
310
|
*/
|
|
320
311
|
|
|
321
|
-
@
|
|
322
|
-
@
|
|
312
|
+
@privateExtension()
|
|
313
|
+
@finalExtension()
|
|
323
314
|
getControlRefreshBindingHandler(oControl: any): any {
|
|
324
315
|
const oRefreshBindingHandler: any = {};
|
|
325
316
|
if (oControl) {
|
|
@@ -348,8 +339,8 @@ class ViewState extends ControllerExtension {
|
|
|
348
339
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshHandler
|
|
349
340
|
* @protected
|
|
350
341
|
*/
|
|
351
|
-
@
|
|
352
|
-
@
|
|
342
|
+
@publicExtension()
|
|
343
|
+
@extensible(OverrideExecution.After)
|
|
353
344
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
354
345
|
adaptBindingRefreshHandler(oControl: ManagedObject, oControlHandler: any[]) {
|
|
355
346
|
// to be overriden
|
|
@@ -361,8 +352,8 @@ class ViewState extends ControllerExtension {
|
|
|
361
352
|
* @alias sap.fe.core.controllerextensions.ViewState#onSuspend
|
|
362
353
|
* @public
|
|
363
354
|
*/
|
|
364
|
-
@
|
|
365
|
-
@
|
|
355
|
+
@publicExtension()
|
|
356
|
+
@extensible(OverrideExecution.After)
|
|
366
357
|
onSuspend() {
|
|
367
358
|
// to be overriden
|
|
368
359
|
}
|
|
@@ -373,8 +364,8 @@ class ViewState extends ControllerExtension {
|
|
|
373
364
|
* @alias sap.fe.core.controllerextensions.ViewState#onRestore
|
|
374
365
|
* @public
|
|
375
366
|
*/
|
|
376
|
-
@
|
|
377
|
-
@
|
|
367
|
+
@publicExtension()
|
|
368
|
+
@extensible(OverrideExecution.After)
|
|
378
369
|
onRestore() {
|
|
379
370
|
// to be overriden
|
|
380
371
|
}
|
|
@@ -395,8 +386,8 @@ class ViewState extends ControllerExtension {
|
|
|
395
386
|
* @param args
|
|
396
387
|
* @returns {Promise} A promise to be resolved with the result of all overrides
|
|
397
388
|
*/
|
|
398
|
-
@
|
|
399
|
-
@
|
|
389
|
+
@privateExtension()
|
|
390
|
+
@finalExtension()
|
|
400
391
|
collectResults(fnCall: Function, ...args: any[]) {
|
|
401
392
|
const aResults: any[] = [];
|
|
402
393
|
args.push(aResults);
|
|
@@ -416,8 +407,8 @@ class ViewState extends ControllerExtension {
|
|
|
416
407
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptControlStateHandler
|
|
417
408
|
* @protected
|
|
418
409
|
*/
|
|
419
|
-
@
|
|
420
|
-
@
|
|
410
|
+
@publicExtension()
|
|
411
|
+
@extensible(OverrideExecution.After)
|
|
421
412
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
422
413
|
adaptControlStateHandler(oControl: ManagedObject, aControlHandler: object[]) {
|
|
423
414
|
// to be overridden if needed
|
|
@@ -429,8 +420,8 @@ class ViewState extends ControllerExtension {
|
|
|
429
420
|
* @param {sap.ui.base.ManagedObject} oControl The control to get state handler for
|
|
430
421
|
* @returns {object} A plain object with two functions: <code>retrieve</code> and <code>apply</code>
|
|
431
422
|
*/
|
|
432
|
-
@
|
|
433
|
-
@
|
|
423
|
+
@privateExtension()
|
|
424
|
+
@finalExtension()
|
|
434
425
|
getControlStateHandler(oControl: any) {
|
|
435
426
|
const aInternalControlStateHandler = [],
|
|
436
427
|
aCustomControlStateHandler: any[] = [];
|
|
@@ -456,8 +447,8 @@ class ViewState extends ControllerExtension {
|
|
|
456
447
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptStateControls
|
|
457
448
|
* @protected
|
|
458
449
|
*/
|
|
459
|
-
@
|
|
460
|
-
@
|
|
450
|
+
@publicExtension()
|
|
451
|
+
@extensible(OverrideExecution.After)
|
|
461
452
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
462
453
|
adaptStateControls(aCollectedControls: ManagedObject[]) {
|
|
463
454
|
// to be overridden if needed
|
|
@@ -469,8 +460,8 @@ class ViewState extends ControllerExtension {
|
|
|
469
460
|
* @param {sap.ui.base.ManagedObject} oControl The control to get state key for
|
|
470
461
|
* @returns {string} The key to be used for storing the controls state
|
|
471
462
|
*/
|
|
472
|
-
@
|
|
473
|
-
@
|
|
463
|
+
@publicExtension()
|
|
464
|
+
@finalExtension()
|
|
474
465
|
getStateKey(oControl: any) {
|
|
475
466
|
return this.getView().getLocalId(oControl.getId()) || oControl.getId();
|
|
476
467
|
}
|
|
@@ -484,8 +475,8 @@ class ViewState extends ControllerExtension {
|
|
|
484
475
|
* @alias sap.fe.core.controllerextensions.ViewState#retrieveViewState
|
|
485
476
|
* @public
|
|
486
477
|
*/
|
|
487
|
-
@
|
|
488
|
-
@
|
|
478
|
+
@publicExtension()
|
|
479
|
+
@finalExtension()
|
|
489
480
|
retrieveViewState() {
|
|
490
481
|
++this._iRetrievingStateCounter;
|
|
491
482
|
return this._pInitialStateApplied
|
|
@@ -495,7 +486,7 @@ class ViewState extends ControllerExtension {
|
|
|
495
486
|
.then((aControls: any) => {
|
|
496
487
|
return Promise.all(
|
|
497
488
|
aControls
|
|
498
|
-
.filter(function(oControl: any) {
|
|
489
|
+
.filter(function (oControl: any) {
|
|
499
490
|
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
500
491
|
})
|
|
501
492
|
.map((oControl: any) => {
|
|
@@ -508,15 +499,15 @@ class ViewState extends ControllerExtension {
|
|
|
508
499
|
})
|
|
509
500
|
);
|
|
510
501
|
})
|
|
511
|
-
.then(function(aResolvedStates: any) {
|
|
512
|
-
return aResolvedStates.reduce(function(oStates: any, mState: any) {
|
|
502
|
+
.then(function (aResolvedStates: any) {
|
|
503
|
+
return aResolvedStates.reduce(function (oStates: any, mState: any) {
|
|
513
504
|
const oCurrentState: any = {};
|
|
514
505
|
oCurrentState[mState.key] = mState.value;
|
|
515
506
|
return mergeObjects(oStates, oCurrentState);
|
|
516
507
|
}, {});
|
|
517
508
|
})
|
|
518
509
|
.then((oViewState: any) => {
|
|
519
|
-
return Promise.resolve(this._retrieveAdditionalStates()).then(function(mAdditionalStates: any) {
|
|
510
|
+
return Promise.resolve(this._retrieveAdditionalStates()).then(function (mAdditionalStates: any) {
|
|
520
511
|
if (mAdditionalStates && Object.keys(mAdditionalStates).length) {
|
|
521
512
|
oViewState[ADDITIONAL_STATES_KEY] = mAdditionalStates;
|
|
522
513
|
}
|
|
@@ -542,8 +533,8 @@ class ViewState extends ControllerExtension {
|
|
|
542
533
|
* @alias sap.fe.core.controllerextensions.ViewState#retrieveAdditionalStates
|
|
543
534
|
* @protected
|
|
544
535
|
*/
|
|
545
|
-
@
|
|
546
|
-
@
|
|
536
|
+
@publicExtension()
|
|
537
|
+
@extensible(OverrideExecution.After)
|
|
547
538
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
548
539
|
retrieveAdditionalStates(mAdditionalStates: object) {
|
|
549
540
|
// to be overridden if needed
|
|
@@ -566,8 +557,8 @@ class ViewState extends ControllerExtension {
|
|
|
566
557
|
* @param {sap.ui.base.ManagedObject} oControl The object to get the state for
|
|
567
558
|
* @returns {Promise<object>} The state for the given control
|
|
568
559
|
*/
|
|
569
|
-
@
|
|
570
|
-
@
|
|
560
|
+
@privateExtension()
|
|
561
|
+
@finalExtension()
|
|
571
562
|
retrieveControlState(oControl: any) {
|
|
572
563
|
const aControlStateHandlers = this.getControlStateHandler(oControl);
|
|
573
564
|
return Promise.all(
|
|
@@ -578,7 +569,7 @@ class ViewState extends ControllerExtension {
|
|
|
578
569
|
return mControlStateHandler.retrieve.call(this, oControl);
|
|
579
570
|
})
|
|
580
571
|
).then((aStates: any[]) => {
|
|
581
|
-
return aStates.reduce(function(oFinalState: any, oCurrentState: any) {
|
|
572
|
+
return aStates.reduce(function (oFinalState: any, oCurrentState: any) {
|
|
582
573
|
return mergeObjects(oFinalState, oCurrentState);
|
|
583
574
|
}, {});
|
|
584
575
|
});
|
|
@@ -599,8 +590,8 @@ class ViewState extends ControllerExtension {
|
|
|
599
590
|
* @alias sap.fe.core.controllerextensions.ViewState#applyInitialStateOnly
|
|
600
591
|
* @protected
|
|
601
592
|
*/
|
|
602
|
-
@
|
|
603
|
-
@
|
|
593
|
+
@publicExtension()
|
|
594
|
+
@extensible(OverrideExecution.Instead)
|
|
604
595
|
applyInitialStateOnly() {
|
|
605
596
|
return true;
|
|
606
597
|
}
|
|
@@ -619,8 +610,8 @@ class ViewState extends ControllerExtension {
|
|
|
619
610
|
* @alias sap.fe.core.controllerextensions.ViewState#applyViewState
|
|
620
611
|
* @public
|
|
621
612
|
*/
|
|
622
|
-
@
|
|
623
|
-
@
|
|
613
|
+
@publicExtension()
|
|
614
|
+
@finalExtension()
|
|
624
615
|
applyViewState(
|
|
625
616
|
oViewState: any,
|
|
626
617
|
oNavParameter: {
|
|
@@ -640,7 +631,7 @@ class ViewState extends ControllerExtension {
|
|
|
640
631
|
.then((aControls: any) => {
|
|
641
632
|
let oPromiseChain = Promise.resolve();
|
|
642
633
|
aControls
|
|
643
|
-
.filter(function(oControl: any) {
|
|
634
|
+
.filter(function (oControl: any) {
|
|
644
635
|
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
645
636
|
})
|
|
646
637
|
.forEach((oControl: any) => {
|
|
@@ -666,11 +657,11 @@ class ViewState extends ControllerExtension {
|
|
|
666
657
|
});
|
|
667
658
|
}
|
|
668
659
|
|
|
669
|
-
@
|
|
660
|
+
@privateExtension()
|
|
670
661
|
_checkIfVariantIdIsAvailable(oVM: any, sVariantId: any) {
|
|
671
662
|
const aVariants = oVM.getVariants();
|
|
672
663
|
let bIsControlStateVariantAvailable = false;
|
|
673
|
-
aVariants.forEach(function(oVariant: any) {
|
|
664
|
+
aVariants.forEach(function (oVariant: any) {
|
|
674
665
|
if (oVariant.key === sVariantId) {
|
|
675
666
|
bIsControlStateVariantAvailable = true;
|
|
676
667
|
}
|
|
@@ -700,8 +691,8 @@ class ViewState extends ControllerExtension {
|
|
|
700
691
|
* @alias sap.fe.core.controllerextensions.ViewState#onBeforeStateApplied
|
|
701
692
|
* @protected
|
|
702
693
|
*/
|
|
703
|
-
@
|
|
704
|
-
@
|
|
694
|
+
@publicExtension()
|
|
695
|
+
@extensible(OverrideExecution.After)
|
|
705
696
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
706
697
|
onBeforeStateApplied(aPromises: Promise<any>) {
|
|
707
698
|
// to be overriden
|
|
@@ -718,8 +709,8 @@ class ViewState extends ControllerExtension {
|
|
|
718
709
|
* @alias sap.fe.core.controllerextensions.ViewState#onAfterStateApplied
|
|
719
710
|
* @protected
|
|
720
711
|
*/
|
|
721
|
-
@
|
|
722
|
-
@
|
|
712
|
+
@publicExtension()
|
|
713
|
+
@extensible(OverrideExecution.After)
|
|
723
714
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
724
715
|
onAfterStateApplied(aPromises: Promise<any>) {
|
|
725
716
|
// to be overriden
|
|
@@ -737,8 +728,8 @@ class ViewState extends ControllerExtension {
|
|
|
737
728
|
* @alias sap.fe.core.controllerextensions.ViewState#applyAdditionalStates
|
|
738
729
|
* @protected
|
|
739
730
|
*/
|
|
740
|
-
@
|
|
741
|
-
@
|
|
731
|
+
@publicExtension()
|
|
732
|
+
@extensible(OverrideExecution.After)
|
|
742
733
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
743
734
|
applyAdditionalStates(oViewState: object, aPromises: Promise<any>) {
|
|
744
735
|
// to be overridden if needed
|
|
@@ -760,8 +751,8 @@ class ViewState extends ControllerExtension {
|
|
|
760
751
|
* @alias sap.fe.core.controllerextensions.ViewState#applyNavigationParameters
|
|
761
752
|
* @protected
|
|
762
753
|
*/
|
|
763
|
-
@
|
|
764
|
-
@
|
|
754
|
+
@publicExtension()
|
|
755
|
+
@extensible(OverrideExecution.After)
|
|
765
756
|
applyNavigationParameters(
|
|
766
757
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
767
758
|
oNavParameter: {
|
|
@@ -784,8 +775,8 @@ class ViewState extends ControllerExtension {
|
|
|
784
775
|
* @param {object} [oNavParameters] The current navigation parameters
|
|
785
776
|
* @returns {any} Return a promise for async state handling
|
|
786
777
|
*/
|
|
787
|
-
@
|
|
788
|
-
@
|
|
778
|
+
@privateExtension()
|
|
779
|
+
@finalExtension()
|
|
789
780
|
applyControlState(oControl: any, oControlState: object, oNavParameters?: object) {
|
|
790
781
|
const aControlStateHandlers = this.getControlStateHandler(oControl);
|
|
791
782
|
let oPromiseChain = Promise.resolve();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
sap.ui.define(["sap/ui/base/ManagedObject"], function (ManagedObject) {
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @class
|
|
10
|
+
* A custom element to evaluate the value of Binding.
|
|
11
|
+
*
|
|
12
|
+
* @name sap.fe.core.controls.Any
|
|
13
|
+
* @hideconstructor
|
|
14
|
+
*/
|
|
15
|
+
var Any = ManagedObject.extend("sap.fe.core.controls.Any", {
|
|
16
|
+
metadata: {
|
|
17
|
+
properties: {
|
|
18
|
+
any: "any"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
updateProperty: function () {
|
|
22
|
+
// Avoid Promise processing in ManagedObject and set Promise as value directly
|
|
23
|
+
this.setAny(this.getBindingInfo("any").binding.getExternalValue());
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return Any;
|
|
27
|
+
}, false);
|
|
28
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFueS50cyJdLCJuYW1lcyI6WyJBbnkiLCJNYW5hZ2VkT2JqZWN0IiwiZXh0ZW5kIiwibWV0YWRhdGEiLCJwcm9wZXJ0aWVzIiwiYW55IiwidXBkYXRlUHJvcGVydHkiLCJzZXRBbnkiLCJnZXRCaW5kaW5nSW5mbyIsImJpbmRpbmciLCJnZXRFeHRlcm5hbFZhbHVlIl0sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBOzs7O0FBUUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxNQUFNQSxHQUFHLEdBQUdDLGFBQWEsQ0FBQ0MsTUFBZCxDQUFxQiwwQkFBckIsRUFBaUQ7QUFDNURDLElBQUFBLFFBQVEsRUFBRTtBQUNUQyxNQUFBQSxVQUFVLEVBQUU7QUFDWEMsUUFBQUEsR0FBRyxFQUFFO0FBRE07QUFESCxLQURrRDtBQU01REMsSUFBQUEsY0FBYyxFQUFFLFlBQXlCO0FBQ3hDO0FBQ0EsV0FBS0MsTUFBTCxDQUFhLEtBQUtDLGNBQUwsQ0FBb0IsS0FBcEIsQ0FBRCxDQUFvQ0MsT0FBcEMsQ0FBNENDLGdCQUE1QyxFQUFaO0FBQ0E7QUFUMkQsR0FBakQsQ0FBWjtTQVllVixHIiwic291cmNlUm9vdCI6Ii4iLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgTWFuYWdlZE9iamVjdCBmcm9tIFwic2FwL3VpL2Jhc2UvTWFuYWdlZE9iamVjdFwiO1xuXG5leHBvcnQgdHlwZSBBbnlUeXBlID0gTWFuYWdlZE9iamVjdCAmIHtcblx0bUJpbmRpbmdJbmZvczogb2JqZWN0O1xuXHRnZXRBbnkoKTogYW55O1xuXHRzZXRBbnkodmFsdWU6IGFueSk6IHZvaWQ7XG5cdGdldEJpbmRpbmdJbmZvKHByb3BlcnR5OiBzdHJpbmcpOiBvYmplY3Q7XG5cdGV4dGVuZChzTmFtZTogc3RyaW5nLCBzRXh0ZW5zaW9uOiBhbnkpOiBBbnlUeXBlO1xufTtcblxuLyoqXG4gKiBAY2xhc3NcbiAqIEEgY3VzdG9tIGVsZW1lbnQgdG8gZXZhbHVhdGUgdGhlIHZhbHVlIG9mIEJpbmRpbmcuXG4gKlxuICogQG5hbWUgc2FwLmZlLmNvcmUuY29udHJvbHMuQW55XG4gKiBAaGlkZWNvbnN0cnVjdG9yXG4gKi9cbmNvbnN0IEFueSA9IE1hbmFnZWRPYmplY3QuZXh0ZW5kKFwic2FwLmZlLmNvcmUuY29udHJvbHMuQW55XCIsIHtcblx0bWV0YWRhdGE6IHtcblx0XHRwcm9wZXJ0aWVzOiB7XG5cdFx0XHRhbnk6IFwiYW55XCJcblx0XHR9XG5cdH0sXG5cdHVwZGF0ZVByb3BlcnR5OiBmdW5jdGlvbiAodGhpczogQW55VHlwZSkge1xuXHRcdC8vIEF2b2lkIFByb21pc2UgcHJvY2Vzc2luZyBpbiBNYW5hZ2VkT2JqZWN0IGFuZCBzZXQgUHJvbWlzZSBhcyB2YWx1ZSBkaXJlY3RseVxuXHRcdHRoaXMuc2V0QW55KCh0aGlzLmdldEJpbmRpbmdJbmZvKFwiYW55XCIpIGFzIGFueSkuYmluZGluZy5nZXRFeHRlcm5hbFZhbHVlKCkpO1xuXHR9XG59KTtcblxuZXhwb3J0IGRlZmF1bHQgQW55IGFzIGFueTtcbiJdfQ==
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import ManagedObject from "sap/ui/base/ManagedObject";
|
|
2
|
+
|
|
3
|
+
export type AnyType = ManagedObject & {
|
|
4
|
+
mBindingInfos: object;
|
|
5
|
+
getAny(): any;
|
|
6
|
+
setAny(value: any): void;
|
|
7
|
+
getBindingInfo(property: string): object;
|
|
8
|
+
extend(sName: string, sExtension: any): AnyType;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @class
|
|
13
|
+
* A custom element to evaluate the value of Binding.
|
|
14
|
+
*
|
|
15
|
+
* @name sap.fe.core.controls.Any
|
|
16
|
+
* @hideconstructor
|
|
17
|
+
*/
|
|
18
|
+
const Any = ManagedObject.extend("sap.fe.core.controls.Any", {
|
|
19
|
+
metadata: {
|
|
20
|
+
properties: {
|
|
21
|
+
any: "any"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
updateProperty: function (this: AnyType) {
|
|
25
|
+
// Avoid Promise processing in ManagedObject and set Promise as value directly
|
|
26
|
+
this.setAny((this.getBindingInfo("any") as any).binding.getExternalValue());
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export default Any as any;
|