@sapui5/sap.fe.core 1.102.2 → 1.104.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AppComponent.js +73 -30
- package/src/sap/fe/core/AppComponent.ts +65 -43
- package/src/sap/fe/core/AppStateHandler.js +82 -70
- package/src/sap/fe/core/AppStateHandler.ts +32 -37
- package/src/sap/fe/core/BaseController.js +11 -9
- package/src/sap/fe/core/BaseController.ts +15 -13
- package/src/sap/fe/core/CommonUtils.js +227 -126
- package/src/sap/fe/core/CommonUtils.ts +240 -163
- package/src/sap/fe/core/ExtensionAPI.js +24 -27
- package/src/sap/fe/core/ExtensionAPI.ts +36 -38
- package/src/sap/fe/core/PageController.js +4 -4
- package/src/sap/fe/core/PageController.ts +4 -5
- package/src/sap/fe/core/TemplateComponent.js +1 -1
- package/src/sap/fe/core/TemplateComponent.ts +6 -6
- package/src/sap/fe/core/TemplateModel.js +1 -1
- package/src/sap/fe/core/TemplateModel.ts +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.js +1 -1
- package/src/sap/fe/core/buildingBlocks/AttributeModel.ts +1 -1
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.js +181 -43
- package/src/sap/fe/core/buildingBlocks/BuildingBlock.ts +150 -24
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.js +585 -210
- package/src/sap/fe/core/buildingBlocks/BuildingBlockRuntime.ts +246 -96
- package/src/sap/fe/core/buildingBlocks/TraceInfo.js +30 -30
- package/src/sap/fe/core/buildingBlocks/TraceInfo.ts +32 -29
- package/src/sap/fe/core/controllerextensions/EditFlow.js +379 -330
- package/src/sap/fe/core/controllerextensions/EditFlow.ts +253 -245
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +9 -9
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.ts +10 -10
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +101 -74
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.ts +69 -79
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +67 -67
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.ts +76 -76
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +85 -77
- package/src/sap/fe/core/controllerextensions/InternalRouting.ts +103 -99
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +66 -68
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +106 -123
- package/src/sap/fe/core/controllerextensions/MassEdit.js +9 -9
- package/src/sap/fe/core/controllerextensions/MassEdit.ts +20 -27
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +20 -12
- package/src/sap/fe/core/controllerextensions/MessageHandler.ts +21 -14
- package/src/sap/fe/core/controllerextensions/PageReady.js +97 -25
- package/src/sap/fe/core/controllerextensions/PageReady.ts +98 -34
- package/src/sap/fe/core/controllerextensions/Paginator.js +21 -22
- package/src/sap/fe/core/controllerextensions/Paginator.ts +24 -25
- package/src/sap/fe/core/controllerextensions/Placeholder.js +4 -6
- package/src/sap/fe/core/controllerextensions/Placeholder.ts +12 -14
- package/src/sap/fe/core/controllerextensions/Routing.js +10 -11
- package/src/sap/fe/core/controllerextensions/Routing.ts +12 -13
- package/src/sap/fe/core/controllerextensions/Share.js +170 -139
- package/src/sap/fe/core/controllerextensions/Share.ts +117 -118
- package/src/sap/fe/core/controllerextensions/SideEffects.js +46 -50
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +56 -60
- package/src/sap/fe/core/controllerextensions/ViewState.js +200 -131
- package/src/sap/fe/core/controllerextensions/ViewState.ts +141 -148
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.js +5 -5
- package/src/sap/fe/core/controllerextensions/collaboration/ActivityBase.ts +8 -7
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.js +11 -10
- package/src/sap/fe/core/controllerextensions/collaboration/ActivitySync.ts +17 -20
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.js +2 -2
- package/src/sap/fe/core/controllerextensions/collaboration/CollaborationCommon.ts +4 -4
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.js +7 -9
- package/src/sap/fe/core/controllerextensions/collaboration/Manage.ts +18 -19
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.js +190 -141
- package/src/sap/fe/core/controllerextensions/editFlow/TransactionHelper.ts +258 -210
- package/src/sap/fe/core/controllerextensions/editFlow/draft.js +183 -125
- package/src/sap/fe/core/controllerextensions/editFlow/draft.ts +213 -156
- package/src/sap/fe/core/controllerextensions/editFlow/operations.js +164 -140
- package/src/sap/fe/core/controllerextensions/editFlow/operations.ts +180 -150
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.js +24 -26
- package/src/sap/fe/core/controllerextensions/editFlow/sticky.ts +35 -33
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.js +71 -41
- package/src/sap/fe/core/controllerextensions/messageHandler/messageHandling.ts +102 -82
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.js +61 -71
- package/src/sap/fe/core/controllerextensions/routing/RouterProxy.ts +56 -64
- package/src/sap/fe/core/controls/Any.js +9 -5
- package/src/sap/fe/core/controls/Any.ts +10 -4
- package/src/sap/fe/core/controls/CommandExecution.js +11 -25
- package/src/sap/fe/core/controls/CommandExecution.ts +11 -25
- package/src/sap/fe/core/controls/ConditionalWrapper.js +2 -2
- package/src/sap/fe/core/controls/ConditionalWrapper.ts +3 -3
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.js +22 -22
- package/src/sap/fe/core/controls/CustomFilterFieldContentWrapper.ts +25 -24
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +2 -2
- package/src/sap/fe/core/controls/CustomQuickViewPage.ts +2 -2
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +3 -3
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.ts +5 -5
- package/src/sap/fe/core/controls/FieldWrapper.js +2 -2
- package/src/sap/fe/core/controls/FieldWrapper.ts +3 -3
- package/src/sap/fe/core/controls/FileWrapper.js +7 -2
- package/src/sap/fe/core/controls/FileWrapper.ts +15 -11
- package/src/sap/fe/core/controls/FilterBar.js +6 -2
- package/src/sap/fe/core/controls/FilterBar.ts +13 -9
- package/src/sap/fe/core/controls/FormElementWrapper.js +1 -1
- package/src/sap/fe/core/controls/FormElementWrapper.ts +2 -2
- package/src/sap/fe/core/controls/MassEditSelect.js +1 -1
- package/src/sap/fe/core/controls/MassEditSelect.ts +0 -4
- package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +3 -3
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +16 -12
- package/src/sap/fe/core/controls/filterbar/VisualFilter.ts +20 -22
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +3 -3
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.ts +8 -8
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +49 -49
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.ts +54 -54
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +8 -2
- package/src/sap/fe/core/controls/massEdit/MassEditField.fragment.xml +22 -35
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +89 -88
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.ts +107 -106
- package/src/sap/fe/core/converters/ConverterContext.js +26 -33
- package/src/sap/fe/core/converters/ConverterContext.ts +52 -61
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +17 -15
- package/src/sap/fe/core/converters/ManifestWrapper.js +59 -45
- package/src/sap/fe/core/converters/ManifestWrapper.ts +55 -45
- package/src/sap/fe/core/converters/MetaModelConverter.js +64 -35
- package/src/sap/fe/core/converters/MetaModelConverter.ts +154 -129
- package/src/sap/fe/core/converters/TemplateConverter.js +21 -20
- package/src/sap/fe/core/converters/TemplateConverter.ts +27 -24
- package/src/sap/fe/core/converters/annotations/DataField.js +58 -35
- package/src/sap/fe/core/converters/annotations/DataField.ts +102 -76
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +1911 -1495
- package/src/sap/fe/core/converters/controls/Common/Action.js +50 -41
- package/src/sap/fe/core/converters/controls/Common/Action.ts +56 -46
- package/src/sap/fe/core/converters/controls/Common/Chart.js +14 -14
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +26 -33
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +3 -3
- package/src/sap/fe/core/converters/controls/Common/Criticality.ts +4 -4
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +30 -28
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +60 -61
- package/src/sap/fe/core/converters/controls/Common/Form.js +27 -28
- package/src/sap/fe/core/converters/controls/Common/Form.ts +44 -57
- package/src/sap/fe/core/converters/controls/Common/KPI.js +11 -11
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +49 -52
- package/src/sap/fe/core/converters/controls/Common/Table.js +181 -197
- package/src/sap/fe/core/converters/controls/Common/Table.ts +251 -280
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +119 -119
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +144 -141
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +45 -41
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +65 -59
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +28 -26
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +46 -43
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +9 -9
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +14 -13
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +67 -64
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.ts +69 -66
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +77 -73
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +101 -97
- package/src/sap/fe/core/converters/helpers/Aggregation.js +2 -4
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +12 -15
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +31 -31
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +30 -29
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +4 -4
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.ts +9 -9
- package/src/sap/fe/core/converters/helpers/ID.js +48 -46
- package/src/sap/fe/core/converters/helpers/ID.ts +26 -25
- package/src/sap/fe/core/converters/helpers/Key.js +7 -7
- package/src/sap/fe/core/converters/helpers/Key.ts +7 -7
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +1 -1
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +4 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +6 -6
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +10 -10
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +46 -62
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +54 -82
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +55 -42
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +81 -66
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +39 -38
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +52 -61
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +4 -4
- package/src/sap/fe/core/designtime/AppComponent.designtime.ts +4 -4
- package/src/sap/fe/core/formatters/CollaborationFormatter.js +2 -2
- package/src/sap/fe/core/formatters/CollaborationFormatter.ts +3 -3
- package/src/sap/fe/core/formatters/FPMFormatter.js +5 -5
- package/src/sap/fe/core/formatters/FPMFormatter.ts +10 -10
- package/src/sap/fe/core/formatters/KPIFormatter.js +7 -7
- package/src/sap/fe/core/formatters/KPIFormatter.ts +10 -10
- package/src/sap/fe/core/formatters/StandardFormatter.js +96 -0
- package/src/sap/fe/core/formatters/StandardFormatter.ts +70 -0
- package/src/sap/fe/core/formatters/TableFormatter.js +11 -11
- package/src/sap/fe/core/formatters/TableFormatter.ts +12 -12
- package/src/sap/fe/core/formatters/ValueFormatter.js +8 -8
- package/src/sap/fe/core/formatters/ValueFormatter.ts +9 -9
- package/src/sap/fe/core/helpers/AppStartupHelper.js +15 -15
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +37 -40
- package/src/sap/fe/core/helpers/BindingToolkit.js +1832 -0
- package/src/sap/fe/core/helpers/{BindingExpression.ts → BindingToolkit.ts} +396 -269
- package/src/sap/fe/core/helpers/ClassSupport.js +49 -12
- package/src/sap/fe/core/helpers/ClassSupport.ts +37 -10
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +2 -2
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.ts +1 -1
- package/src/sap/fe/core/helpers/EditState.js +1 -6
- package/src/sap/fe/core/helpers/EditState.ts +5 -10
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +2 -2
- package/src/sap/fe/core/helpers/ExcelFormatHelper.ts +4 -4
- package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
- package/src/sap/fe/core/helpers/FPMHelper.ts +2 -2
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +31 -31
- package/src/sap/fe/core/helpers/KeepAliveHelper.ts +52 -56
- package/src/sap/fe/core/helpers/MassEditHelper.js +306 -280
- package/src/sap/fe/core/helpers/MassEditHelper.ts +380 -360
- package/src/sap/fe/core/helpers/MessageStrip.js +81 -0
- package/src/sap/fe/core/helpers/MessageStrip.ts +79 -0
- package/src/sap/fe/core/helpers/ModelHelper.js +25 -25
- package/src/sap/fe/core/helpers/ModelHelper.ts +34 -32
- package/src/sap/fe/core/helpers/PasteHelper.js +3 -10
- package/src/sap/fe/core/helpers/PasteHelper.ts +20 -25
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
- package/src/sap/fe/core/helpers/SemanticDateOperators.ts +11 -11
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +3 -3
- package/src/sap/fe/core/helpers/SemanticKeyHelper.ts +8 -8
- package/src/sap/fe/core/helpers/StableIdHelper.js +12 -12
- package/src/sap/fe/core/helpers/StableIdHelper.ts +12 -12
- package/src/sap/fe/core/helpers/ToES6Promise.js +32 -0
- package/src/sap/fe/core/helpers/ToES6Promise.ts +19 -0
- package/src/sap/fe/core/jsx-runtime/Fragment.js +16 -0
- package/src/sap/fe/core/jsx-runtime/Fragment.ts +3 -0
- package/src/sap/fe/core/jsx-runtime/jsx-control.js +99 -0
- package/src/sap/fe/core/jsx-runtime/jsx-control.ts +82 -0
- package/src/sap/fe/core/jsx-runtime/jsx-xml.js +105 -0
- package/src/sap/fe/core/jsx-runtime/jsx-xml.ts +89 -0
- package/src/sap/fe/core/jsx-runtime/jsx.js +12 -90
- package/src/sap/fe/core/jsx-runtime/jsx.ts +24 -85
- package/src/sap/fe/core/library.js +42 -3
- package/src/sap/fe/core/library.ts +38 -0
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +3 -3
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +2 -2
- package/src/sap/fe/core/messagebundle.properties +39 -63
- package/src/sap/fe/core/messagebundle_ar.properties +25 -39
- package/src/sap/fe/core/messagebundle_bg.properties +25 -39
- package/src/sap/fe/core/messagebundle_ca.properties +25 -39
- package/src/sap/fe/core/messagebundle_cs.properties +25 -39
- package/src/sap/fe/core/messagebundle_cy.properties +25 -39
- package/src/sap/fe/core/messagebundle_da.properties +25 -39
- package/src/sap/fe/core/messagebundle_de.properties +25 -39
- package/src/sap/fe/core/messagebundle_el.properties +26 -40
- package/src/sap/fe/core/messagebundle_en.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_GB.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +25 -39
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +26 -18
- package/src/sap/fe/core/messagebundle_es.properties +27 -41
- package/src/sap/fe/core/messagebundle_es_MX.properties +25 -39
- package/src/sap/fe/core/messagebundle_et.properties +25 -39
- package/src/sap/fe/core/messagebundle_fi.properties +25 -39
- package/src/sap/fe/core/messagebundle_fr.properties +26 -40
- package/src/sap/fe/core/messagebundle_fr_CA.properties +25 -39
- package/src/sap/fe/core/messagebundle_hi.properties +25 -39
- package/src/sap/fe/core/messagebundle_hr.properties +25 -39
- package/src/sap/fe/core/messagebundle_hu.properties +25 -39
- package/src/sap/fe/core/messagebundle_id.properties +25 -39
- package/src/sap/fe/core/messagebundle_it.properties +41 -55
- package/src/sap/fe/core/messagebundle_iw.properties +25 -39
- package/src/sap/fe/core/messagebundle_ja.properties +25 -39
- package/src/sap/fe/core/messagebundle_kk.properties +25 -39
- package/src/sap/fe/core/messagebundle_ko.properties +30 -44
- package/src/sap/fe/core/messagebundle_lt.properties +25 -39
- package/src/sap/fe/core/messagebundle_lv.properties +25 -39
- package/src/sap/fe/core/messagebundle_ms.properties +25 -39
- package/src/sap/fe/core/messagebundle_nl.properties +27 -41
- package/src/sap/fe/core/messagebundle_no.properties +25 -39
- package/src/sap/fe/core/messagebundle_pl.properties +26 -40
- package/src/sap/fe/core/messagebundle_pt.properties +26 -40
- package/src/sap/fe/core/messagebundle_pt_PT.properties +25 -39
- package/src/sap/fe/core/messagebundle_ro.properties +25 -39
- package/src/sap/fe/core/messagebundle_ru.properties +25 -39
- package/src/sap/fe/core/messagebundle_sh.properties +25 -39
- package/src/sap/fe/core/messagebundle_sk.properties +25 -39
- package/src/sap/fe/core/messagebundle_sl.properties +25 -39
- package/src/sap/fe/core/messagebundle_sv.properties +25 -39
- package/src/sap/fe/core/messagebundle_th.properties +25 -39
- package/src/sap/fe/core/messagebundle_tr.properties +25 -39
- package/src/sap/fe/core/messagebundle_uk.properties +25 -39
- package/src/sap/fe/core/messagebundle_vi.properties +25 -39
- package/src/sap/fe/core/messagebundle_zh_CN.properties +25 -39
- package/src/sap/fe/core/messagebundle_zh_TW.properties +25 -39
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +2 -2
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.ts +5 -5
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +97 -69
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.ts +68 -69
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -2
- package/src/sap/fe/core/services/NavigationServiceFactory.js +61 -49
- package/src/sap/fe/core/services/NavigationServiceFactory.ts +63 -52
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +2 -2
- package/src/sap/fe/core/services/ResourceModelServiceFactory.ts +4 -4
- package/src/sap/fe/core/services/RoutingServiceFactory.js +55 -55
- package/src/sap/fe/core/services/RoutingServiceFactory.ts +67 -65
- package/src/sap/fe/core/services/ShellServicesFactory.js +92 -76
- package/src/sap/fe/core/services/ShellServicesFactory.ts +95 -82
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +61 -61
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +102 -92
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +224 -198
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.ts +138 -139
- package/src/sap/fe/core/support/CommonHelper.js +3 -2
- package/src/sap/fe/core/support/CommonHelper.ts +9 -13
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/support/Diagnostics.ts +5 -5
- package/src/sap/fe/core/templating/CommonFormatters.js +84 -0
- package/src/sap/fe/core/templating/CommonFormatters.ts +86 -0
- package/src/sap/fe/core/templating/CriticalityFormatters.js +31 -31
- package/src/sap/fe/core/templating/CriticalityFormatters.ts +42 -40
- package/src/sap/fe/core/templating/DataFieldFormatters.js +8 -8
- package/src/sap/fe/core/templating/DataFieldFormatters.ts +13 -10
- package/src/sap/fe/core/templating/DataModelPathHelper.js +16 -15
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +42 -32
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +1 -1
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +2 -3
- package/src/sap/fe/core/templating/EntitySetHelper.js +7 -7
- package/src/sap/fe/core/templating/EntitySetHelper.ts +6 -8
- package/src/sap/fe/core/templating/FieldControlHelper.js +35 -34
- package/src/sap/fe/core/templating/FieldControlHelper.ts +29 -46
- package/src/sap/fe/core/templating/FilterHelper.js +16 -15
- package/src/sap/fe/core/templating/FilterHelper.ts +18 -18
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/FilterTemplating.ts +3 -3
- package/src/sap/fe/core/templating/PropertyFormatters.js +7 -7
- package/src/sap/fe/core/templating/PropertyFormatters.ts +21 -19
- package/src/sap/fe/core/templating/PropertyHelper.js +25 -25
- package/src/sap/fe/core/templating/PropertyHelper.ts +25 -26
- package/src/sap/fe/core/templating/UIFormatters.js +152 -95
- package/src/sap/fe/core/templating/UIFormatters.ts +202 -128
- package/src/sap/fe/core/type/Email.js +2 -2
- package/src/sap/fe/core/type/Email.ts +2 -2
- package/src/sap/fe/core/helpers/BindingExpression.js +0 -1732
|
@@ -4,9 +4,9 @@ import CommonUtils from "sap/fe/core/CommonUtils";
|
|
|
4
4
|
import { defineUI5Class, extensible, finalExtension, privateExtension, publicExtension } from "sap/fe/core/helpers/ClassSupport";
|
|
5
5
|
import KeepAliveHelper from "sap/fe/core/helpers/KeepAliveHelper";
|
|
6
6
|
import ModelHelper from "sap/fe/core/helpers/ModelHelper";
|
|
7
|
-
import PageController from "sap/fe/core/PageController";
|
|
7
|
+
import type PageController from "sap/fe/core/PageController";
|
|
8
8
|
import NavLibrary from "sap/fe/navigation/library";
|
|
9
|
-
import ManagedObject from "sap/ui/base/ManagedObject";
|
|
9
|
+
import type ManagedObject from "sap/ui/base/ManagedObject";
|
|
10
10
|
import ControllerExtension from "sap/ui/core/mvc/ControllerExtension";
|
|
11
11
|
import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
|
|
12
12
|
import ControlVariantApplyAPI from "sap/ui/fl/apply/api/ControlVariantApplyAPI";
|
|
@@ -108,7 +108,7 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
} else {
|
|
111
|
-
Log.info(
|
|
111
|
+
Log.info(`Table: ${oTable.getId()} was not refreshed. No binding found!`);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
},
|
|
@@ -129,7 +129,9 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
129
129
|
};
|
|
130
130
|
},
|
|
131
131
|
apply: function (oOPLayout: any, oControlState: any) {
|
|
132
|
-
|
|
132
|
+
if (oControlState) {
|
|
133
|
+
oOPLayout.setSelectedSection(oControlState.selectedSection);
|
|
134
|
+
}
|
|
133
135
|
},
|
|
134
136
|
refreshBinding: function (oOPLayout: any) {
|
|
135
137
|
const oBindingContext = oOPLayout.getBindingContext();
|
|
@@ -160,7 +162,7 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
160
162
|
oBinding.refresh();
|
|
161
163
|
}
|
|
162
164
|
} else {
|
|
163
|
-
Log.info(
|
|
165
|
+
Log.info(`ObjectPage: ${oOPLayout.getId()} was not refreshed. No binding found!`);
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
168
|
},
|
|
@@ -171,7 +173,9 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
171
173
|
};
|
|
172
174
|
},
|
|
173
175
|
apply: function (oQuickFilter: any, oControlState: any) {
|
|
174
|
-
|
|
176
|
+
if (oControlState) {
|
|
177
|
+
oQuickFilter.setSelectorKey(oControlState.selectedKey);
|
|
178
|
+
}
|
|
175
179
|
}
|
|
176
180
|
},
|
|
177
181
|
"sap.m.SegmentedButton": {
|
|
@@ -181,7 +185,9 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
181
185
|
};
|
|
182
186
|
},
|
|
183
187
|
apply: function (oSegmentedButton: any, oControlState: any) {
|
|
184
|
-
|
|
188
|
+
if (oControlState) {
|
|
189
|
+
oSegmentedButton.setSelectedKey(oControlState.selectedKey);
|
|
190
|
+
}
|
|
185
191
|
}
|
|
186
192
|
},
|
|
187
193
|
"sap.m.Select": {
|
|
@@ -191,7 +197,9 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
191
197
|
};
|
|
192
198
|
},
|
|
193
199
|
apply: function (oSelect: any, oControlState: any) {
|
|
194
|
-
|
|
200
|
+
if (oControlState) {
|
|
201
|
+
oSelect.setSelectedKey(oControlState.selectedKey);
|
|
202
|
+
}
|
|
195
203
|
}
|
|
196
204
|
},
|
|
197
205
|
"sap.f.DynamicPage": {
|
|
@@ -201,7 +209,9 @@ const _mControlStateHandlerMap: Record<string, any> = {
|
|
|
201
209
|
};
|
|
202
210
|
},
|
|
203
211
|
apply: function (oDynamicPage: any, oControlState: any) {
|
|
204
|
-
|
|
212
|
+
if (oControlState) {
|
|
213
|
+
oDynamicPage.setHeaderExpanded(oControlState.headerExpanded);
|
|
214
|
+
}
|
|
205
215
|
}
|
|
206
216
|
},
|
|
207
217
|
"sap.ui.core.mvc.View": {
|
|
@@ -270,25 +280,25 @@ class ViewState extends ControllerExtension {
|
|
|
270
280
|
|
|
271
281
|
@publicExtension()
|
|
272
282
|
@finalExtension()
|
|
273
|
-
refreshViewBindings() {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
});
|
|
283
|
+
async refreshViewBindings() {
|
|
284
|
+
const aControls = await this.collectResults(this.base.viewState.adaptBindingRefreshControls);
|
|
285
|
+
let oPromiseChain = Promise.resolve();
|
|
286
|
+
aControls
|
|
287
|
+
.filter((oControl: any) => {
|
|
288
|
+
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
289
|
+
})
|
|
290
|
+
.forEach((oControl: any) => {
|
|
291
|
+
oPromiseChain = oPromiseChain.then(this.refreshControlBinding.bind(this, oControl));
|
|
292
|
+
});
|
|
293
|
+
return oPromiseChain;
|
|
285
294
|
}
|
|
286
295
|
/**
|
|
287
296
|
* This function should add all controls relevant for refreshing to the provided control array.
|
|
288
297
|
*
|
|
289
298
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
290
299
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
291
|
-
*
|
|
300
|
+
*
|
|
301
|
+
* @param aCollectedControls The collected controls
|
|
292
302
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshControls
|
|
293
303
|
* @protected
|
|
294
304
|
*/
|
|
@@ -305,7 +315,7 @@ class ViewState extends ControllerExtension {
|
|
|
305
315
|
const oControlRefreshBindingHandler = this.getControlRefreshBindingHandler(oControl);
|
|
306
316
|
let oPromiseChain = Promise.resolve();
|
|
307
317
|
if (typeof oControlRefreshBindingHandler.refreshBinding !== "function") {
|
|
308
|
-
Log.info(
|
|
318
|
+
Log.info(`refreshBinding handler for control: ${oControl.getMetadata().getName()} is not provided`);
|
|
309
319
|
} else {
|
|
310
320
|
oPromiseChain = oPromiseChain.then(oControlRefreshBindingHandler.refreshBinding.bind(this, oControl));
|
|
311
321
|
}
|
|
@@ -343,9 +353,8 @@ class ViewState extends ControllerExtension {
|
|
|
343
353
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
344
354
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
345
355
|
*
|
|
346
|
-
* @param
|
|
347
|
-
* @param
|
|
348
|
-
*
|
|
356
|
+
* @param oControl The control for which the refresh handler is adapted.
|
|
357
|
+
* @param oControlHandler A plain object which can have one function: <code>refreshBinding</code>
|
|
349
358
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshHandler
|
|
350
359
|
* @protected
|
|
351
360
|
*/
|
|
@@ -392,9 +401,9 @@ class ViewState extends ControllerExtension {
|
|
|
392
401
|
* Helper function to enable multi override. It is adding an additional parameter (array) to the provided
|
|
393
402
|
* function (and its parameters), that will be evaluated via <code>Promise.all</code>.
|
|
394
403
|
*
|
|
395
|
-
* @param
|
|
404
|
+
* @param fnCall The function to be called
|
|
396
405
|
* @param args
|
|
397
|
-
* @returns
|
|
406
|
+
* @returns A promise to be resolved with the result of all overrides
|
|
398
407
|
*/
|
|
399
408
|
@privateExtension()
|
|
400
409
|
@finalExtension()
|
|
@@ -411,9 +420,8 @@ class ViewState extends ControllerExtension {
|
|
|
411
420
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
412
421
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
413
422
|
*
|
|
414
|
-
* @param
|
|
415
|
-
* @param
|
|
416
|
-
*
|
|
423
|
+
* @param oControl The control to get state handler for
|
|
424
|
+
* @param aControlHandler A list of plain objects with two functions: <code>retrieve</code> and <code>apply</code>
|
|
417
425
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptControlStateHandler
|
|
418
426
|
* @protected
|
|
419
427
|
*/
|
|
@@ -427,8 +435,8 @@ class ViewState extends ControllerExtension {
|
|
|
427
435
|
/**
|
|
428
436
|
* Returns a map of <code>retrieve</code> and <code>apply</code> functions for a certain control.
|
|
429
437
|
*
|
|
430
|
-
* @param
|
|
431
|
-
* @returns
|
|
438
|
+
* @param oControl The control to get state handler for
|
|
439
|
+
* @returns A plain object with two functions: <code>retrieve</code> and <code>apply</code>
|
|
432
440
|
*/
|
|
433
441
|
@privateExtension()
|
|
434
442
|
@finalExtension()
|
|
@@ -453,7 +461,8 @@ class ViewState extends ControllerExtension {
|
|
|
453
461
|
*
|
|
454
462
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
455
463
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
456
|
-
*
|
|
464
|
+
*
|
|
465
|
+
* @param aCollectedControls The collected controls
|
|
457
466
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptStateControls
|
|
458
467
|
* @protected
|
|
459
468
|
*/
|
|
@@ -467,8 +476,8 @@ class ViewState extends ControllerExtension {
|
|
|
467
476
|
/**
|
|
468
477
|
* Returns the key to be used for given control.
|
|
469
478
|
*
|
|
470
|
-
* @param
|
|
471
|
-
* @returns
|
|
479
|
+
* @param oControl The control to get state key for
|
|
480
|
+
* @returns The key to be used for storing the controls state
|
|
472
481
|
*/
|
|
473
482
|
@publicExtension()
|
|
474
483
|
@finalExtension()
|
|
@@ -480,56 +489,47 @@ class ViewState extends ControllerExtension {
|
|
|
480
489
|
* Retrieve the view state of this extensions view.
|
|
481
490
|
* When this function is called more than once before finishing, all but the final response will resolve to <code>undefined</code>.
|
|
482
491
|
*
|
|
483
|
-
* @returns
|
|
484
|
-
*
|
|
492
|
+
* @returns A promise resolving the view state
|
|
485
493
|
* @alias sap.fe.core.controllerextensions.ViewState#retrieveViewState
|
|
486
494
|
* @public
|
|
487
495
|
*/
|
|
488
496
|
@publicExtension()
|
|
489
497
|
@finalExtension()
|
|
490
|
-
retrieveViewState() {
|
|
498
|
+
async retrieveViewState() {
|
|
491
499
|
++this._iRetrievingStateCounter;
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
});
|
|
526
|
-
})
|
|
527
|
-
.finally(() => {
|
|
528
|
-
--this._iRetrievingStateCounter;
|
|
529
|
-
})
|
|
530
|
-
.then((oViewState: any) => {
|
|
531
|
-
return this._iRetrievingStateCounter === 0 ? oViewState : undefined;
|
|
532
|
-
});
|
|
500
|
+
let oViewState: any;
|
|
501
|
+
|
|
502
|
+
try {
|
|
503
|
+
await this._pInitialStateApplied;
|
|
504
|
+
const aControls = await this.collectResults(this.base.viewState.adaptStateControls);
|
|
505
|
+
const aResolvedStates = await Promise.all(
|
|
506
|
+
aControls
|
|
507
|
+
.filter(function (oControl: any) {
|
|
508
|
+
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
509
|
+
})
|
|
510
|
+
.map((oControl: any) => {
|
|
511
|
+
return this.retrieveControlState(oControl).then((vResult: any) => {
|
|
512
|
+
return {
|
|
513
|
+
key: this.getStateKey(oControl),
|
|
514
|
+
value: vResult
|
|
515
|
+
};
|
|
516
|
+
});
|
|
517
|
+
})
|
|
518
|
+
);
|
|
519
|
+
oViewState = aResolvedStates.reduce(function (oStates: any, mState: any) {
|
|
520
|
+
const oCurrentState: any = {};
|
|
521
|
+
oCurrentState[mState.key] = mState.value;
|
|
522
|
+
return mergeObjects(oStates, oCurrentState);
|
|
523
|
+
}, {});
|
|
524
|
+
const mAdditionalStates = await Promise.resolve(this._retrieveAdditionalStates());
|
|
525
|
+
if (mAdditionalStates && Object.keys(mAdditionalStates).length) {
|
|
526
|
+
oViewState[ADDITIONAL_STATES_KEY] = mAdditionalStates;
|
|
527
|
+
}
|
|
528
|
+
} finally {
|
|
529
|
+
--this._iRetrievingStateCounter;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
return this._iRetrievingStateCounter === 0 ? oViewState : undefined;
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
/**
|
|
@@ -538,8 +538,7 @@ class ViewState extends ControllerExtension {
|
|
|
538
538
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
539
539
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
540
540
|
*
|
|
541
|
-
* @param
|
|
542
|
-
*
|
|
541
|
+
* @param mAdditionalStates The additional state
|
|
543
542
|
* @alias sap.fe.core.controllerextensions.ViewState#retrieveAdditionalStates
|
|
544
543
|
* @protected
|
|
545
544
|
*/
|
|
@@ -553,7 +552,7 @@ class ViewState extends ControllerExtension {
|
|
|
553
552
|
/**
|
|
554
553
|
* Returns a map of additional states (not control bound) to be added to the current view state of the given view.
|
|
555
554
|
*
|
|
556
|
-
* @returns
|
|
555
|
+
* @returns Additional view states
|
|
557
556
|
*/
|
|
558
557
|
_retrieveAdditionalStates() {
|
|
559
558
|
const mAdditionalStates = {};
|
|
@@ -564,8 +563,8 @@ class ViewState extends ControllerExtension {
|
|
|
564
563
|
/**
|
|
565
564
|
* Returns the current state for the given control.
|
|
566
565
|
*
|
|
567
|
-
* @param
|
|
568
|
-
* @returns
|
|
566
|
+
* @param oControl The object to get the state for
|
|
567
|
+
* @returns The state for the given control
|
|
569
568
|
*/
|
|
570
569
|
@privateExtension()
|
|
571
570
|
@finalExtension()
|
|
@@ -574,7 +573,7 @@ class ViewState extends ControllerExtension {
|
|
|
574
573
|
return Promise.all(
|
|
575
574
|
aControlStateHandlers.map((mControlStateHandler: any) => {
|
|
576
575
|
if (typeof mControlStateHandler.retrieve !== "function") {
|
|
577
|
-
throw new Error(
|
|
576
|
+
throw new Error(`controlStateHandler.retrieve is not a function for control: ${oControl.getMetadata().getName()}`);
|
|
578
577
|
}
|
|
579
578
|
return mControlStateHandler.retrieve.call(this, oControl);
|
|
580
579
|
})
|
|
@@ -594,9 +593,8 @@ class ViewState extends ControllerExtension {
|
|
|
594
593
|
* Important:
|
|
595
594
|
* You should only override this method for custom pages and not for the standard ListReportPage and ObjectPage!
|
|
596
595
|
*
|
|
597
|
-
* @returns
|
|
596
|
+
* @returns If <code>true</code>, only the initial view state is applied once,
|
|
598
597
|
* else any new view state is also applied on follow-up calls (default)
|
|
599
|
-
*
|
|
600
598
|
* @alias sap.fe.core.controllerextensions.ViewState#applyInitialStateOnly
|
|
601
599
|
* @protected
|
|
602
600
|
*/
|
|
@@ -608,21 +606,19 @@ class ViewState extends ControllerExtension {
|
|
|
608
606
|
/**
|
|
609
607
|
* Applies the given view state to this extensions view.
|
|
610
608
|
*
|
|
611
|
-
* @param
|
|
612
|
-
* @param
|
|
613
|
-
* @param
|
|
614
|
-
* @param
|
|
615
|
-
* @param
|
|
616
|
-
* @param
|
|
617
|
-
*
|
|
618
|
-
* @returns {Promise} Promise for async state handling
|
|
619
|
-
*
|
|
609
|
+
* @param oViewState The view state to apply (can be undefined)
|
|
610
|
+
* @param oNavParameter The current navigation parameter
|
|
611
|
+
* @param oNavParameter.navigationType The actual navigation type
|
|
612
|
+
* @param oNavParameter.selectionVariant The selectionVariant from the navigation
|
|
613
|
+
* @param oNavParameter.selectionVariantDefaults The selectionVariant defaults from the navigation
|
|
614
|
+
* @param oNavParameter.requiresStandardVariant Defines whether standard variant must be used in VM
|
|
615
|
+
* @returns Promise for async state handling
|
|
620
616
|
* @alias sap.fe.core.controllerextensions.ViewState#applyViewState
|
|
621
617
|
* @public
|
|
622
618
|
*/
|
|
623
619
|
@publicExtension()
|
|
624
620
|
@finalExtension()
|
|
625
|
-
applyViewState(
|
|
621
|
+
async applyViewState(
|
|
626
622
|
oViewState: any,
|
|
627
623
|
oNavParameter: {
|
|
628
624
|
navigationType: any;
|
|
@@ -632,39 +628,40 @@ class ViewState extends ControllerExtension {
|
|
|
632
628
|
}
|
|
633
629
|
): Promise<any> {
|
|
634
630
|
if (this.base.viewState.applyInitialStateOnly() && this._getInitialStateApplied()) {
|
|
635
|
-
return
|
|
631
|
+
return;
|
|
636
632
|
}
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
.
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
.
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
.
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
this.applyControlState.bind(this, oControl, oViewState ? oViewState[sKey] : undefined, oNavParameter)
|
|
651
|
-
);
|
|
652
|
-
});
|
|
653
|
-
return oPromiseChain;
|
|
654
|
-
})
|
|
655
|
-
.then(() => {
|
|
656
|
-
if (oNavParameter.navigationType === NavType.iAppState) {
|
|
657
|
-
return this.collectResults(
|
|
658
|
-
this.base.viewState.applyAdditionalStates,
|
|
659
|
-
oViewState ? oViewState[ADDITIONAL_STATES_KEY] : undefined
|
|
633
|
+
|
|
634
|
+
try {
|
|
635
|
+
await this.collectResults(this.base.viewState.onBeforeStateApplied);
|
|
636
|
+
const aControls = await this.collectResults(this.base.viewState.adaptStateControls);
|
|
637
|
+
let oPromiseChain = Promise.resolve();
|
|
638
|
+
aControls
|
|
639
|
+
.filter(function (oControl: any) {
|
|
640
|
+
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
641
|
+
})
|
|
642
|
+
.forEach((oControl: any) => {
|
|
643
|
+
const sKey = this.getStateKey(oControl);
|
|
644
|
+
oPromiseChain = oPromiseChain.then(
|
|
645
|
+
this.applyControlState.bind(this, oControl, oViewState ? oViewState[sKey] : undefined, oNavParameter)
|
|
660
646
|
);
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
647
|
+
});
|
|
648
|
+
await oPromiseChain;
|
|
649
|
+
if (oNavParameter.navigationType === NavType.iAppState) {
|
|
650
|
+
await this.collectResults(
|
|
651
|
+
this.base.viewState.applyAdditionalStates,
|
|
652
|
+
oViewState ? oViewState[ADDITIONAL_STATES_KEY] : undefined
|
|
653
|
+
);
|
|
654
|
+
} else {
|
|
655
|
+
await this.collectResults(this.base.viewState.applyNavigationParameters, oNavParameter);
|
|
656
|
+
}
|
|
657
|
+
} finally {
|
|
658
|
+
try {
|
|
659
|
+
await this.collectResults(this.base.viewState.onAfterStateApplied);
|
|
660
|
+
this._setInitialStateApplied();
|
|
661
|
+
} catch (e: any) {
|
|
662
|
+
Log.error(e);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
668
665
|
}
|
|
669
666
|
|
|
670
667
|
@privateExtension()
|
|
@@ -696,8 +693,7 @@ class ViewState extends ControllerExtension {
|
|
|
696
693
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
697
694
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
698
695
|
*
|
|
699
|
-
* @param
|
|
700
|
-
*
|
|
696
|
+
* @param aPromises Extensible array of promises to be resolved before continuing
|
|
701
697
|
* @alias sap.fe.core.controllerextensions.ViewState#onBeforeStateApplied
|
|
702
698
|
* @protected
|
|
703
699
|
*/
|
|
@@ -714,8 +710,7 @@ class ViewState extends ControllerExtension {
|
|
|
714
710
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
715
711
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
716
712
|
*
|
|
717
|
-
* @param
|
|
718
|
-
*
|
|
713
|
+
* @param aPromises Extensible array of promises to be resolved before continuing
|
|
719
714
|
* @alias sap.fe.core.controllerextensions.ViewState#onAfterStateApplied
|
|
720
715
|
* @protected
|
|
721
716
|
*/
|
|
@@ -732,9 +727,8 @@ class ViewState extends ControllerExtension {
|
|
|
732
727
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
733
728
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
734
729
|
*
|
|
735
|
-
* @param
|
|
736
|
-
* @param
|
|
737
|
-
*
|
|
730
|
+
* @param oViewState The current view state
|
|
731
|
+
* @param aPromises Extensible array of promises to be resolved before continuing
|
|
738
732
|
* @alias sap.fe.core.controllerextensions.ViewState#applyAdditionalStates
|
|
739
733
|
* @protected
|
|
740
734
|
*/
|
|
@@ -751,13 +745,12 @@ class ViewState extends ControllerExtension {
|
|
|
751
745
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
752
746
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
753
747
|
*
|
|
754
|
-
* @param
|
|
755
|
-
* @param
|
|
756
|
-
* @param
|
|
757
|
-
* @param
|
|
758
|
-
* @param
|
|
759
|
-
* @param
|
|
760
|
-
*
|
|
748
|
+
* @param oNavParameter The current navigation parameter
|
|
749
|
+
* @param oNavParameter.navigationType The actual navigation type
|
|
750
|
+
* @param [oNavParameter.selectionVariant] The selectionVariant from the navigation
|
|
751
|
+
* @param [oNavParameter.selectionVariantDefaults] The selectionVariant defaults from the navigation
|
|
752
|
+
* @param [oNavParameter.requiresStandardVariant] Defines whether standard variant must be used in VM
|
|
753
|
+
* @param aPromises Extensible array of promises to be resolved before continuing
|
|
761
754
|
* @alias sap.fe.core.controllerextensions.ViewState#applyNavigationParameters
|
|
762
755
|
* @protected
|
|
763
756
|
*/
|
|
@@ -780,10 +773,10 @@ class ViewState extends ControllerExtension {
|
|
|
780
773
|
/**
|
|
781
774
|
* Applying the given state to the given control.
|
|
782
775
|
*
|
|
783
|
-
* @param
|
|
784
|
-
* @param
|
|
785
|
-
* @param
|
|
786
|
-
* @returns
|
|
776
|
+
* @param oControl The object to apply the given state
|
|
777
|
+
* @param oControlState The state for the given control
|
|
778
|
+
* @param [oNavParameters] The current navigation parameters
|
|
779
|
+
* @returns Return a promise for async state handling
|
|
787
780
|
*/
|
|
788
781
|
@privateExtension()
|
|
789
782
|
@finalExtension()
|
|
@@ -792,7 +785,7 @@ class ViewState extends ControllerExtension {
|
|
|
792
785
|
let oPromiseChain = Promise.resolve();
|
|
793
786
|
aControlStateHandlers.forEach((mControlStateHandler: any) => {
|
|
794
787
|
if (typeof mControlStateHandler.apply !== "function") {
|
|
795
|
-
throw new Error(
|
|
788
|
+
throw new Error(`controlStateHandler.apply is not a function for control: ${oControl.getMetadata().getName()}`);
|
|
796
789
|
}
|
|
797
790
|
oPromiseChain = oPromiseChain.then(mControlStateHandler.apply.bind(this, oControl, oControlState, oNavParameters));
|
|
798
791
|
});
|
|
@@ -43,7 +43,7 @@ sap.ui.define(["sap/base/Log", "sap/base/util/UriParameters", "sap/fe/core/contr
|
|
|
43
43
|
internalModel.setProperty(CONNECTED, true);
|
|
44
44
|
});
|
|
45
45
|
webSocket.attachError(function () {
|
|
46
|
-
Log.error("The connection to the websocket channel "
|
|
46
|
+
Log.error("The connection to the websocket channel ".concat(webSocketBaseURL, " could not be established"));
|
|
47
47
|
internalModel.setProperty(CONNECTED, false);
|
|
48
48
|
});
|
|
49
49
|
webSocket.attachClose(function () {
|
|
@@ -88,13 +88,13 @@ sap.ui.define(["sap/base/Log", "sap/base/util/UriParameters", "sap/fe/core/contr
|
|
|
88
88
|
socketURI = useBackendUrl.replace("https", "wss");
|
|
89
89
|
} else {
|
|
90
90
|
socketURI = hostLocation.protocol === "https:" ? "wss:" : "ws:";
|
|
91
|
-
socketURI += "//"
|
|
91
|
+
socketURI += "//".concat(hostLocation.host);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
socketURI += (socketBaseURL.startsWith("/") ? "" : "/") + socketBaseURL
|
|
94
|
+
socketURI += "".concat((socketBaseURL.startsWith("/") ? "" : "/") + socketBaseURL, "?draft=").concat(draftUUID);
|
|
95
95
|
|
|
96
96
|
if (sendUserInfo) {
|
|
97
|
-
socketURI += "&userID="
|
|
97
|
+
socketURI += "&userID=".concat(encodeURI(user.id), "&userName=").concat(encodeURI(user.initialName || ""));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
return new SapPcpWebSocket(socketURI, [SUPPORTED_PROTOCOLS.v10]);
|
|
@@ -102,4 +102,4 @@ sap.ui.define(["sap/base/Log", "sap/base/util/UriParameters", "sap/fe/core/contr
|
|
|
102
102
|
|
|
103
103
|
return _exports;
|
|
104
104
|
}, false);
|
|
105
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
105
|
+
//# sourceMappingURL=data:application/json;charset=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XJuIG5ldyBTYXBQY3BXZWJTb2NrZXQoc29ja2V0VVJJLCBbU1VQUE9SVEVEX1BST1RPQ09MUy52MTBdKTtcbn1cbiJdfQ==
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import Log from "sap/base/Log";
|
|
2
2
|
import UriParameters from "sap/base/util/UriParameters";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import type { Message, User } from "sap/fe/core/controllerextensions/collaboration/CollaborationCommon";
|
|
4
|
+
import { Activity } from "sap/fe/core/controllerextensions/collaboration/CollaborationCommon";
|
|
5
|
+
import type Event from "sap/ui/base/Event";
|
|
5
6
|
import SapPcpWebSocket, { SUPPORTED_PROTOCOLS } from "sap/ui/core/ws/SapPcpWebSocket";
|
|
6
|
-
import JSONModel from "sap/ui/model/json/JSONModel";
|
|
7
|
+
import type JSONModel from "sap/ui/model/json/JSONModel";
|
|
7
8
|
|
|
8
9
|
const COLLABORATION = "/collaboration";
|
|
9
10
|
const CONNECTED = "/collaboration/connected";
|
|
@@ -45,7 +46,7 @@ export function initializeCollaboration(
|
|
|
45
46
|
});
|
|
46
47
|
|
|
47
48
|
webSocket.attachError(function () {
|
|
48
|
-
Log.error(
|
|
49
|
+
Log.error(`The connection to the websocket channel ${webSocketBaseURL} could not be established`);
|
|
49
50
|
internalModel.setProperty(CONNECTED, false);
|
|
50
51
|
});
|
|
51
52
|
|
|
@@ -85,13 +86,13 @@ function createWebSocket(user: User, socketBaseURL: string, draftUUID: string, s
|
|
|
85
86
|
socketURI = useBackendUrl.replace("https", "wss");
|
|
86
87
|
} else {
|
|
87
88
|
socketURI = hostLocation.protocol === "https:" ? "wss:" : "ws:";
|
|
88
|
-
socketURI +=
|
|
89
|
+
socketURI += `//${hostLocation.host}`;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
socketURI += (socketBaseURL.startsWith("/") ? "" : "/") + socketBaseURL
|
|
92
|
+
socketURI += `${(socketBaseURL.startsWith("/") ? "" : "/") + socketBaseURL}?draft=${draftUUID}`;
|
|
92
93
|
|
|
93
94
|
if (sendUserInfo) {
|
|
94
|
-
socketURI +=
|
|
95
|
+
socketURI += `&userID=${encodeURI(user.id)}&userName=${encodeURI(user.initialName || "")}`;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
return new SapPcpWebSocket(socketURI, [SUPPORTED_PROTOCOLS.v10]);
|