@sapui5/sap.fe.core 1.100.0 → 1.102.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/AppComponent.js +23 -30
- package/src/sap/fe/core/AppComponent.ts +35 -40
- package/src/sap/fe/core/AppStateHandler.js +8 -8
- package/src/sap/fe/core/AppStateHandler.ts +11 -11
- 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 +122 -101
- package/src/sap/fe/core/CommonUtils.ts +239 -193
- package/src/sap/fe/core/ExtensionAPI.js +12 -13
- package/src/sap/fe/core/ExtensionAPI.ts +21 -31
- package/src/sap/fe/core/PageController.js +19 -13
- package/src/sap/fe/core/PageController.ts +40 -34
- package/src/sap/fe/core/TemplateComponent.js +198 -123
- package/src/sap/fe/core/TemplateComponent.ts +109 -121
- package/src/sap/fe/core/TemplateModel.js +7 -9
- package/src/sap/fe/core/TemplateModel.ts +3 -3
- 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 +935 -0
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +837 -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/{BusyLocker.js → controllerextensions/BusyLocker.js} +1 -1
- package/src/sap/fe/core/{BusyLocker.ts → controllerextensions/BusyLocker.ts} +7 -7
- package/src/sap/fe/core/controllerextensions/EditFlow.js +660 -288
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +513 -331
- 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 +43 -25
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +132 -103
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +16 -16
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +64 -55
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +166 -99
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +187 -149
- 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 +13 -12
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +22 -22
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +14 -26
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +20 -30
- 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 +24 -15
- package/src/sap/fe/core/controllerextensions/Paginator.ts +35 -20
- 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 +34 -16
- package/src/sap/fe/core/controllerextensions/Share.ts +50 -32
- package/src/sap/fe/core/controllerextensions/SideEffects.js +15 -15
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +64 -65
- package/src/sap/fe/core/controllerextensions/ViewState.js +27 -31
- package/src/sap/fe/core/controllerextensions/ViewState.ts +103 -102
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +105 -0
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +98 -0
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +360 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/ActivitySync.ts +90 -132
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +146 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/CollaborationCommon.ts +18 -8
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +264 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/Manage.ts +35 -33
- package/src/sap/fe/core/controllerextensions/collaboration/ManageDialog.fragment.xml +100 -0
- package/src/sap/fe/core/{actions → controllerextensions}/collaboration/UserDetails.fragment.xml +5 -7
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +1584 -0
- package/src/sap/fe/core/{TransactionHelper.ts → controllerextensions/editFlow/TransactionHelper.ts} +190 -159
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +780 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/draft.ts +329 -76
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +1149 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/operations.ts +169 -97
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +190 -0
- package/src/sap/fe/core/{actions → controllerextensions/editFlow}/sticky.ts +76 -12
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +592 -0
- package/src/sap/fe/core/{actions → controllerextensions/messageHandler}/messageHandling.ts +83 -60
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +940 -0
- package/src/sap/fe/core/{RouterProxy.ts → controllerextensions/routing/RouterProxy.ts} +52 -36
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +21 -18
- 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 +50 -16
- package/src/sap/fe/core/controls/CommandExecution.ts +31 -22
- 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 +371 -0
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +282 -0
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +74 -36
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +23 -32
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossDraft.fragment.xml +52 -5
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +127 -67
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +127 -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 +360 -0
- package/src/sap/fe/core/controls/FileWrapper.ts +202 -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 +102 -37
- package/src/sap/fe/core/controls/FormElementWrapper.ts +43 -35
- package/src/sap/fe/core/controls/MassEditSelect.js +33 -0
- package/src/sap/fe/core/controls/MassEditSelect.ts +45 -0
- 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 +2 -2
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +23 -28
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +41 -81
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +107 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +550 -35
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +604 -35
- package/src/sap/fe/core/converters/ManifestSettings.js +3 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +9 -2
- package/src/sap/fe/core/converters/MetaModelConverter.js +11 -40
- package/src/sap/fe/core/converters/MetaModelConverter.ts +56 -84
- package/src/sap/fe/core/converters/annotations/DataField.js +20 -5
- package/src/sap/fe/core/converters/annotations/DataField.ts +27 -6
- package/src/sap/fe/core/converters/controls/Common/Action.js +14 -21
- package/src/sap/fe/core/converters/controls/Common/Action.ts +23 -28
- package/src/sap/fe/core/converters/controls/Common/Chart.js +17 -10
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +20 -14
- package/src/sap/fe/core/converters/controls/Common/Form.js +16 -18
- package/src/sap/fe/core/converters/controls/Common/Form.ts +20 -20
- 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 +389 -173
- package/src/sap/fe/core/converters/controls/Common/Table.ts +440 -244
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +26 -16
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +27 -19
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +78 -47
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +146 -107
- 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 +30 -25
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +39 -34
- package/src/sap/fe/core/converters/helpers/Aggregation.js +10 -2
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +18 -13
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +3 -2
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +6 -5
- 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 +28 -28
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +38 -45
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +3 -3
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +8 -6
- 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 +74 -13
- package/src/sap/fe/core/formatters/TableFormatter.ts +71 -16
- 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/BindingExpression.js +10 -7
- package/src/sap/fe/core/helpers/BindingExpression.ts +37 -35
- package/src/sap/fe/core/helpers/ClassSupport.js +273 -256
- package/src/sap/fe/core/helpers/ClassSupport.ts +315 -237
- package/src/sap/fe/core/helpers/FPMHelper.js +3 -2
- package/src/sap/fe/core/helpers/FPMHelper.ts +9 -8
- package/src/sap/fe/core/helpers/MassEditHelper.js +522 -147
- package/src/sap/fe/core/helpers/MassEditHelper.ts +563 -236
- package/src/sap/fe/core/helpers/ModelHelper.js +29 -1
- package/src/sap/fe/core/helpers/ModelHelper.ts +39 -26
- 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 +5 -7
- package/src/sap/fe/core/helpers/StableIdHelper.ts +8 -8
- package/src/sap/fe/core/{Synchronization.js → helpers/Synchronization.js} +1 -1
- package/src/sap/fe/core/{Synchronization.ts → helpers/Synchronization.ts} +1 -1
- 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 +13 -5
- package/src/sap/fe/core/library.ts +26 -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 +135 -180
- package/src/sap/fe/core/messagebundle_ar.properties +31 -64
- package/src/sap/fe/core/messagebundle_bg.properties +31 -64
- package/src/sap/fe/core/messagebundle_ca.properties +31 -64
- package/src/sap/fe/core/messagebundle_cs.properties +31 -64
- package/src/sap/fe/core/messagebundle_cy.properties +32 -65
- package/src/sap/fe/core/messagebundle_da.properties +31 -64
- package/src/sap/fe/core/messagebundle_de.properties +29 -62
- package/src/sap/fe/core/messagebundle_el.properties +32 -65
- package/src/sap/fe/core/messagebundle_en.properties +32 -65
- package/src/sap/fe/core/messagebundle_en_GB.properties +29 -62
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +41 -74
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +32 -65
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +20 -6
- package/src/sap/fe/core/messagebundle_es.properties +31 -64
- package/src/sap/fe/core/messagebundle_es_MX.properties +31 -64
- package/src/sap/fe/core/messagebundle_et.properties +31 -64
- package/src/sap/fe/core/messagebundle_fi.properties +29 -62
- package/src/sap/fe/core/messagebundle_fr.properties +36 -69
- package/src/sap/fe/core/messagebundle_fr_CA.properties +33 -66
- package/src/sap/fe/core/messagebundle_hi.properties +29 -62
- package/src/sap/fe/core/messagebundle_hr.properties +32 -65
- package/src/sap/fe/core/messagebundle_hu.properties +30 -63
- package/src/sap/fe/core/messagebundle_id.properties +32 -65
- package/src/sap/fe/core/messagebundle_it.properties +31 -64
- package/src/sap/fe/core/messagebundle_iw.properties +31 -64
- package/src/sap/fe/core/messagebundle_ja.properties +29 -62
- package/src/sap/fe/core/messagebundle_kk.properties +31 -64
- package/src/sap/fe/core/messagebundle_ko.properties +31 -64
- package/src/sap/fe/core/messagebundle_lt.properties +31 -64
- package/src/sap/fe/core/messagebundle_lv.properties +32 -65
- package/src/sap/fe/core/messagebundle_ms.properties +31 -64
- package/src/sap/fe/core/messagebundle_nl.properties +31 -64
- package/src/sap/fe/core/messagebundle_no.properties +31 -64
- package/src/sap/fe/core/messagebundle_pl.properties +34 -67
- package/src/sap/fe/core/messagebundle_pt.properties +32 -65
- package/src/sap/fe/core/messagebundle_pt_PT.properties +31 -64
- package/src/sap/fe/core/messagebundle_ro.properties +33 -66
- package/src/sap/fe/core/messagebundle_ru.properties +33 -66
- package/src/sap/fe/core/messagebundle_sh.properties +31 -64
- package/src/sap/fe/core/messagebundle_sk.properties +31 -64
- package/src/sap/fe/core/messagebundle_sl.properties +29 -62
- package/src/sap/fe/core/messagebundle_sv.properties +30 -63
- package/src/sap/fe/core/messagebundle_th.properties +31 -64
- package/src/sap/fe/core/messagebundle_tr.properties +31 -64
- package/src/sap/fe/core/messagebundle_uk.properties +32 -65
- package/src/sap/fe/core/messagebundle_vi.properties +31 -64
- package/src/sap/fe/core/messagebundle_zh_CN.properties +32 -65
- package/src/sap/fe/core/messagebundle_zh_TW.properties +34 -67
- 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 +11 -8
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +15 -13
- package/src/sap/fe/core/services/NavigationServiceFactory.js +5 -5
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +9 -5
- 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 +105 -66
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +59 -49
- package/src/sap/fe/core/services/ShellServicesFactory.js +104 -29
- package/src/sap/fe/core/services/ShellServicesFactory.ts +64 -30
- 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 +11 -10
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +38 -51
- 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 +27 -6
- package/src/sap/fe/core/templating/EntitySetHelper.js +1 -9
- package/src/sap/fe/core/templating/EntitySetHelper.ts +11 -13
- package/src/sap/fe/core/templating/FilterHelper.js +4 -4
- package/src/sap/fe/core/templating/FilterHelper.ts +6 -5
- package/src/sap/fe/core/templating/PropertyHelper.js +70 -33
- package/src/sap/fe/core/templating/PropertyHelper.ts +49 -27
- package/src/sap/fe/core/templating/UIFormatters.js +133 -22
- package/src/sap/fe/core/templating/UIFormatters.ts +144 -50
- package/src/sap/fe/core/type/DateTimeWithTimezone.js +47 -0
- package/src/sap/fe/core/type/DateTimeWithTimezone.ts +23 -0
- 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/AnnotationHelper.js +0 -312
- package/src/sap/fe/core/AnnotationHelper.ts +0 -315
- package/src/sap/fe/core/RouterProxy.js +0 -926
- package/src/sap/fe/core/TransactionHelper.js +0 -1562
- package/src/sap/fe/core/actions/collaboration/ActivitySync.js +0 -392
- package/src/sap/fe/core/actions/collaboration/CollaborationCommon.js +0 -136
- package/src/sap/fe/core/actions/collaboration/Manage.js +0 -262
- package/src/sap/fe/core/actions/collaboration/ManageDialog.fragment.xml +0 -103
- package/src/sap/fe/core/actions/draft.js +0 -523
- package/src/sap/fe/core/actions/messageHandling.js +0 -567
- package/src/sap/fe/core/actions/nonDraft.js +0 -20
- package/src/sap/fe/core/actions/nonDraft.ts +0 -12
- package/src/sap/fe/core/actions/operations.js +0 -1096
- package/src/sap/fe/core/actions/sticky.js +0 -130
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +0 -78
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.ts +0 -65
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +0 -77
- package/src/sap/fe/core/formatters/CriticalityFormatter.ts +0 -58
|
@@ -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();
|
|
@@ -110,16 +112,26 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
},
|
|
115
|
+
"sap.ui.mdc.Chart": {
|
|
116
|
+
retrieve: function (oChart: any) {
|
|
117
|
+
return StateUtil.retrieveExternalState(oChart);
|
|
118
|
+
},
|
|
119
|
+
apply: function (oChart: any, oControlState: any) {
|
|
120
|
+
if (oControlState) {
|
|
121
|
+
return StateUtil.applyExternalState(oChart, oControlState);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
113
125
|
"sap.uxap.ObjectPageLayout": {
|
|
114
|
-
retrieve: function(oOPLayout: any) {
|
|
126
|
+
retrieve: function (oOPLayout: any) {
|
|
115
127
|
return {
|
|
116
128
|
selectedSection: oOPLayout.getSelectedSection()
|
|
117
129
|
};
|
|
118
130
|
},
|
|
119
|
-
apply: function(oOPLayout: any, oControlState: any) {
|
|
131
|
+
apply: function (oOPLayout: any, oControlState: any) {
|
|
120
132
|
oControlState && oOPLayout.setSelectedSection(oControlState.selectedSection);
|
|
121
133
|
},
|
|
122
|
-
refreshBinding: function(oOPLayout: any) {
|
|
134
|
+
refreshBinding: function (oOPLayout: any) {
|
|
123
135
|
const oBindingContext = oOPLayout.getBindingContext();
|
|
124
136
|
const oBinding = oBindingContext && oBindingContext.getBinding();
|
|
125
137
|
if (oBinding) {
|
|
@@ -133,7 +145,7 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
133
145
|
CommonUtils.getContextPathProperties(oMetaModel, sMetaPath, {
|
|
134
146
|
$kind: "NavigationProperty"
|
|
135
147
|
}) || {},
|
|
136
|
-
aNavPropertiesToRequest = Object.keys(oNavigationProperties).reduce(function(aPrev: any[], sNavProp: string) {
|
|
148
|
+
aNavPropertiesToRequest = Object.keys(oNavigationProperties).reduce(function (aPrev: any[], sNavProp: string) {
|
|
137
149
|
if (oNavigationProperties[sNavProp].$isCollection !== true) {
|
|
138
150
|
aPrev.push({ $NavigationPropertyPath: sNavProp });
|
|
139
151
|
}
|
|
@@ -153,60 +165,60 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
153
165
|
}
|
|
154
166
|
},
|
|
155
167
|
"sap.fe.macros.table.QuickFilterContainer": {
|
|
156
|
-
retrieve: function(oQuickFilter: any) {
|
|
168
|
+
retrieve: function (oQuickFilter: any) {
|
|
157
169
|
return {
|
|
158
170
|
selectedKey: oQuickFilter.getSelectorKey()
|
|
159
171
|
};
|
|
160
172
|
},
|
|
161
|
-
apply: function(oQuickFilter: any, oControlState: any) {
|
|
173
|
+
apply: function (oQuickFilter: any, oControlState: any) {
|
|
162
174
|
oControlState && oQuickFilter.setSelectorKey(oControlState.selectedKey);
|
|
163
175
|
}
|
|
164
176
|
},
|
|
165
177
|
"sap.m.SegmentedButton": {
|
|
166
|
-
retrieve: function(oSegmentedButton: any) {
|
|
178
|
+
retrieve: function (oSegmentedButton: any) {
|
|
167
179
|
return {
|
|
168
180
|
selectedKey: oSegmentedButton.getSelectedKey()
|
|
169
181
|
};
|
|
170
182
|
},
|
|
171
|
-
apply: function(oSegmentedButton: any, oControlState: any) {
|
|
183
|
+
apply: function (oSegmentedButton: any, oControlState: any) {
|
|
172
184
|
oControlState && oSegmentedButton.setSelectedKey(oControlState.selectedKey);
|
|
173
185
|
}
|
|
174
186
|
},
|
|
175
187
|
"sap.m.Select": {
|
|
176
|
-
retrieve: function(oSelect: any) {
|
|
188
|
+
retrieve: function (oSelect: any) {
|
|
177
189
|
return {
|
|
178
190
|
selectedKey: oSelect.getSelectedKey()
|
|
179
191
|
};
|
|
180
192
|
},
|
|
181
|
-
apply: function(oSelect: any, oControlState: any) {
|
|
193
|
+
apply: function (oSelect: any, oControlState: any) {
|
|
182
194
|
oControlState && oSelect.setSelectedKey(oControlState.selectedKey);
|
|
183
195
|
}
|
|
184
196
|
},
|
|
185
197
|
"sap.f.DynamicPage": {
|
|
186
|
-
retrieve: function(oDynamicPage: any) {
|
|
198
|
+
retrieve: function (oDynamicPage: any) {
|
|
187
199
|
return {
|
|
188
200
|
headerExpanded: oDynamicPage.getHeaderExpanded()
|
|
189
201
|
};
|
|
190
202
|
},
|
|
191
|
-
apply: function(oDynamicPage: any, oControlState: any) {
|
|
203
|
+
apply: function (oDynamicPage: any, oControlState: any) {
|
|
192
204
|
oControlState && oDynamicPage.setHeaderExpanded(oControlState.headerExpanded);
|
|
193
205
|
}
|
|
194
206
|
},
|
|
195
207
|
"sap.ui.core.mvc.View": {
|
|
196
|
-
retrieve: function(oView: any) {
|
|
208
|
+
retrieve: function (oView: any) {
|
|
197
209
|
const oController = oView.getController();
|
|
198
210
|
if (oController && oController.viewState) {
|
|
199
211
|
return oController.viewState.retrieveViewState(oController.viewState);
|
|
200
212
|
}
|
|
201
213
|
return {};
|
|
202
214
|
},
|
|
203
|
-
apply: function(oView: any, oControlState: any, oNavParameters: any) {
|
|
215
|
+
apply: function (oView: any, oControlState: any, oNavParameters: any) {
|
|
204
216
|
const oController = oView.getController();
|
|
205
217
|
if (oController && oController.viewState) {
|
|
206
218
|
return oController.viewState.applyViewState(oControlState, oNavParameters);
|
|
207
219
|
}
|
|
208
220
|
},
|
|
209
|
-
refreshBinding: function(oView: any) {
|
|
221
|
+
refreshBinding: function (oView: any) {
|
|
210
222
|
const oController = oView.getController();
|
|
211
223
|
if (oController && oController.viewState) {
|
|
212
224
|
return oController.viewState.refreshViewBindings();
|
|
@@ -214,14 +226,14 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
214
226
|
}
|
|
215
227
|
},
|
|
216
228
|
"sap.ui.core.ComponentContainer": {
|
|
217
|
-
retrieve: function(oComponentContainer: any) {
|
|
229
|
+
retrieve: function (oComponentContainer: any) {
|
|
218
230
|
const oComponent = oComponentContainer.getComponentInstance();
|
|
219
231
|
if (oComponent) {
|
|
220
232
|
return this.retrieveControlState(oComponent.getRootControl());
|
|
221
233
|
}
|
|
222
234
|
return {};
|
|
223
235
|
},
|
|
224
|
-
apply: function(oComponentContainer: any, oControlState: any, oNavParameters: any) {
|
|
236
|
+
apply: function (oComponentContainer: any, oControlState: any, oNavParameters: any) {
|
|
225
237
|
const oComponent = oComponentContainer.getComponentInstance();
|
|
226
238
|
if (oComponent) {
|
|
227
239
|
return this.applyControlState(oComponent.getRootControl(), oControlState, oNavParameters);
|
|
@@ -238,7 +250,7 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
238
250
|
* @public
|
|
239
251
|
* @since 1.85.0
|
|
240
252
|
*/
|
|
241
|
-
@
|
|
253
|
+
@defineUI5Class("sap.fe.core.controllerextensions.ViewState")
|
|
242
254
|
class ViewState extends ControllerExtension {
|
|
243
255
|
private _iRetrievingStateCounter: number;
|
|
244
256
|
private _pInitialStateApplied: Promise<unknown>;
|
|
@@ -251,24 +263,13 @@ class ViewState extends ControllerExtension {
|
|
|
251
263
|
constructor() {
|
|
252
264
|
super();
|
|
253
265
|
this._iRetrievingStateCounter = 0;
|
|
254
|
-
this._pInitialStateApplied = new Promise(resolve => {
|
|
266
|
+
this._pInitialStateApplied = new Promise((resolve) => {
|
|
255
267
|
this._pInitialStateAppliedResolve = resolve;
|
|
256
268
|
});
|
|
257
269
|
}
|
|
258
270
|
|
|
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
|
|
271
|
+
@publicExtension()
|
|
272
|
+
@finalExtension()
|
|
272
273
|
refreshViewBindings() {
|
|
273
274
|
return this.collectResults(this.base.viewState.adaptBindingRefreshControls).then((aControls: any) => {
|
|
274
275
|
let oPromiseChain = Promise.resolve();
|
|
@@ -291,15 +292,15 @@ class ViewState extends ControllerExtension {
|
|
|
291
292
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshControls
|
|
292
293
|
* @protected
|
|
293
294
|
*/
|
|
294
|
-
@
|
|
295
|
-
@
|
|
295
|
+
@publicExtension()
|
|
296
|
+
@extensible(OverrideExecution.After)
|
|
296
297
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
297
298
|
adaptBindingRefreshControls(aCollectedControls: ManagedObject[]) {
|
|
298
299
|
// to be overriden
|
|
299
300
|
}
|
|
300
301
|
|
|
301
|
-
@
|
|
302
|
-
@
|
|
302
|
+
@privateExtension()
|
|
303
|
+
@finalExtension()
|
|
303
304
|
refreshControlBinding(oControl: any) {
|
|
304
305
|
const oControlRefreshBindingHandler = this.getControlRefreshBindingHandler(oControl);
|
|
305
306
|
let oPromiseChain = Promise.resolve();
|
|
@@ -318,8 +319,8 @@ class ViewState extends ControllerExtension {
|
|
|
318
319
|
* @returns {object} A plain object with one function: <code>refreshBinding</code>
|
|
319
320
|
*/
|
|
320
321
|
|
|
321
|
-
@
|
|
322
|
-
@
|
|
322
|
+
@privateExtension()
|
|
323
|
+
@finalExtension()
|
|
323
324
|
getControlRefreshBindingHandler(oControl: any): any {
|
|
324
325
|
const oRefreshBindingHandler: any = {};
|
|
325
326
|
if (oControl) {
|
|
@@ -348,8 +349,8 @@ class ViewState extends ControllerExtension {
|
|
|
348
349
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshHandler
|
|
349
350
|
* @protected
|
|
350
351
|
*/
|
|
351
|
-
@
|
|
352
|
-
@
|
|
352
|
+
@publicExtension()
|
|
353
|
+
@extensible(OverrideExecution.After)
|
|
353
354
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
354
355
|
adaptBindingRefreshHandler(oControl: ManagedObject, oControlHandler: any[]) {
|
|
355
356
|
// to be overriden
|
|
@@ -361,8 +362,8 @@ class ViewState extends ControllerExtension {
|
|
|
361
362
|
* @alias sap.fe.core.controllerextensions.ViewState#onSuspend
|
|
362
363
|
* @public
|
|
363
364
|
*/
|
|
364
|
-
@
|
|
365
|
-
@
|
|
365
|
+
@publicExtension()
|
|
366
|
+
@extensible(OverrideExecution.After)
|
|
366
367
|
onSuspend() {
|
|
367
368
|
// to be overriden
|
|
368
369
|
}
|
|
@@ -373,8 +374,8 @@ class ViewState extends ControllerExtension {
|
|
|
373
374
|
* @alias sap.fe.core.controllerextensions.ViewState#onRestore
|
|
374
375
|
* @public
|
|
375
376
|
*/
|
|
376
|
-
@
|
|
377
|
-
@
|
|
377
|
+
@publicExtension()
|
|
378
|
+
@extensible(OverrideExecution.After)
|
|
378
379
|
onRestore() {
|
|
379
380
|
// to be overriden
|
|
380
381
|
}
|
|
@@ -395,8 +396,8 @@ class ViewState extends ControllerExtension {
|
|
|
395
396
|
* @param args
|
|
396
397
|
* @returns {Promise} A promise to be resolved with the result of all overrides
|
|
397
398
|
*/
|
|
398
|
-
@
|
|
399
|
-
@
|
|
399
|
+
@privateExtension()
|
|
400
|
+
@finalExtension()
|
|
400
401
|
collectResults(fnCall: Function, ...args: any[]) {
|
|
401
402
|
const aResults: any[] = [];
|
|
402
403
|
args.push(aResults);
|
|
@@ -416,8 +417,8 @@ class ViewState extends ControllerExtension {
|
|
|
416
417
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptControlStateHandler
|
|
417
418
|
* @protected
|
|
418
419
|
*/
|
|
419
|
-
@
|
|
420
|
-
@
|
|
420
|
+
@publicExtension()
|
|
421
|
+
@extensible(OverrideExecution.After)
|
|
421
422
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
422
423
|
adaptControlStateHandler(oControl: ManagedObject, aControlHandler: object[]) {
|
|
423
424
|
// to be overridden if needed
|
|
@@ -429,8 +430,8 @@ class ViewState extends ControllerExtension {
|
|
|
429
430
|
* @param {sap.ui.base.ManagedObject} oControl The control to get state handler for
|
|
430
431
|
* @returns {object} A plain object with two functions: <code>retrieve</code> and <code>apply</code>
|
|
431
432
|
*/
|
|
432
|
-
@
|
|
433
|
-
@
|
|
433
|
+
@privateExtension()
|
|
434
|
+
@finalExtension()
|
|
434
435
|
getControlStateHandler(oControl: any) {
|
|
435
436
|
const aInternalControlStateHandler = [],
|
|
436
437
|
aCustomControlStateHandler: any[] = [];
|
|
@@ -456,8 +457,8 @@ class ViewState extends ControllerExtension {
|
|
|
456
457
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptStateControls
|
|
457
458
|
* @protected
|
|
458
459
|
*/
|
|
459
|
-
@
|
|
460
|
-
@
|
|
460
|
+
@publicExtension()
|
|
461
|
+
@extensible(OverrideExecution.After)
|
|
461
462
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
462
463
|
adaptStateControls(aCollectedControls: ManagedObject[]) {
|
|
463
464
|
// to be overridden if needed
|
|
@@ -469,8 +470,8 @@ class ViewState extends ControllerExtension {
|
|
|
469
470
|
* @param {sap.ui.base.ManagedObject} oControl The control to get state key for
|
|
470
471
|
* @returns {string} The key to be used for storing the controls state
|
|
471
472
|
*/
|
|
472
|
-
@
|
|
473
|
-
@
|
|
473
|
+
@publicExtension()
|
|
474
|
+
@finalExtension()
|
|
474
475
|
getStateKey(oControl: any) {
|
|
475
476
|
return this.getView().getLocalId(oControl.getId()) || oControl.getId();
|
|
476
477
|
}
|
|
@@ -484,8 +485,8 @@ class ViewState extends ControllerExtension {
|
|
|
484
485
|
* @alias sap.fe.core.controllerextensions.ViewState#retrieveViewState
|
|
485
486
|
* @public
|
|
486
487
|
*/
|
|
487
|
-
@
|
|
488
|
-
@
|
|
488
|
+
@publicExtension()
|
|
489
|
+
@finalExtension()
|
|
489
490
|
retrieveViewState() {
|
|
490
491
|
++this._iRetrievingStateCounter;
|
|
491
492
|
return this._pInitialStateApplied
|
|
@@ -495,7 +496,7 @@ class ViewState extends ControllerExtension {
|
|
|
495
496
|
.then((aControls: any) => {
|
|
496
497
|
return Promise.all(
|
|
497
498
|
aControls
|
|
498
|
-
.filter(function(oControl: any) {
|
|
499
|
+
.filter(function (oControl: any) {
|
|
499
500
|
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
500
501
|
})
|
|
501
502
|
.map((oControl: any) => {
|
|
@@ -508,15 +509,15 @@ class ViewState extends ControllerExtension {
|
|
|
508
509
|
})
|
|
509
510
|
);
|
|
510
511
|
})
|
|
511
|
-
.then(function(aResolvedStates: any) {
|
|
512
|
-
return aResolvedStates.reduce(function(oStates: any, mState: any) {
|
|
512
|
+
.then(function (aResolvedStates: any) {
|
|
513
|
+
return aResolvedStates.reduce(function (oStates: any, mState: any) {
|
|
513
514
|
const oCurrentState: any = {};
|
|
514
515
|
oCurrentState[mState.key] = mState.value;
|
|
515
516
|
return mergeObjects(oStates, oCurrentState);
|
|
516
517
|
}, {});
|
|
517
518
|
})
|
|
518
519
|
.then((oViewState: any) => {
|
|
519
|
-
return Promise.resolve(this._retrieveAdditionalStates()).then(function(mAdditionalStates: any) {
|
|
520
|
+
return Promise.resolve(this._retrieveAdditionalStates()).then(function (mAdditionalStates: any) {
|
|
520
521
|
if (mAdditionalStates && Object.keys(mAdditionalStates).length) {
|
|
521
522
|
oViewState[ADDITIONAL_STATES_KEY] = mAdditionalStates;
|
|
522
523
|
}
|
|
@@ -542,8 +543,8 @@ class ViewState extends ControllerExtension {
|
|
|
542
543
|
* @alias sap.fe.core.controllerextensions.ViewState#retrieveAdditionalStates
|
|
543
544
|
* @protected
|
|
544
545
|
*/
|
|
545
|
-
@
|
|
546
|
-
@
|
|
546
|
+
@publicExtension()
|
|
547
|
+
@extensible(OverrideExecution.After)
|
|
547
548
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
548
549
|
retrieveAdditionalStates(mAdditionalStates: object) {
|
|
549
550
|
// to be overridden if needed
|
|
@@ -566,8 +567,8 @@ class ViewState extends ControllerExtension {
|
|
|
566
567
|
* @param {sap.ui.base.ManagedObject} oControl The object to get the state for
|
|
567
568
|
* @returns {Promise<object>} The state for the given control
|
|
568
569
|
*/
|
|
569
|
-
@
|
|
570
|
-
@
|
|
570
|
+
@privateExtension()
|
|
571
|
+
@finalExtension()
|
|
571
572
|
retrieveControlState(oControl: any) {
|
|
572
573
|
const aControlStateHandlers = this.getControlStateHandler(oControl);
|
|
573
574
|
return Promise.all(
|
|
@@ -578,7 +579,7 @@ class ViewState extends ControllerExtension {
|
|
|
578
579
|
return mControlStateHandler.retrieve.call(this, oControl);
|
|
579
580
|
})
|
|
580
581
|
).then((aStates: any[]) => {
|
|
581
|
-
return aStates.reduce(function(oFinalState: any, oCurrentState: any) {
|
|
582
|
+
return aStates.reduce(function (oFinalState: any, oCurrentState: any) {
|
|
582
583
|
return mergeObjects(oFinalState, oCurrentState);
|
|
583
584
|
}, {});
|
|
584
585
|
});
|
|
@@ -599,8 +600,8 @@ class ViewState extends ControllerExtension {
|
|
|
599
600
|
* @alias sap.fe.core.controllerextensions.ViewState#applyInitialStateOnly
|
|
600
601
|
* @protected
|
|
601
602
|
*/
|
|
602
|
-
@
|
|
603
|
-
@
|
|
603
|
+
@publicExtension()
|
|
604
|
+
@extensible(OverrideExecution.Instead)
|
|
604
605
|
applyInitialStateOnly() {
|
|
605
606
|
return true;
|
|
606
607
|
}
|
|
@@ -619,8 +620,8 @@ class ViewState extends ControllerExtension {
|
|
|
619
620
|
* @alias sap.fe.core.controllerextensions.ViewState#applyViewState
|
|
620
621
|
* @public
|
|
621
622
|
*/
|
|
622
|
-
@
|
|
623
|
-
@
|
|
623
|
+
@publicExtension()
|
|
624
|
+
@finalExtension()
|
|
624
625
|
applyViewState(
|
|
625
626
|
oViewState: any,
|
|
626
627
|
oNavParameter: {
|
|
@@ -640,7 +641,7 @@ class ViewState extends ControllerExtension {
|
|
|
640
641
|
.then((aControls: any) => {
|
|
641
642
|
let oPromiseChain = Promise.resolve();
|
|
642
643
|
aControls
|
|
643
|
-
.filter(function(oControl: any) {
|
|
644
|
+
.filter(function (oControl: any) {
|
|
644
645
|
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
645
646
|
})
|
|
646
647
|
.forEach((oControl: any) => {
|
|
@@ -666,11 +667,11 @@ class ViewState extends ControllerExtension {
|
|
|
666
667
|
});
|
|
667
668
|
}
|
|
668
669
|
|
|
669
|
-
@
|
|
670
|
+
@privateExtension()
|
|
670
671
|
_checkIfVariantIdIsAvailable(oVM: any, sVariantId: any) {
|
|
671
672
|
const aVariants = oVM.getVariants();
|
|
672
673
|
let bIsControlStateVariantAvailable = false;
|
|
673
|
-
aVariants.forEach(function(oVariant: any) {
|
|
674
|
+
aVariants.forEach(function (oVariant: any) {
|
|
674
675
|
if (oVariant.key === sVariantId) {
|
|
675
676
|
bIsControlStateVariantAvailable = true;
|
|
676
677
|
}
|
|
@@ -700,8 +701,8 @@ class ViewState extends ControllerExtension {
|
|
|
700
701
|
* @alias sap.fe.core.controllerextensions.ViewState#onBeforeStateApplied
|
|
701
702
|
* @protected
|
|
702
703
|
*/
|
|
703
|
-
@
|
|
704
|
-
@
|
|
704
|
+
@publicExtension()
|
|
705
|
+
@extensible(OverrideExecution.After)
|
|
705
706
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
706
707
|
onBeforeStateApplied(aPromises: Promise<any>) {
|
|
707
708
|
// to be overriden
|
|
@@ -718,8 +719,8 @@ class ViewState extends ControllerExtension {
|
|
|
718
719
|
* @alias sap.fe.core.controllerextensions.ViewState#onAfterStateApplied
|
|
719
720
|
* @protected
|
|
720
721
|
*/
|
|
721
|
-
@
|
|
722
|
-
@
|
|
722
|
+
@publicExtension()
|
|
723
|
+
@extensible(OverrideExecution.After)
|
|
723
724
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
724
725
|
onAfterStateApplied(aPromises: Promise<any>) {
|
|
725
726
|
// to be overriden
|
|
@@ -737,8 +738,8 @@ class ViewState extends ControllerExtension {
|
|
|
737
738
|
* @alias sap.fe.core.controllerextensions.ViewState#applyAdditionalStates
|
|
738
739
|
* @protected
|
|
739
740
|
*/
|
|
740
|
-
@
|
|
741
|
-
@
|
|
741
|
+
@publicExtension()
|
|
742
|
+
@extensible(OverrideExecution.After)
|
|
742
743
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
743
744
|
applyAdditionalStates(oViewState: object, aPromises: Promise<any>) {
|
|
744
745
|
// to be overridden if needed
|
|
@@ -760,8 +761,8 @@ class ViewState extends ControllerExtension {
|
|
|
760
761
|
* @alias sap.fe.core.controllerextensions.ViewState#applyNavigationParameters
|
|
761
762
|
* @protected
|
|
762
763
|
*/
|
|
763
|
-
@
|
|
764
|
-
@
|
|
764
|
+
@publicExtension()
|
|
765
|
+
@extensible(OverrideExecution.After)
|
|
765
766
|
applyNavigationParameters(
|
|
766
767
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
767
768
|
oNavParameter: {
|
|
@@ -784,8 +785,8 @@ class ViewState extends ControllerExtension {
|
|
|
784
785
|
* @param {object} [oNavParameters] The current navigation parameters
|
|
785
786
|
* @returns {any} Return a promise for async state handling
|
|
786
787
|
*/
|
|
787
|
-
@
|
|
788
|
-
@
|
|
788
|
+
@privateExtension()
|
|
789
|
+
@finalExtension()
|
|
789
790
|
applyControlState(oControl: any, oControlState: object, oNavParameters?: object) {
|
|
790
791
|
const aControlStateHandlers = this.getControlStateHandler(oControl);
|
|
791
792
|
let oPromiseChain = Promise.resolve();
|
|
@@ -0,0 +1,105 @@
|
|
|
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/base/Log", "sap/base/util/UriParameters", "sap/fe/core/controllerextensions/collaboration/CollaborationCommon", "sap/ui/core/ws/SapPcpWebSocket"], function (Log, UriParameters, CollaborationCommon, SapPcpWebSocket) {
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
var _exports = {};
|
|
9
|
+
var SUPPORTED_PROTOCOLS = SapPcpWebSocket.SUPPORTED_PROTOCOLS;
|
|
10
|
+
var Activity = CollaborationCommon.Activity;
|
|
11
|
+
|
|
12
|
+
var COLLABORATION = "/collaboration";
|
|
13
|
+
var CONNECTED = "/collaboration/connected";
|
|
14
|
+
var CONNECTION = "/collaboration/connection";
|
|
15
|
+
|
|
16
|
+
function isCollaborationConnected(internalModel) {
|
|
17
|
+
return !!internalModel.getProperty(CONNECTED);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
_exports.isCollaborationConnected = isCollaborationConnected;
|
|
21
|
+
|
|
22
|
+
function initializeCollaboration(user, webSocketBaseURL, draftUUID, internalModel, receiveCallback) {
|
|
23
|
+
var sendUserInfo = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
24
|
+
|
|
25
|
+
if (internalModel.getProperty(CONNECTION)) {
|
|
26
|
+
// connection already established
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var activeUsers = [user];
|
|
31
|
+
internalModel.setProperty(COLLABORATION, {
|
|
32
|
+
activeUsers: activeUsers,
|
|
33
|
+
activities: {}
|
|
34
|
+
});
|
|
35
|
+
sendUserInfo = sendUserInfo || UriParameters.fromQuery(window.location.search).get("useFLPUser") === "true";
|
|
36
|
+
var webSocket = createWebSocket(user, webSocketBaseURL, draftUUID, sendUserInfo);
|
|
37
|
+
internalModel.setProperty(CONNECTION, webSocket);
|
|
38
|
+
webSocket.attachMessage(function (event) {
|
|
39
|
+
var message = event.getParameter("pcpFields");
|
|
40
|
+
receiveCallback(message);
|
|
41
|
+
});
|
|
42
|
+
webSocket.attachOpen(function () {
|
|
43
|
+
internalModel.setProperty(CONNECTED, true);
|
|
44
|
+
});
|
|
45
|
+
webSocket.attachError(function () {
|
|
46
|
+
Log.error("The connection to the websocket channel " + webSocketBaseURL + " could not be established");
|
|
47
|
+
internalModel.setProperty(CONNECTED, false);
|
|
48
|
+
});
|
|
49
|
+
webSocket.attachClose(function () {
|
|
50
|
+
internalModel.setProperty(CONNECTED, false);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
_exports.initializeCollaboration = initializeCollaboration;
|
|
55
|
+
|
|
56
|
+
function broadcastCollaborationMessage(action, content, internalModel) {
|
|
57
|
+
if (isCollaborationConnected(internalModel)) {
|
|
58
|
+
var webSocket = internalModel.getProperty(CONNECTION);
|
|
59
|
+
webSocket.send("", {
|
|
60
|
+
clientAction: action,
|
|
61
|
+
clientContent: content
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
if (action === Activity.Activate || action === Activity.Discard) {
|
|
65
|
+
endCollaboration(internalModel);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
_exports.broadcastCollaborationMessage = broadcastCollaborationMessage;
|
|
71
|
+
|
|
72
|
+
function endCollaboration(internalModel) {
|
|
73
|
+
var webSocket = internalModel.getProperty(CONNECTION);
|
|
74
|
+
webSocket.close();
|
|
75
|
+
internalModel.setProperty(CONNECTION, null);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
_exports.endCollaboration = endCollaboration;
|
|
79
|
+
|
|
80
|
+
function createWebSocket(user, socketBaseURL, draftUUID) {
|
|
81
|
+
var sendUserInfo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
82
|
+
var hostLocation = window.location;
|
|
83
|
+
var socketURI; // Support useBackendUrl for local testing
|
|
84
|
+
|
|
85
|
+
var useBackendUrl = UriParameters.fromQuery(window.location.search).get("useBackendUrl");
|
|
86
|
+
|
|
87
|
+
if (useBackendUrl) {
|
|
88
|
+
socketURI = useBackendUrl.replace("https", "wss");
|
|
89
|
+
} else {
|
|
90
|
+
socketURI = hostLocation.protocol === "https:" ? "wss:" : "ws:";
|
|
91
|
+
socketURI += "//" + hostLocation.host;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
socketURI += (socketBaseURL.startsWith("/") ? "" : "/") + socketBaseURL + "?draft=" + draftUUID;
|
|
95
|
+
|
|
96
|
+
if (sendUserInfo) {
|
|
97
|
+
socketURI += "&userID=" + encodeURI(user.id) + "&userName=" + encodeURI(user.initialName || "");
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return new SapPcpWebSocket(socketURI, [SUPPORTED_PROTOCOLS.v10]);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return _exports;
|
|
104
|
+
}, false);
|
|
105
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkFjdGl2aXR5QmFzZS50cyJdLCJuYW1lcyI6WyJDT0xMQUJPUkFUSU9OIiwiQ09OTkVDVEVEIiwiQ09OTkVDVElPTiIsImlzQ29sbGFib3JhdGlvbkNvbm5lY3RlZCIsImludGVybmFsTW9kZWwiLCJnZXRQcm9wZXJ0eSIsImluaXRpYWxpemVDb2xsYWJvcmF0aW9uIiwidXNlciIsIndlYlNvY2tldEJhc2VVUkwiLCJkcmFmdFVVSUQiLCJyZWNlaXZlQ2FsbGJhY2siLCJzZW5kVXNlckluZm8iLCJhY3RpdmVVc2VycyIsInNldFByb3BlcnR5IiwiYWN0aXZpdGllcyIsIlVyaVBhcmFtZXRlcnMiLCJmcm9tUXVlcnkiLCJ3aW5kb3ciLCJsb2NhdGlvbiIsInNlYXJjaCIsImdldCIsIndlYlNvY2tldCIsImNyZWF0ZVdlYlNvY2tldCIsImF0dGFjaE1lc3NhZ2UiLCJldmVudCIsIm1lc3NhZ2UiLCJnZXRQYXJhbWV0ZXIiLCJhdHRhY2hPcGVuIiwiYXR0YWNoRXJyb3IiLCJMb2ciLCJlcnJvciIsImF0dGFjaENsb3NlIiwiYnJvYWRjYXN0Q29sbGFib3JhdGlvbk1lc3NhZ2UiLCJhY3Rpb24iLCJjb250ZW50Iiwic2VuZCIsImNsaWVudEFjdGlvbiIsImNsaWVudENvbnRlbnQiLCJBY3Rpdml0eSIsIkFjdGl2YXRlIiwiRGlzY2FyZCIsImVuZENvbGxhYm9yYXRpb24iLCJjbG9zZSIsInNvY2tldEJhc2VVUkwiLCJob3N0TG9jYXRpb24iLCJzb2NrZXRVUkkiLCJ1c2VCYWNrZW5kVXJsIiwicmVwbGFjZS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